Running tests using Protractor framework

If your testing framework is Protractor, the SeaLights agent integrates directly with it and reports the test results to the server directly.

See https://www.npmjs.com/package/sealights-protractor-plugin for details.

Protractor is deprecated and will reach end-of-life by Summer 2023. To learn more and find out about other options please refer to this post on the Angular blog: https://goo.gle/state-of-e2e-in-angular

It is important to notice that Protractor does not run the tests on itself but relies on a framework like Jasmine or CucumberJS for that purpose, as defined in its configuration. In order to fully integrate with Sealights, and depending on the framework in use, you’ll need to use the relevant complimentary Sealights plugin:

Installing Sealights plugin

npm install sealights-protractor-plugin

In your config file add the sealights plugin

plugins: [{ package: 'sealights-protractor-plugin', }

Using Sealights plugin with Protactor

From the command line, add sealights parameters with --sl- prefix

protractor protractor.conf.js --sl-tokenfile <path/to/token-file> --sl-buildsessionidfile <path/to/buildSessionId-file> --sl-labid <labid-shared-with-your-app-under-test> --sl-testStage e2e

Parameter

Description

Parameter

Description

sl-token

Access token generated from the SeaLights server

sl-tokenFile

Path to file containing access token generated from the SeaLights server

sl-buildSessionId

Session ID of configuration created

sl-buildSessionIdFile

Path to file containing the Session ID of configuration created

sl-testStage

Name of the test stage

sl-labid

Unique ID for a set of test labs in case multiple labs are running simultaneously

sl-proxy

Address of proxy to run connection through