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

A failing test doesn't fail the build #227

Open
mgol opened this issue May 8, 2020 · 2 comments
Open

A failing test doesn't fail the build #227

mgol opened this issue May 8, 2020 · 2 comments

Comments

@mgol
Copy link

mgol commented May 8, 2020

Expected Behavior

If a browser fails to spawn or a test fails in one of the browsers, the process should exit with code different than 0.

Actual Behavior

The process always exits with code 0.

Steps to Reproduce the Problem

  1. git clone [email protected]:jquery/jquery-color.git
  2. npm install
  3. Now, modify one of the test cases in test/unit/color.js so that it fails, e.g. by changing one 255 to 254.
  4. Run npm run browserstack; echo $?

You should see a failure & a number different than 0 as the last output. 0 is printed instead.

browserstack.json

Platform details

  1. browserstack-runner version: 0.9.1
  2. node version: v12.16.3
  3. os type and version: macOS 10.15.4 (19E287)

Details

This is quite a critical bug to me as it can mask errors by exiting the CI successfully. If one doesn't notice, this may lead to releasing a broken version of a project.

@Krinkle
Copy link
Contributor

Krinkle commented Apr 11, 2021

I believe the exit_with_fail option can be set for this. When I use that, I get exit status 1 when there are failures or time outs etc.

@Namrata-m13
Copy link

@Krinkle I would recommend you to use the karma-browserstack-launcher for your tests - https://github.com/karma-runner/karma-browserstack-launcher

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

No branches or pull requests

3 participants