Run JUnit Test suite from command line

后端 未结 4 1136
无人及你
无人及你 2021-01-12 19:33

How do I run a Junit 4.8.1 Test suite from command line ? Also I want to use the categories introduces with JUnit 4.8 , is there a way where I can specify from command line

4条回答
  •  不思量自难忘°
    2021-01-12 19:41

    Using java run JUnitCore class (also see here).

    Categories are supposed to be used with test suites with @RunWith(Categories.class) , @IncludeCategory and @ExcludeCategory. I am not aware of any dynamic way to use categories to run tests but I'd like to know of such it it exists. You can have pre-defined test suites for certain categories to run them.

提交回复
热议问题