@RunWith(OrderedRunner.class) public class MyUnitTestClass { ... @Test @Order(order = 2) public void testMethod() { ...
@RunWith(CategoryRunner.class) @Category(cat = "archi") @Category(cat = "server") public class MyUnitTestClass {or
@RunWith(OrderedRunner.class) @Category(cat = "archi") @Category(cat = "server") public class MyUnitTestClass {
@RunWith(OrderedJavaFXRunner.class)
rather than the @RunWith(OrderedRunner.class)
, or you will have an exception when trying to execute the tests. See Unit Tests UI Framework specificities for additional specifities depending on the UI Framework.
categories.properties
file. For example:strictMode=false editor=true server= client= ...In this example, only Unit Tests which are in the "editor" category will run.
categories.properties
file. For example:strictMode=false editor=true server=true client= ...In this example, only Unit Tests which are in the "editor" category or in the "server" category will run.
strictMode=true editor= server=true client= ... runtime=true ...In this example, only Unit Tests which are in both the "server" category and the "runtime" category will run.
strictMode=true editor= server=true client= ... runtime=true ...In this example, only Unit Tests which are in both the "server" category and the "runtime" category will run.
headless=true editor= server= client= ...In this example, only headless Unit Tests will run. Note that you need to declare a test as headless by adding a "headless" category for this test.
Copyright 2016-2017 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v2 licence