hongji.li
2023-11-07 1a1ba3ad5ed9e4380185aa1ccad20204a0e5f115
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Quintiq file version 2.0
#parent: #root
Method PTF_ExecuteClientByScript (
  LibPTF_TestScript script,
  Number nrOfClientsToStart,
  output Number executedSessions_o,
  output Number executingSessions_o,
  output String startTime_o
) id:Method_LibPTF_pnlTestController_PTF_ExecuteClientByScript
{
  #keys: '[104342.0.777049592]'
  Body:
  [*
    // Checks the status of the expected clients and launched clients in a script and launch the next batches of clients when the previous batches of clients complete its execution
    for( x := 0; x < nrOfClientsToStart; x++ )
    {
      if( executedSessions_o = 0 )
      {
        startTime_o := this.PTF_GetCurrentDatetime();
      }
    
      // First line - [ResultLogPath], [LoggingOptions]
      scriptwithparameters := this.PTF_GetResultLogPath() + ","
                              + script.LoggingOptions() + ";" + String::NewLine()
                              + script.GetActionScript();
    
      this.PTF_GenerateTestScript( this.PTF_GetScriptPath(),
                                   scriptwithparameters,
                                   script.User(),
                                   script.Project()
                                      );
    
      this.PTF_StartClient( script.User(),
                            script.Password(),
                            script.ClientType(),
                            script.Project(),
                            script.View(),
                            script.CustomArgument(),
                            script.MinStartClientDelay().TotalInSeconds(),
                            script.MaxStartClientDelay().TotalInSeconds(),
                            script.Dataset(),
                            script.DatasetFolder(),
                            script.DatasetKind()
                               );
    
      executedSessions_o++;
      executingSessions_o++;
    }
  *]
}