-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entire test suite exits without report when test references page object alias that does not exist in the page object #4009
Comments
@reallymello Thanks for this issue. #4012 should take care of the But I'm not sure if using the wrong alias is causing that uncaught exception in your case because I tried the steps you mentioned above and Nightwatch is giving me information on what went wrong, even in parallel runs: Can you maybe try running your tests with #4012 once to see if it can help you find the actual issue? Also, please check if the HTML report is working fine after encountering such an uncaught exception in a worker thread. |
Description of the bug/issue
When I run a batch of tests and one is mistakenly referencing a page object element alias that is not present in the page object being used I expect that one test to fail with error stating that, but have the rest of the run continue to completion and produce a test report, but instead the test run exits early and no final test report or output is produced
Steps to reproduce
Possibly useful background, our total test suite is over 50 tests in the one project with each test being over 600 lines. They make heavy use of the page object model
myPageObject.element('@thisDoesNotExist').click()
where@thisDoesNotExist
does not exist in the elements collection for your page object.npx nightwatch --headless
When I disabled parallel execution I was able to see the error from Nightwatch alerting me that the alias does not exist on my page object and it lists what element do exist, but then the console output after that appears to continue on with a bit more test execution before it terminates.
Sample test
No response
Command to run
Verbose Output
No response
Nightwatch Configuration
No response
Nightwatch.js Version
3.3.8
Node Version
18.15.0
Browser
Chrome Latest
Operating System
Windows 11
Additional Information
No response
The text was updated successfully, but these errors were encountered: