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

Create quarantine strategy #200

Open
lordofthejars opened this issue Sep 29, 2017 · 0 comments
Open

Create quarantine strategy #200

lordofthejars opened this issue Sep 29, 2017 · 0 comments

Comments

@lordofthejars
Copy link
Member

lordofthejars commented Sep 29, 2017

Issue Overview

If you have non-deterministic tests keep them in a different test suite to your healthy tests. That way you'll you can continue to pay attention to what's going on with your healthy tests and get good feedback from them.

Then the question is what to do with the quarantined test suites. They are useless as regression tests, but they do have a future as work items for cleaning up. You should not abandon such tests, since any tests you have in quarantine are not helping you with your regression coverage.

A danger here is that tests keep getting thrown into quarantine and forgotten, which means your bug detection system is eroding. As a result it's worthwhile to have a mechanism that ensures that tests don't stay in quarantine too long. I've come across various ways to do this. One is a simple numeric limit: e.g. only allow 8 tests in quarantine. Once you hit the limit you must spend time to clear all the tests out. This has the advantage of batching up your test-cleaning if that's how you like to do things. Another route is to put a time limit on how long a test may be in quarantine, su

So far my idea is to provide this in smart testing. So for example tests that are annotated with @Quarantine or tests that has failed 5 times (configurable value) in a raw (this information would come from hub), then are put in quarantine.

Putting in quarantine means that they are dropped from list of tests to execute. Then if you reach the max number of test into quarantine we can either put them as a part of the build so the build fails, log the problem and just continue skipping quarantine tests or abort the execution.

What I see is that this should not be a strategy but a mode. So you can do something like: mvn clean test -Dsmart.testing.mode=ordering, quarantine which means that it takes into consideration the quarantine tests.

WDYT?

Reference: https://martinfowler.com/articles/nonDeterminism.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant