Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Fixes #5 . A note on flaky annotation usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeniy Lozovan authored and Evgeniy Lozovan committed May 15, 2017
1 parent 77e4ed6 commit 2170f92
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/2.0/features.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ This section describes the main features of Allure.
For example, you can group your tests by stories or features, attach files, and distribute assertions over a
set of custom steps, among other features. All features are supported by Java test frameworks, so we only provide
Java examples here. For details on how a particular adapter works with the test framework of your choice,
refer to the adapter guide.
refer to the adapter guide.

include::features/flaky.adoc[leveloffset=+1]
20 changes: 20 additions & 0 deletions docs/2.0/features/flaky.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
= Flaky tests

In a real life not all of your tests are stable and always green or always red. A test might start to "blink" i.e. it fails from time-to-time without any obvious reason.
You could disable such a test, that is a trivial solution. However what if you do not want to do that?
Say you would like to get more details on possible reasons or the test is so critical that even being flaky it provides helpful information?
You have an option now to mark such tests in a special way, so resulting report will clearly show them as unstable:

[source, java]
----
@Flaky
public void aTestWhichFailsFromTimeToTime {
...
}
----

Here is what you get in the report in case if such test failed:
+
image::flaky_failed.png[A failed test marked as flaky]

Additional note - you could mark a whole test class as flaky as well.
Binary file added docs/2.0/images/flaky_failed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2170f92

Please sign in to comment.