JSPM

  • Created
  • Published
  • Downloads 485
  • Score
    100M100P100Q119346F
  • License UNLICENSED

Package Exports

  • @deploysentinel/cypress-debugger
  • @deploysentinel/cypress-debugger/dist/support.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 (@deploysentinel/cypress-debugger) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

DeploySentinel Cypress Debugger

Enables viewing/debugging Cypress runs from remote environments (ex. CI) with debug information you're used to having locally.

Installation

Install the Cypress plugin into your Cypress project.

npm install @deploysentinel/cypress-debugger

Usage

Add Suport File

In your Cypress project's support file (ex. cypress/support/index.js) add:

// Add this line
import "@deploysentinel/cypress-debugger/support";

...
import "./commands";

Add Plugin

In your Cypress project's plugin file (ex. cypress/plugins/index.js) add:

module.exports = (on, config) => {
  // Add this line to the existing export
  require("@deploysentinel/cypress-debugger/plugin")(on);
};

Add API Key

Lastly, add your API key to a deploysentinel_key Cypress environment variable. This can be done in a few different ways:

Option 1. Cypress Config File

In your cypress.json file add:

{
  ...
  "env": {
    ...
    "deploysentinel_key": "YOUR_API_KEY"
  }
}

Option 2. OS Environment Variable

In your environment export an OS environment variable

CYPRESS_DEPLOYSENTINEL_KEY=YOUR_API_KEY

Option 3. Cypress CLI Flag

cypress run --env deploysentinel_key=YOUR_API_KEY

Verifying Everything Works Locally

======================================
TODO: UPDATE WITH PROPER INSTRUCTIONS ONCE WE GET THE FLAG IMPLEMENTED
======================================

By default, the plugin does not run in interactive mode. To debug if the plugin is working properly locally, you can either:

Option 1. Run Cypress in non-interactive mode. Example: cypress run ...

Option 2. Specify an env var to force the plugin to run in interactive mode via setting CYPRESS_DEPLOYSENTINEL_FORCE_RECORD to true. Example: CYPRESS_DEPLOYSENTINEL_FORCE_RECORD=true cypress open ....

Viewing Test Results

By default, failed tests will have the run URL available in the console log next to the run failure logs. This can be accessed in your CI logs.

Otherwise, runs can be viewed from the DeploySentinel Dashboard at https://deploysentinel.com/ci-dashboard.

Note: By default, the plugin will not upload any data when tests are run in interactive mode. See "Verifying Everything Works Locally" above for more information.