Cypress

Use the installation instructions below if you're using Cypress as your testing framework and would like to add your existing tests to Helios for complete E2E troubleshooting.

Instrument existing tests

Navigate to your project's root directory, and install the latest Helios OpenTelemetry SDK:

npm install --save @heliosphere/opentelemetry-sdk

In your test file, paste the following code snippet before ALL other imports:

const { initialize } = require('@heliosphere/cypress-sdk');

initialize({ apiToken: <API_TOKEN> });
import { initialize } from '@heliosphere/cypress-sdk';

initialize({ apiToken: <API_TOKEN> });

In your Cypress plugins.js file, embed the following snippet:

const { printHeliosUrl } = require('@heliosphere/cypress-sdk');

module.exports = (on, config) => {
    on('task', {
        printHeliosUrl
    });
};

Configuring CI parameters

In order to provide the CI context of your Cypress tests, add the following attributes to the initialize function call:

const { initialize } = require('@heliosphere/cypress-sdk');

initialize({
    apiToken: <API_TOKEN>,
    ciJobId: <CI_JOB_ID>, // Optional
    ciJobName: <CI_JOB_NAME>, // Optional
    ciJobUrl: <CI_JOB_URL>. // Optional
 });

πŸ‘

All set

Now when you run your tests - the results will show up in the Helios application.

Read more about the challenges distributed architectures present to UI testing tools and how Helios solves them with E2E visibility using context propagation.


Did this page help you?