开发者

How can I run all junit tests in the project by using console?

I wanna use junit 3. Is there such functionality to run all tests by using console in j开发者_高级运维unit 3. If not, does junit 4 support it?


Yes you can. Create a test suite and all the tests that you want to run to this test suite. Run this test suite from console.


You can create different test suites that are relevant to the part of the code you're working on (as stated in the faq) and then run them from the console.


Or you can use Ant to run all your tests from the console, doesn't matter if it's junit 3 or 4. Ant includes a junit task specifically for this. See my response here for a code sample on how to use Ant for this.


With maven this is very simple

mvn test
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜