Open
Description
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 thestartTestItem
call fortype: '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!