saucelabs / sauce-cucumber-reporter

Cucumber Plugin to report your results directly to Sauce Labs
MIT License
0 stars 0 forks source link

Cucumber Html Report is not available in SauceLabs Automated Test Results WDIO via GitHub Actions #22

Closed smtripathi99 closed 3 weeks ago

smtripathi99 commented 1 month ago

Expected Behavior

Cucumber Html Report is available in SauceLabs Automated Test Results

Actual Behavior

Cucumber Html Report is not available in SauceLabs Automated Test Results

Steps to Reproduce the Problem

1.wdio.config.js

 framework: 'cucumber',
    reporters: ['spec',
        ['cucumberjs-json', {
            jsonFolder: './cucumber-reports/cucumber-json',
            language: 'en',
            reportFilePerRetry: true,
            requireModule: ['ts-node/register'],
            format: '@saucelabs/cucumber-reporter'
        }]
    ],
SauceRun
  1. Execute via npm test in GitHub Actions
  2. Check the SauceLabs report

log.json

logs_27.zip

Specifications

-node v18.17.0

alexplischke commented 3 weeks ago

This combination is not well supported for a few reasons—nor is it the plugin's original intent.

The plugin would not be aware of the following:

  1. That a WebDriver session is running that's targeting a Sauce Labs browser session. Cucumber is a test framework, so the plugin is unaware of the underlying automation that's being performed, after all, it receive test information from Cucumber and Cucumber is not aware of the automation process either.
  2. That another plugin is creating an artifact (e.g. HTML report) of interest.
smtripathi99 commented 3 weeks ago

Thank you @alexplischke for the update so in which scenario this plugin will work any use case or example would be helpful

alexplischke commented 3 weeks ago

It's primary use case is if you are not creating browser sessions with Sauce Labs. For instance, a user might have some pipelines that perform tests on a local grid in addition to Sauce Labs, but would still like to report the results to Sauce Labs, so that all test results are in the same place, achieving some degree of consistency.