lazhen
2025-01-09 8afe90b633046db39042aada36b88193062f8cff
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
Quintiq file version 2.0
#parent: #root
Method PTF_TestMethodTemplate (
  output Real duration_o,
  output String response_o
) as Boolean id:Method_LibPTF_pnlTestRunner_PTF_TestMethodTemplate
{
  #keys: '[104342.0.795231983]'
  Body:
  [*
    // Serves as a template method for QSes to implement the method to be executed
    isSuccessful := false;
    
    preconditionOK := true; // Your precondition for executing the action
    
    if( preconditionOK )
    {
      start := OS::PrecisionCounter();
    
      // Call your method here
      // Use the following construct if you want to execute a server method
      // this.PTF_GetPTF().<Your method>
    
      // Call the following statement if the action is asynchronous
      // this.PTF_ExecutePreAsyncAction();
    
      duration_o   := this.PTF_GetDurationInMilisecond( start );
      response_o   := '<Trace information about the action>';
      isSuccessful := true;
    }
    else
    {
      response_o := '< Precondition failed reason >'; // Your precondition failed reason
    }
    
    return isSuccessful;
  *]
}