Skip to content

ibutsu/mocha-ibutsu-reporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mocha Ibutsu reporter

Exports results from Cypress test run and merges them into an XML file, which can be uploaded to Ibutsu.

Table of contents

Installation

npm install mocha-ibutsu-reporter

Usage

Generating test results

In your Cypress config file, set the reporter option to mocha-ibutsu-reporter. Files are by default exported to cypress/results/ directory and can be set by user using the outputDir option, the path is relative to the cypress config file.

JS configuration

const { defineConfig } = require('cypress')

module.exports = defineConfig({
  reporter: 'mocha-ibutsu-reporter',
  reporterOptions: {
    project: 'my-project',
    component: 'my-component',
    outputDir: 'results/',
  },
})

TS configuration

import { defineConfig } from 'cypress'

export default defineConfig({
  reporter: 'mocha-ibutsu-reporter',
  reporterOptions: {
    project: 'my-project',
    component: 'my-component',
    outputDir: 'results/',
  },
})

JSON configuration

{
  "reporter": "mocha-ibutsu-reporter",
  "reporterOptions": {
    "project": "my-project",
    "component": "my-component",
    "outputDir": "cypress/results/"
  }
}

Merging files

Results are merged using the merge-results command. If no output file is set, results are by default exported to .ibutsu.xml file with UUIDv4 set as its name, and can be found in the directory with individual result files. Any options set in the cypress config file can be overriden by passing options to the CLI program.

Options

Option Shorthand Description
config c Cypress config file
project p Name of the project
component m Name of the component
outputDir d Directory with tests results
source s Source from which test is run
environment e Environment the test is run in
output o Name of the merged file
verbose v Print merged results to console
help h Prints usage of the command

NOTE: For more information about the purpose of each field, see Ibutsu’s documentation

Example

merge-results -c cypress.json -e local -o ~/results/exported_results.xml

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages