Failure with exception when using cypress-allure-plugin with @badeball/cypress-cucumber-preprocessor
See original GitHub issueDescribe the bug When attempting to use cypress-allure-plugin with cypress-cucumber-preprocessor an exception is thrown causing the first test to fail and cypress appears to hang. Hence no allure-results are generated
To Reproduce
- clone my example repo here badeball-cypress-cucumber-allure-issue
- npm install
- npm run cy:open and run all tests
- open the developer tools window and see stacktrace
Uncaught TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.
> Cannot read properties of undefined (reading 'keyword')
When Cypress detects uncaught errors originating from your application it will automatically fail the current test.
This behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.
at CucumberHandler.checkLinksInExamplesTable (https://duckduckgo.com/__cypress/tests?p=cypress\support\index.ts:1862:43)
at Runner.eval (https://duckduckgo.com/__cypress/tests?p=cypress\support\index.ts:2878:39)
From previous event:
at onNext (https://duckduckgo.com/__cypress/runner/cypress_runner.js:185685:19)
at done (https://duckduckgo.com/__cypress/runner/cypress_runner.js:129431:5)
at https://duckduckgo.com/__cypress/runner/cypress_runner.js:129496:11
From previous event:
at callFn (https://duckduckgo.com/__cypress/runner/cypress_runner.js:129494:14)
at Test.../driver/node_modules/mocha/lib/runnable.js.Runnable.run (https://duckduckgo.com/__cypress/runner/cypress_runner.js:129478:7)
at https://duckduckgo.com/__cypress/runner/cypress_runner.js:185755:30
From previous event:
at Object.onRunnableRun (https://duckduckgo.com/__cypress/runner/cypress_runner.js:185740:19)
at $Cypress.action (https://duckduckgo.com/__cypress/runner/cypress_runner.js:174847:28)
at Test.Runnable.run (https://duckduckgo.com/__cypress/runner/cypress_runner.js:183404:13)
at Runner.../driver/node_modules/mocha/lib/runner.js.Runner.runTest (https://duckduckgo.com/__cypress/runner/cypress_runner.js:130150:10)
at https://duckduckgo.com/__cypress/runner/cypress_runner.js:130276:12
at next (https://duckduckgo.com/__cypress/runner/cypress_runner.js:130059:14)
at https://duckduckgo.com/__cypress/runner/cypress_runner.js:130069:7
at next (https://duckduckgo.com/__cypress/runner/cypress_runner.js:129971:14)
at https://duckduckgo.com/__cypress/runner/cypress_runner.js:130037:5
at timeslice (https://duckduckgo.com/__cypress/runner/cypress_runner.js:123963:27)
Expected behavior A successful test run with allure-results.
Test code to reproduce
badeball-cypress-cucumber-allure-issue
See README.md to see steps to duplicate
Environment (please complete the following information):
- Cypress version: 9.6.1
- OS: Windows 11
- Node version: v14.17.3
Additional context I originally created an issue for cypress-cucumber-preprocessor here 714
Note this comment on the issue: https://github.com/badeball/cypress-cucumber-preprocessor/issues/714#issuecomment-1128134280
Issue Analytics
- State:
- Created a year ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
Issues · badeball/cypress-cucumber-preprocessor - GitHub
Run cucumber/gherkin-syntaxed specs with Cypress. Contribute to badeball/cypress-cucumber-preprocessor development by creating an account on GitHub.
Read more >Module '@badeball/cypress-cucumber-preprocessor' has no ...
I am trying to import "And" keyword from @badeball/cypress-cucumber-preprocessor so I can use it in Cypress/Cucumber, but I get this error.
Read more >@badeball/cypress-cucumber-preprocessor - npm
This preprocessor aims to provide a developer experience and behavior similar to that of Cucumber, to Cypress. ℹ️ The repositor has recently ...
Read more >Plugins - Cypress Documentation
Plugins provide a way to support and extend the behavior of Cypress. Follow these instructions to submit your own plugin. Looking for the...
Read more >Cypress Cucumber via Cucumber JSON report - AIO Tests
For the current example we would be using webpack. Sample package.json dependencies. 1"dependencies": { 2 "@badeball/cypress-cucumber-preprocessor": ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi!
I updated allure plugin to v2.27.0 and @badeball/cypress-cucumber-preprocessor to v11.3.1
Some tests are passing, but some don’t and I get this error message:
Error points at approximately this line I think it doesn’t pass for scenarios that have Background like this:
When I remove Background it works fine
If u need more details, I can search for it
Cypress version: 9.7.0 OS: Win 10, but running in WSL Node version: 16.13.2
Hi. This issues are not related at all and will be worked out separately.
Regarding this one I see that new implementation of cucumber-preprocessor exposes different format of internal information. Thanks to @pwpatton example repo I can try to add new format support as currently I have not managed to make new preprocessor working in my js based repos for some older cypress versions.