cypress-testrail-simple is a Cypress plugin designed for straightforward integration with TestRail, enabling the simple upload of Cypress test results. The current stable version is `3.3.63`, with a frequent release cadence, often issuing bug fixes and dependency updates every few days to weeks, indicating active maintenance. This library distinguishes itself by offering a simple, environment variable-driven configuration for TestRail integration, making it easy to set up for CI/CD pipelines. It provides programmatic hooks for Cypress's `setupNodeEvents` to automatically send test outcomes to a specified TestRail project and suite. Additionally, it offers `npx` commands for managing TestRail runs, such as `testrail-start-run`, which can initiate a new run, optionally filtering by specific test case IDs extracted from Cypress spec files.
npm install cypress-testrail-simpleVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to configure `cypress-testrail-simple` in `cypress.config.js` for Cypress v10+ and how to set up the necessary environment variables for TestRail integration.
For Cypress v10+, integrate the plugin within the `e2e.setupNodeEvents` or `component.setupNodeEvents` function in `cypress.config.js`. For older versions, use `cypress/plugins/index.js`.
Ensure all required `TESTRAIL_` environment variables are set in your execution environment (e.g., CI, local shell, or via `cypress.env` in `cypress.config.js`). API keys are preferred over passwords for `TESTRAIL_PASSWORD`.
Always use `require('cypress-testrail-simple/src/plugin')` as shown in the documentation for integrating the plugin into `setupNodeEvents`.Run `npm install -D cypress-testrail-simple` or `yarn add -D cypress-testrail-simple`. Double-check the path in `cypress.config.js` matches `require('cypress-testrail-simple/src/plugin')`.Verify `TESTRAIL_USERNAME` and `TESTRAIL_PASSWORD` (or API key) environment variables are correct and have appropriate permissions for the TestRail instance.
Confirm that `TESTRAIL_PROJECTID` matches a valid project ID in your TestRail instance and that the configured user has access to it.