Mochawesome JSON format¶
Download example file (right-click "Save link as..." to download): example_mochawesome_report.json
resultsWe iterate through each element and define them as suite objects, which are processed as containers.
A suite will be read as a container, this suite can contain suites and also tests.
titleDefines the title of the container.
suitesIterates through the suites and creates containers of them.
testsTests contain the results of a suite, when iterated through each result is processed and stored in the report.
beforeHooksContains test results which are processed.
afterHooksContains test results which are processed.
Steps are rewritten as results
title: Used as result title.
fullTitle: Used as description for the result.
duration: Used to set the estimated duration of the result.
pass: Used to define the status of a result.
fail: Used to define the status of a result.
skipped: Used to define the status of a result.
pending: Used to define the status of a result.
err: Used to set the exception message, stacktrace and json_data of a result.
Linking your scenario's to JIRA¶
This functionality is not there yet, but it is in the pipeline!
By adding a tag to your scenario saying:
@jira_issue_PROJ-201 it will be read as a ticket PROJ-201 to be linked to your scenario.
You can set up your profile to be linked to a JIRA account.