webdriverio
webdriverio copied to clipboard
[🐛 Bug]: <Scenarios with duplicated steps not failing>
Have you read the Contributing Guidelines on issues?
- [X] I have read the Contributing Guidelines on issues.
WebdriverIO Version
8.35.1
Node.js Version
10.9.2
Mode
WDIO Testrunner
Which capabilities are you using?
browser: chrome-124.0.6367.118
windows 11
What happened?
Running tests with Cucumber, a duplicated step definition is causing the following behavior on Allure Report:
- Test suddenly stops right after start execute duplicated step
- Test pass successfully
- All the remaining steps are skipped
What is your expected behavior?
Catch the error and print the cause in the log file, example: "Test has failed due following duplicated step! 'Step:I add attribute on xxxx Sidebar'"
How to reproduce the bug.
- Create a project with cucumber and Allure
- Create 2 step definitions with the same name
- Create 2 scenarios at least
- Add the duplicated steps on scenarios
- Run all the scenarios using the duplicated steps
- Run allure command to generate the report
Relevant log output
N/A
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- [X] I have searched the existing issues
Thanks for reporting!
We greatly appreciate any contributions that help resolve the bug. While we understand that active contributors have their own priorities, we kindly request your assistance if you rely on this bug being fixed. We encourage you to take a look at our contribution guidelines or join our friendly Discord development server, where you can ask any questions you may have. Thank you for your support, and cheers!
Hi @josiasvfigueredo1985, I tried to reproduce your issue. I had the error below in execution terminal and in allure report :
[chrome 127.0.6533.100 Windows 10 #0-0] Multiple step definitions match:
[chrome 127.0.6533.100 Windows 10 #0-0] Multiple step definitions match:
[chrome 127.0.6533.100 Windows 10 #0-0] I fail test - file:\C:\2-gitlab\end-to-end-tests-wdio\src\steps\given.js:84
[chrome 127.0.6533.100 Windows 10 #0-0] I fail test - file:\C:\2-gitlab\end-to-end-tests-wdio\src\steps\given.js:89
In allure
"status": "broken",
"statusDetails": {
"message": "Multiple step definitions match:",
"trace": "Multiple step definitions match:\n I fail test - file:\\C:\\2-gitlab\\end-to-end-tests-wdio\\src\\steps\\given.js:84\n I
fail test - file:\\C:\\2-gitlab\\end-to-end-tests-wdio\\src\\steps\\given.js:89"
},
I think this error displayed matches with your expected behavior, isn't it? Or you have another behavior
Yes, that's the expect behavior, thank you!!!!
So, can we close this issue?
I think we can, thanks for the investigation @lacell75 🙏
Thanks for raising this issue 🙏
Unfortunately we can't help you without a reproducible example in this matter. Please read our contributing guidelines on how to create a reproducible example. If you can't provide a reproducible example we will close this issue in 7 days.
If you have any questions please reach out to us on our Discord channel. We are happy to help you out there.