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

后端 未结 7 1106
春和景丽
春和景丽 2020-11-28 08:39

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 rapidl

7条回答
  •  误落风尘
    2020-11-28 08:55

    A few ways to speed it up if not exactly what you need:

    • If it's a multi module build, add --fail-fast to the command line to drop out after the first module.

    • Look into failsafe to move long running integration tests onto a different phase of the lifecycle.

    • Look into a profile based solution for fast and slow tests - Is there a way to tell surefire to skip tests in a certain package?.

提交回复
热议问题