You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by devrajshetake March 11, 2024
I am using Cucumber and Playwright with typescript to run my BDD tests. The allure report I am generating contains all the executed scenarios, but it does not contain the scenarios which are not executed. A BeforeAll hook runs before execution of all the scenarios within a tag, the problem arises when the BeforeAll hook fails for some reason, all the scenarios within this tag wont be executed, so they wont be mention in the report. Due to this, the total number of scenarios within my test suit are being displayed less in the report. I want the unexecuted scenarios to be mentioned in the allure report. Is there a way to do so? Please help.
The text was updated successfully, but these errors were encountered:
@devrajshetake Currently, exceptions in BeforeAll aren't handled properly by cucumberjs
Error: Unexpected error on worker.receiveMessage
at exit (node_modules/@cucumber/cucumber/lib/runtime/parallel/run_worker.js:11:27)
at node_modules/@cucumber/cucumber/lib/runtime/parallel/run_worker.js:24:31 {
[cause]: Error: a BeforeAll hook errored on worker 2, process exiting: features/support/beforeAllFailure.js:3
at Worker.runTestRunHooks (@cucumber-cucumber-npm-10.8.0-3268c4cd89-537bd8b891.zip/node_modules/@cucumber/cucumber/lib/runtime/run_test_run_hooks.js:24:23)
at async Worker.initialize (@cucumber-cucumber-npm-10.8.0-3268c4cd89-537bd8b891.zip/node_modules/@cucumber/cucumber/lib/runtime/parallel/worker.js:53:9)
at async Worker.receiveMessage (@cucumber-cucumber-npm-10.8.0-3268c4cd89-537bd8b891.zip/node_modules/@cucumber/cucumber/lib/runtime/parallel/worker.js:62:13) {
[cause]: Error: before all error
I would suggest you avoid throwing exceptions in BeforeAll hooks, instead, you can use world parameters to pass the error to before hook and throw an exception in there:
Discussed in https://github.com/orgs/allure-framework/discussions/2410
Originally posted by devrajshetake March 11, 2024
I am using Cucumber and Playwright with typescript to run my BDD tests. The allure report I am generating contains all the executed scenarios, but it does not contain the scenarios which are not executed. A
BeforeAll
hook runs before execution of all the scenarios within a tag, the problem arises when theBeforeAll
hook fails for some reason, all the scenarios within this tag wont be executed, so they wont be mention in the report. Due to this, the total number of scenarios within my test suit are being displayed less in the report. I want the unexecuted scenarios to be mentioned in the allure report. Is there a way to do so? Please help.The text was updated successfully, but these errors were encountered: