SysTestRunner Class [AX 2012]

The SysTestRunner class simplifies test execution.

class SysTestRunner

Run On

Called

  MethodDescription
Gg966205.protmethod(en-us,AX.60).gif applyGlobalParameters For internal use.
Gg966205.pubmethod(en-us,AX.60).gif applyParameters Assigns values to parameters.
Gg966205.pubmethod(en-us,AX.60).gif cancelTimeOut Cancels a previous method call to the setTimeOut method. (Inherited from Object.)
Gg966205.pubmethod(en-us,AX.60).gif equal Determines whether the specified object is equal to the current one. (Inherited from Object.)
Gg966205.pubmethod(en-us,AX.60).gif getNumberOfTests Returns the number of tests in the test runner suite.
Gg966205.pubmethod(en-us,AX.60).gif getResult Returns a valid instance of the SysTestResult class.
Gg966205.pubmethod(en-us,AX.60).gif getSummary Returns the result summary.
Gg966205.pubmethod(en-us,AX.60).gif getTimeOutTimerHandle Returns the timer handle for the object. (Inherited from Object.)
Gg966205.pubmethod(en-us,AX.60).gif handle Retrieves the handle of the class of the object. (Inherited from Object.)
Gg966205.pubmethod(en-us,AX.60).gif new Creates a new test runner instance.
Gg966205.pubmethod(en-us,AX.60).gif notify Releases the hold on an object that has called the wait method on this object. (Inherited from Object.)
Gg966205.pubmethod(en-us,AX.60).gif notifyAll Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.)
Gg966205.pubmethod(en-us,AX.60).gif objectOnServer Determines whether the object is on a server. (Inherited from Object.)
Gg966205.pubmethod(en-us,AX.60).gif owner Returns the instance that owns the object. (Inherited from Object.)
Gg966205.pubmethod(en-us,AX.60).gif run Runs the current test.
Gg966205.pubmethod(en-us,AX.60).gif setTimeOut Sets up the scheduled execution of a specified method. (Inherited from Object.)
Gg966205.pubmethod(en-us,AX.60).gif toString Returns a string that represents the current object. (Inherited from Object.)
Gg966205.pubmethod(en-us,AX.60).gif usageCount Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.)
Gg966205.pubmethod(en-us,AX.60).gif wait Pauses a process. (Inherited from Object.)
Gg966205.pubmethod(en-us,AX.60).gif xml Returns an XML string that represents the current object. (Inherited from Object.)
Gg966205.pubmethod(en-us,AX.60).gif Gg966205.static(en-us,AX.60).gif ::createSuiteForClass Creates a test suite for the test class.
Gg966205.pubmethod(en-us,AX.60).gif Gg966205.static(en-us,AX.60).gif ::createTestRunner Returns a test runner instance for the specified test name or test project name.
Top

The following example demonstrates the simplification of a test execution by using the SysTestRunner class.

static void main(args _args) 
{ 
    // Create a SysTestRunner instance for the test class.  
    SysTestRunner runner = new SysTestRunner(classStr(NameOfTest)); 
 
    // Specify that the XML output will be written to the 
    // default log folder. 
    SysTestListenerXML listener = new SysTestListenerXML( 
    xInfo::directory(DirectoryType::Log));
 
    // Add the listener and run the test case. 
    runner.getResult().addListener(listener); 
    runner.run(); 
}

Community Additions

ADD
Show: