Page History
...
Expand | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||
|
...
How results are mapped to Test entities
Whenever importing results from some frameworks (i.e. JUnit, TestNG, NUnit, Robot framework), Xray can identify the automated test from the report/results file, based on an hardcoded criteria (such as the class name plus the class method corresponding to the automated test). However, depending on the test automation framework, it's possible to specify the Test issue key to which report the results in the test's code.
This means that in some scenarios, Xray is able to create (Generic) Test entities, if needed. These may be used afterwards, based on their Generic Definition field, if results related with those automated tests are reported once again. However, as mentioned earlier, it's also possible to enforce the Test entity to which report to.
Whenever processing results from a automation framework, for For each automated test result,
- If the Test key is provided and...
- it exists, then create a Test Run for that Test
- it doesn't exist, then don't create any Test Run (since for some reason the explicitly identified Test does not exist)
- if no Test key is provided...
- try to find a Test in the identified project with the same Generic Test Definition (e.g. with the same class name+class method for example)
- if it exists, then create a Test Run for that Test
- if it doesn't exist, then search for a a Test with the same Generic Test Definition in all JIRA projects
- if it exists, then create a Test Run for that Test
- it doesn't exist, then create a Test in the identified project
- try to find a Test in the identified project with the same Generic Test Definition (e.g. with the same class name+class method for example)
For some frameworks, including Cucumber and Behave, Tests must exist previously to the submission of results related to them.
The reason for it,resides mainly in the fact that is not possible to create the complete Test specification from the results file.