Maven Surefire:进行单个单元测试(Maven Surefire: run a single unit test)
我知道可以使用-Dtest=MyTest运行特定的测试类。 但是可以在该类中运行特定的测试吗?
即如果MyTest定义了testFoo()和testBar() ,有没有办法指定只应运行testfoo() ?
我知道在IDE中执行此操作非常简单,但我偶尔需要在另一台服务器上的命令行上运行测试。
I know that it's possible to run a specific test class with -Dtest=MyTest. But is it possible to run a specific test within that class?
I.e. if MyTest defines testFoo() and testBar(), is there a way to specify that only testfoo() should be run?
I'm aware that it's trivially easy to do this in an IDE, but I occasionally need to run tests on the command line on another server.
最满意答案
它将从Surefire 2.8开始提供,请参阅SUREFIRE-577
It will be available as of Surefire 2.8, see SUREFIRE-577
更多推荐
发布评论