Delta Reporter Reporter
wdio-delta-reporter-service is a 3rd party package, for more information please see GitHub | npm
A WebdriverIO reporter plugin to create Delta reports

Installation#
The easiest way is to keep @delta-reporter/wdio-delta-reporter-service as a devDependency in your package.json.
You can simple do it by:
Configuration#
Delta reporter WebdriverIO plugin consists of a mix between a WebdriverIO Service and Reporter, so it needs to be declared as a reporter and as a service in config file.
Add screenshots and videos#
Screenshots can be attached to the report by using the sendFileToTest command in afterTest hook in wdio config file. The parameters are type, file and description:
type: Can beimgorvideofile: Path to the file to be uploadeddescription: Optional value that will be displayed in the media container in Delta Reporter
As shown in the example above, when this function is called, adn the test is failing, a screenshot image will be attached to the Delta report.
Below is an example of all pieces needed in wdio config file to use this plugin along with Video Reporter, so that Delta Reporter is showing screenshots and videos of failed tests:
Usage#
For each test run, Delta plugin is listening for DELTA_LAUNCH_ID. There are two main cases:
Local run: No need to do anything, you can just run your wdio command (
./node_modules/.bin/wdio ./wdio.conf.js) and DELTA_LAUNCH_ID will be generated automatically for you, so your test results appear in Delta Reporter in real time.CI run: If it's your tests job, you will have to define DELTA_LAUNCH_ID as a parameter. Then inside your stage you will need to initialize it by calling a
/api/v1/launchendpoint, then running your tests withDELTA_LAUNCH_ID=${DELTA_LAUNCH_ID}pre-pending. The initialization is done once, so when you are running multiple test types in the same build (say, UI tests, API tests, Unit tests), those tests are gathered under one "Launch" on Delta Reporter.
Below is an example of code for config file for Jenkins job:
Sending extra data to Delta Reporter#
Its possible to send custom data to be displayed into Delta Reporter using the SmartLinks feature.
For this use the commands browser.sendDataToTest or sendDataToTestRun, depending on the place where you want to show this information
These methods accept a jsonify object as argument
Example of integration with Spectre
Then on Delta Reporter, a SmartLink with {spectre_test_run_url} can be created for the test run
For more information about Smart Links, please check Delta Reporter docs