Skip to content
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

update the status of testSuite in client transport #2733

Conversation

gravityvi
Copy link
Member

@gravityvi gravityvi commented Jun 8, 2021

Issue

  • When running tests in multiple environments in parallel on a cloud testing platform (e.g. BrowserStack), the status of the test is not sent. Even if the test ran successfully or failed the status at the cloud testing platform is unmarked.

Steps to recreate the issue

  • Run a positive test using env browserstack.chrome, browserstack.firefox npx nightwatch <test_file> --env browserstack.firefox,browserstack.chrome
  • After the test runs successfully you can observe the status of the test marked as unmarked on the BrowserStack dashboard.

Changes

  • Running the test in multiple environments uses child processes and we need to update the status in the transport layer by calling this.client.transport.testSuiteFinished(failures) irrespective of whether it's a child process or not.
  • So moved the lines this.client.transport.testSuiteFinished(failures) and this.client.session.finished(failures ? 'FAILED' : '') out of else condition

@gravityvi gravityvi requested a review from beatfactor June 8, 2021 12:43
@beatfactor beatfactor merged commit 961f8b1 into nightwatchjs:main Jun 9, 2021
@gravityvi gravityvi deleted the issues/report-status-of-test-to-transport branch June 10, 2021 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants