web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

Test Suites

Hossein.K Profile Picture Hossein.K 6,648
Collections of tests can also be created with X++ code. These collections extend
the
SysTestSuite class, and are referred to as Suites.
Use the following procedure to create a test suite class:


1. In the
AOT, create a new Class.

2. Open the new class in the Code Editor.


3. Edit the
ClassDeclaration so that the class extends the SysTestSuiteclass.

4. Override the
new method on the class.

5. In the
new method, call the add method to add test cases to the suite,
as shown.



1
2
3
4
5
6
7
8
9
public void new()
{
// Create an instance of a test suite.
SysTestSuite suiteDictTableTest = new
SysTestSuite(classstr(SysDictTableTest));

super();
this.add(suiteDictTableTest);
}

The setUp and tearDown methods can also be used in the scope of a Test Suite.
Both methods are available to override on any class extending the
SysTestSuiteclass. In this way, the setting up of data and variables can be done before the
entire suite of tests is run.


Best Regards,
Hossein Karimi

Comments

*This post is locked for comments