Insomnia integration with xray and jenkins

193 Views Asked by At

Just a question about insomnia API testing, is it possible to run the tests integrated with jenkins and jira xray?

There doesn't seem to be a lot of information about how to run the tests automated or if its possible to integrate with xray (needed for audit purposes).

1

There are 1 best solutions below

0
Sérgio On

To run the tests with Insomnia you can use the inso CLI tool.

inso run test

The challenge is that inso doesn't provide a way to generate a reporter that Xray can handle, such as the popular JUnit XML report format. There has been some discussion on the Insomnia community project to provide custom reporters, like the mocha-junit-reporter, but it is not yet possible.

inso can produce a "spec" kind of reporter, using the default spec reporter. One way to move forward would be to convert that output to a JUnit XML report. Then, to submit the JUnit XML report would be possible using the Jenkins plugin, or even by invoking Xray's REST API and submiting it to the Junit XML specific endpoint.

curl -H "Content-Type: multipart/form-data" -u admin:admin -F "[email protected]" http://yourserver/rest/raven/1.0/import/execution/junit?projectKey=XTP