Skip to content

Serenity JSON format

Download our example file here: example_serenity_report.json

Feature/User story

  • name Stored as container title.
  • description Stored as container description, the userStory narrative attribute is used if the description attribute isn't available.
  • testSteps We iterate through each test step and their children, the children are defined as the results and each test step as a container.
  • userStory The userStory type and narrative attribute is used for our containers. The classification can be set initially by the type, and the description can be set by the narrative attribute.
  • title Stored as the container title if the name isn't available.
  • tags ignored
  • startTime ignored
  • duration ignored, counted using child elements that are read as results.
  • driver Sets the report's OS attribute.
  • dataTable ignored
  • manual ignored
  • result ignored

Test step

A test step will be read as a container with multiple children. In serenity these children generally contain the results which will be processed by Calliope.

Elements

Depending on if the test step has children, it will be handled as a test step with results, or a test step with containers.

  • number ignored.
  • description: Used to specify the description of the container, initially this is set by the user story narrative attribute.
  • duration: ignored, the children are used to calculate the duration.
  • startTime ignored.
  • result: ignored
  • children We iterate through these children to retrieve the results, we do check whether these children contain children before we process all the results.

Children

Steps are rewritten as results

  • number: ignored.
  • description: Used as result title.
  • duration Used to set the estimated duration of the result.
  • startTime: ignored
  • result: Used to determine the status of the result.
    • success = passed
    • error = failed
    • skipped = skipped
    • pending = unknown
    • undefined = unknown
  • screenshots: This is expected to be an array with 2 values: {assetType: 'pathToFile.ext'}
"screenshots": [
  {
    "screenshot": "a7e5f5db308f5ad634db71636fc150ed.png",
    "htmlSource": "pagesource572884484075208602.html.txt"
  }
]