JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q47294F
  • License ISC

This is a simple module designed to easily upload information about tests to a testrail. The module does not use asynchronous requests and you can easily inject methods into the Cypress context.

Package Exports

  • tr_cypress_reporter_simple
  • tr_cypress_reporter_simple/reporter/TestRaiImporter.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tr_cypress_reporter_simple) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

TestRail reporter for Cypress

Updates

Version 0.7.0

  • Added new methods:
let tr = new TestRaiImporter(run_data);

// Save run data to the local folder 
tr.saveArtifact('./artifact/')

// Get saved data and deploy to TR 
tr.updateSuiteCasesFromArtifacts('./artifact/');

// Update satuses from file 
tr.importStatusesToNewRunFromArtifacts(false, './artifact/');
  • Import optimization

Version: 0.5.0

  • Optimize imports data to TR
  • Optimize all requests

Version: 0.2

  • Optimize imports data to TR
  • Fix upload non-exist images
  • Removing not used requests from importer

First step:

The first step is to enable the experimental Cypress feature: "experimentalRunEvents": true Then you need to add a new event to cypress/plugins/index.js

on('after:run', (run, results) => {
})

Now receive data from a Run object.

Next step:

  • add the tr_credentials.json file to the project root
{
  "host": "https://<name>.testrail.net",
  "username": "",
  "password": "",
  "project_name": "",
  "suite_name": ""
}
  • Add to the new event:
const TestRaiImporter = require("tr_cypress_reporter_simple");
****
on('after:run', (run, results) => {
    let tr = new TestRaiImporter(run);
    tr.updateSuiteCases();
    tr.importStatusesToNewRun();
})
  • You can also close RUN. If you leave the parameter empty, RUN will not be closed.
const TestRaiImporter = require("tr_cypress_reporter_simple");
****
on('after:run', (run, results) => {
    let tr = new TestRaiImporter(run);
    tr.updateSuiteCases();
    tr.importStatusesToNewRun(true);
})

The data will be sent only after starting RUN.