cypress-tm4j-reporter

1.4.1 • Public • Published

cypress-tm4j-reporter

Install

$ npm install cypress-tm4j-reporter --save-dev

Usage

Cypress Reporter Plugin

Not recommended for use. See Known Issues.
Example: cypress.json

{
  "projectId": "cypress-example",
  "reporter": "cypress-tm4j-reporter",
  "reporterOptions": {
    "baseUrl": "https://api.tm4j.smartbear.com/rest-api/v2",
    "authToken": "[READACTED]",
    "projectKey": "AQA"
  }
}

Cypress Module API

Programmatic execution example: cypress-cli.js

const cypress = require('cypress')
const {Tm4jUtils} = require('cypress-tm4j-reporter')

cypress.run({
    spec: './cypress/integration/example.spec.js'
}).then(results => {
    let tm4jutils = new Tm4jUtils(results.config.reporterOptions)
    tm4jutils.publishCypressCliResults(results).then(testRuns => {
        console.log("TM4J results published")
        testRuns.forEach(run => {
            console.log(run)
        })
    })
})
$ node cypress-cli.js

Reporter Options

Following reporter options are available:

  • baseUrl - base URL for API calls
    Example: https://api.tm4j.smartbear.com/rest-api/v2
  • authToken - Auth Token for TM4J for Cloud
  • projectyKey - Jira project key for test cases and test cycles
  • defaultTestCaseFolderId - Folder ID for automatically created test cases
  • createTestCases - create new test case if existing test case key not found
  • createTestCycles - create new test cycle if existing test cycle key not found
  • specMapping - define how *.spec.js files mapped to TM4J entitiesv
    Example: execution, cycle
  • cycleName - test cycle name for specMapping=execution
  • environmentProperty - populate Environment for execution with value from property with set name
    Example: environment (cypress run --env "environment=envcode")
  • debugOutput - debug output for reporter

Known Issues

Readme

Keywords

none

Package Sidebar

Install

npm i cypress-tm4j-reporter

Weekly Downloads

1

Version

1.4.1

License

ISC

Unpacked Size

43.6 kB

Total Files

19

Last publish

Collaborators

  • letsrokk