BorisOsipov / wdio-reportportal-reporter

A WebdriverIO plugin. Report results to Report Portal.
MIT License
23 stars 29 forks source link

Can tests correspond to scenarios , not steps #130

Closed HardKode closed 4 years ago

HardKode commented 4 years ago

The problem

Actually a question / enhancement request I am using wdio with cucumber , reporting to a report portal server . As of now , the scenario steps are reported as tests where I was expecting it to be scenario based .

Environment

Details

Code To Reproduce Issue [ Good To Have ]

BorisOsipov commented 4 years ago

@HardKode have you tried with cucumberNestedSteps: true config option? and what is your RP version?

HardKode commented 4 years ago

Report portal : Build: 5.2.2 yes, I have , my config looks like this : ( ps: i am using a proper token) { "reportPortalClientConfig": { "token": "00000000-0000-0000-0000-00000000000", "endpoint": "", "launch": "automationtests-launch", "project": "automationtests", "description": "auto tests", "mode": "DEFAULT", "debug": false, "tags": [ "local-automationtests", { "key":"suite", "value":"regression" }

  ]
},
"reportSeleniumCommands": false,
"seleniumCommandsLogLevel": "debug",
"screenshotsLogLevel": "info",
"parseTagsFromTestTitle": true,
"autoAttachScreenshots": true,
"cucumberNestedSteps": true,
"autoAttachCucumberFeatureToScenario": true

}

BorisOsipov commented 4 years ago

@HardKode can you share screenshot from RP with comments what is wrong? I can't understand what is the issue

HardKode commented 4 years ago

image

HardKode commented 4 years ago

if you look at the total , it says 2 , i only have one scenario in that simple test

HardKode commented 4 years ago

When i look at the base JS agent : https://github.com/reportportal/agent-js-cucumber , there is section that suggest you can change what is a test : steps or scenarios .

Step reporting configuration By default, this agent reports the following structure:

feature - SUITE scenario - TEST step - STEP You may change this behavior to report steps to the log level by enabling scenario-based reporting:

feature - TEST scenario - STEP step - log item To report your steps as logs, you need to pass an additional parameter to the agent config: "scenarioBasedStatistics": true

{ "scenarioBasedStatistics": true } This will report your your steps with logs to a log level without creating statistics for every step.

BorisOsipov commented 4 years ago

@HardKode update wdio-reportportal-reporter to 5.2.6 and wdio-reportportal-service to 5.2.5

5.2.3 doesn't support cucumberNestedStep.

image

HardKode commented 4 years ago

hi @BorisOsipov , thanks . I will proceed with those updates and report back . You have been incredibly responsive , appreciate it

HardKode commented 4 years ago

Hello @BorisOsipov . I can confirm that the version update was effective and I seem to now receive scenario based tests. Thanks again

BorisOsipov commented 4 years ago

OK close then