junit verify that all tests were run

48 Views Asked by At

In a project, I found out that some junit tests were not run. There was a mix of junit4 and junit5 tests, IntelliJ Idea was able to run any tests, but gradle build ignored some of them. The problem was fixed by fixing dependencies { testImplementation ... }, BUT for some unknown time during development some tests were silently ignored. I think that the problem is fixed now, but this is just my guess.

Question: Is there a way to verify that all classes with tests have been actually run rather than ignored?

(As to looking at test coverage, in the case of this project it would require too much thinking. There has been no requirement of 100% test coverage, some portions of the code are not covered with tests and this is normal. In other words, I do not want 100% test coverage, I want 100% execution of existing tests.)

0

There are 0 best solutions below