Page History
Overview
In this tutorial, we will create some tests in JavaScript using CodeceptJS and we'll use mocha-junit-reporter to generate a compatible JUnit XML report.
Requirements
- codeceptjs
- webdriverio
- selenium-standalone
- mocha-junit-reporter
...
No Format |
---|
npm install -g codeceptjs npm -g install webdriverio@^4.0.0 npm i -g mocha-junit-reporter npm install -g selenium-standalone selenium-standalone install selenium-standalone start |
Code
The following code and the setup instructions were inspired on CodeceptJS startup tutorial.
...
No Format |
---|
codeceptjs run --reporter mocha-junit-reporter |
Each Scenario JUnit's Test Case is mapped to a Generic Test in Jira, and the the Generic Test Definition field field contains the name of the test Scenario concatenated with the alias of each test case "assert" statement.name of the Feature.
The Execution Details of the Generic Test contains information about the Test Suite, which in this case corresponds to the description name of the first "describe"Feature.