Back to QMetry All Products Help Page
Test using JUnit
Introduction
JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks.
Based on your testing practices you can choose to create combination Test suite, Test Cases and Test Steps that will be created in QMetry after importing the automation result file. You need to provide a value in automationHierarchy parameter in Automation API - while importing the test results. Based on the table below the Test artifacts will be created in QMetry.
Automation Hierarchy Values | Following QMetry assets will be created and linked | Test Suite | Test Case | Test Step | |
---|---|---|---|---|---|
1 | Testsuite, Test Case, Test Step | Testsuite will be created based on testsuiteName parameter in Automation API or Auto generated if not mentioned. | <testsuite> tag : Parsed from the result file. Junit File Type 1: Wherein testsuite "name" matches the test case "classname".
| <testcase> tag under the <testsuite> tag : Parsed from the result file. classname.name() will be the Test Step Description. Execution Status in QMetry will be determined based on the result mentioned in the result file as shown below. | |
Tag inside <testcase> | Execution Status in QMetry | ||||
<failure> | Failed | ||||
no tags | Passed | ||||
<skipped> | Not Run | ||||
<testsuite> tag : Parsed from the result file. Junit File Type 2: Wherein testsuite "name" does not match the test case "classname".
| |||||
2 | Testsuite, Test Case | Testsuite will be created based on testsuiteName parameter in Automation API or Auto generated if not mentioned. | <testcase> tag under the <testsuite> tag : Parsed from the result file. classname.name() will be the Test Case summary. | NA | |
3 | Testsuite, Test Case | <testsuite> tag | <testcase> tag under the <testsuite> tag : Parsed from the result file. classname.name() will be the Test Case summary. | NA |
Supported Version: 1.2.5
Supported file types : XML
Sample Test Result File
Automation Hierarchy 1
JUnit File Type 1: Click here to download a sample file.
JUnit File Type 2: Click here to download a sample file.
Automation Hierarchy 2
Click here to download a sample file.
Automation Hierarchy 3
Click here to download a sample file.
→ “Skip” status in the automation result file will be applied as "Not Applicable" instead of "Not Run" for automation test executions upload into QMetry.
Back to QMetry All Products Help Page