Application Platform 10.7 | Application Platform API | Generating Tests with the Application Platform Integration Test Framework | Parameterized Tests
 
Parameterized Tests
Use the following classes when you create parameterized tests.
AppPlatformIntegrationTestWithParameters
The com.softwareag.applatform.sdk.test.framework.AppPlatformIntegrationTestWithParameters class is a convenience abstract base class, from which your test classes can inherit when you create parameterized tests.
This class provides no-op implementation, which can be overridden, for the methods, listed in the following table. The table shows the annotation name for each method name.
Annotation Name
Method Name
@BeforeClass
setupClass
@AfterClass
destroyClass
@Before
setup
@After
Destroy
ParameterizedIntegrationTestRunner
The com.softwareag.applatform.sdk.test.framework.ParameterizedIntegrationTestRunner class is a custom JUnit runner that supports running parameterized tests in the Application Platform integration test framework. This class is activated through the @RunWith annotation.
If you use the AppPlatformIntegrationTestWithParameters class as the base class of your tests, you do not have to use this class directly in your test class. You need to use the ParameterizedIntegrationTestRunner class only if your test class already extends from another base class and it cannot extend from AppPlatformIntegrationTestWithParameters.
The ParameterizedIntegrationTestRunner class performs the following key steps:
1. Validates that the test class contains the @Parameters annotation on a method that provides the test data.
2. For each set of parameters in the test data, creates an instance of the other child runner that is responsible for running the test methods in the test class.
3. Sets the name of the test by using the name attribute of the @Parameters annotation.
4. Executes the child test runner.