Support for Test Data in TestNG

QAS now supports Test Data in TestNG projects to make use of test data in test cases. Test Data replaces variables with the value from the table.


1. Create a TestNG project. Refer to Setup Projects for more details.





2. Create a test suite and record a test case in it.

3. To create Test Data for the test case, click Test Data and select Example.




The Test Data Linked button is displayed on the screen.

4. Click on the Test Data Linked button.



5. Add Column with desired Name to the test data.



6. Add Values to the column using the Add button.



7. Replace input field values with placeholder. Refer to Manage Test Data for more details on Test Data.

Syntax of placeholder: ${column_name}


8. Click on the Code tab to view the code of the test case.



9. Export the test case code.



10. The code is exported with test data in your .java file.