"jasmine-node" is an implementation of Jasmine for Node.js and supports out-of-the-box JUnit reports.
- "jasmine-node", "express" and "request" node modules
This example is a simple Node.js web server tutorial from SemaphoreCI, based on the "express" node module.
It consists of two source files: one that basically returns an array of strings given a number, and another that implements the web server that processes an argument.
There are two jasmine-node "specs" containing the tests that validate the previous implementations.
In order to run the tests, we need first to run our basic web server in the background or in another console.
After running the tests and generating the JUnit XML reports (e.g., TEST-HelloWorldGenerator.xml, TEST-HelloWorldServer.xml), they can be imported to Xray (either by the REST API or through the Import Execution Results action within the Test Execution).
JUnit's Test Case is mapped to a Generic Test in Jira, and the Generic Test Definition field contains the value of the "it" concatenated with the several "describe"' that make up the test case.
The Execution Details of the Generic Test contains information about the Test Suite, which in this case corresponds to the concatenation of the test's "describe".