1

We use Xray for test case management and have automated few test cases. We use jenkins to execute the automated test cases and use the plugin to read the results xml file and update the test run. However, for every automated test case it created a new Xray test case. Is there a way to map every automated test case to existing test case in test execution?

2 Answers2

1

The ability of mapping automation results to a specific existing Test issue depends on the report format you use as detailed in the following link.

https://confluence.xpand-it.com/display/XRAY/Integrating+with+Testing+Frameworks

For example, with JUnit you cannot enforce a specific @Test annotated method to correspond to an existing Test issue (due to limitations of JUnit XML report format). However this is possible if you use TestNG, NUnit or Robot framework as shown in the following tutorials:

Last, you can also report results back to an existing Test issue if you use the Xray JSON format. More on that here

An example of Xray JSON report would be something like

{
    "testExecutionKey": "DEMO-1206",
    "info" : {
        "summary" : "Execution of automated tests for release v1.3",
        "description" : "This execution is automatically created when importing execution results from an external source",
        "version" : "v1.3",
        "user" : "admin",
        "revision" : "1.0.42134",
        "startDate" : "2014-08-30T11:47:35+01:00",
        "finishDate" : "2014-08-30T11:53:00+01:00",
        "testPlanKey" : "DEMO-100"
    },
    "tests" : [
        {
            "testKey" : "DEMO-6",
            "start" : "2014-08-30T11:47:35+01:00",
            "finish" : "2014-08-30T11:50:56+01:00",
            "comment" : "Successful execution",
            "status" : "PASS"
        }
     ]
}
Sérgio
  • 1,777
  • 2
  • 10
  • 12
0

Most likely the test cases you have created were not generic but manual type. Take a look at test definition of tests created by automated job. This definition must be copied to the actual test cases, but again, they need to be generic.

WerKop
  • 53
  • 1
  • 6