surefire

Run JUnit Tests contained in dependency jar using Maven Surefire

跟風遠走 提交于 2019-11-26 09:44:48
问题 I have a jar in my maven repository that contains junit tests, which should be run in different projects, because it is able to inspect the project and test for certain features of it. Unforunately surefire doesn\'t pick up tests that are contained in a jar, as this Feature Request shows. In the feature request they propose to unpack the jar to be then executed by surefire. I successfully unpacked the jar using the maven-dependency-plugin, but the contained tests are not executed anyway. This

Is there a way to “fail fast” for junit with the maven surefire plugin?

大憨熊 提交于 2019-11-26 08:18:13
问题 I\'m currently working on a java project using maven. We use the maven surefire plugin to run our junit suite as part of the build process. Our test suite is rapidly growing, in both coverage and execution time. The execution time is very frustrating and time consuming when you end up waiting ten minutes to find out that a test failed in the first minute of testing. I would like to find a way to make the build process fail upon the first error/failure in the test suite. I know that this is