Skip to content

Support for Adding Attributes to Scenario (Test) Items in WDIO Cucumber Agent #70

Open
@DorAzouri-tipalti

Description

@DorAzouri-tipalti

Problem

Currently, the WDIO agent for ReportPortal (@reportportal/agent-js-webdriverio) does not support adding attributes to scenario (test) items. Attributes are only supported at the launch and feature (suite) levels.

Why this matters

  • Many teams use Cucumber tags (e.g., @tag) to annotate scenarios with metadata.
  • It is very useful to have these tags appear as attributes on the scenario (test) level in ReportPortal, for filtering, reporting, and analytics.

Request

Please add support for passing attributes to scenario (test) items, either by:

  • Allowing the attributes field in the startTestItem call for type: 'TEST', or
  • Providing a public API (like ReportingApi.addAttributes()) that works at the scenario level.

what need to do:
add those line in reporter.ts:
const isCucumberScenario = suiteStats.type === CUCUMBER_TYPE.SCENARIO;
if (isCucumberScenario && suiteStats.tags.length > 0) {
suiteDataRQ.attributes = parseTags(suiteStats.tags);
}
if (isCucumberScenario && suiteStats.description) {
suiteDataRQ.description = suiteStats.description;
}

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions