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

Added option to fail the build if no tests were run #51

Closed
wants to merge 2 commits into from

Conversation

pakore
Copy link

@pakore pakore commented Sep 21, 2017

This will enable an option in the configuration to fail the tests if not a single test was run.
Also it will output in the log
[xUnit] [ERROR] - All test reports are empty.

The use case for this is the following:

  • A job run some unit tests (e.g. GTest) with a filter (--gtest-filter=WhateverSuite.testThatDo*)
  • A developer renames the unit tests and these tests fall out of the filter
  • The job runs, executes 0 tests and build is SUCCESS even though tests may not pass.

With this PR, the job will fail if there are no tests to run.

@Jimilian
Copy link
Contributor

@pakore can you fix the conflicts, please? This plugin finally has a new maintainer, so, we can hope to get this change merged in.

@nfalco79
Copy link
Member

nfalco79 commented May 6, 2018

Why did you choose to put it this as an extra configuration? All settings of that kind (like skipIfEmpty, failIfNotNew, stopProcessingIfError) are related to the "Tools type".

Could be the same concept of skip if no test file exists? Which tool other than GTest produce an empty report file also if no tests was run?

@nfalco79
Copy link
Member

nfalco79 commented Aug 12, 2018

Actually this was implemented with the new passed threshold where you can set a minimun number of passed test or the build is considered UNSTABLE/FAILED

@nfalco79 nfalco79 closed this Aug 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants