Introduction
TestNG is a testing framework designed to simplify a broad range of testing needs, from unit testing (testing a class in isolation of the others) to integration testing (testing entire systems made of several classes, several packages and even several external frameworks, such as application servers).
Writing a test is typically a three-step process:
- Write the business logic of your test and insert TestNG annotations in your code.
- Add the information about your test (e.g. the class name, the groups you wish to run, etc...) in a testng.xml file or in build.xml.
- Run TestNG.
Here is how you can specify the Test Cases and Test Steps which will be created in QMetry as a part of the result files.
Test Case | Test Step Tag |
---|---|
<test> tag under the <suite> tag will be considered as Testcase. 'name' attribute of <test> tag will be used as testcase summary. | <test-method> tag under <class> tag (with attribute "is-config" not set as true) will be considered as Testcase step. 'name' attribute of <test-method> tag will be used as testcase step description. |
Supported Version: 1.2.5
Supported file types : XML
Sample Test Result File
Test Case Reusability
While importing test result file, if you want us to reuse Test Case then it is possible.
- If Test case summary and Test step summary (for all steps) matches with the automated Test case name ( test > name) and steps (test-method > name), Test case key and version will be reused.
- If Test case summary matches and Test step summary do not match (for any of the steps) with the automated Test case ( test > name), Test case key will be reused but new version will be created.
- If Test case summary does not match, new Test case will be created.