K
K
Kraft332017-09-03 06:56:32
Java
Kraft33, 2017-09-03 06:56:32

How to pass @Ignore during unit test execution?

Hello! Colleagues, is it possible during the execution of a unit test to "tell" Junit that the test is not fail, not success, but skip?
In statics, the @Ignore annotation is not set, because it is not known what state the class used in the test method will be in (or rather, what annotations it will have).
Roughly speaking, the class used in the JUnit test method itself can have an annotation similar to the @Ignore annotation, and if the class has such an annotation, then in fact the test does not fail - but should be skipped.
The task is to pass the correct status to the test framework (JUnit).
PS If such a feint cannot be performed in JUnit, tell me in which tools this can work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Romanov, 2017-09-03
@Kraft33

junit.sourceforge.net/javadoc/org/junit/Assume.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question