Forum Discussion

mgroen2's avatar
mgroen2
Super Contributor
9 years ago

Data driven Test Execution with TestExecute: is this possible implement?

I have created a Keyword Data Driven test in TestComplete. The test reads it's test data out of an Excel file, and perform a data driven loop. Works OK.   However, now I want another end user (not ...
  • m_essaid's avatar
    m_essaid
    9 years ago

    adapt and add this delphi-like script to your code :

     

    function ReadParams(Argument: string): Boolean;
    var
       i: integer;
    begin
       Result:= False;
       for i:= 0 to BuiltIn.ParamCount do
       begin
         log.Message(ParamStr(i));
         if (ParamStr(i) = Argument) then
         begin
           Result:= True;
           exit;
         end;
       end;
    end;

     

    use it like this :

     

    if (ReadParams('/User1')) then

      ... your code for the User1...

    else if ... etc