Test insertion order

Created test methods are inserted into a test class in the same order that the methods under test appear in the source class (Diffblue Cover does not add a duplicate test if exactly the same test already exists).

Source Class

public class MyClass {
    public void xyz() {
    }
    public void abc() {
    }
}

Test Class

public class MyClassDiffblueTest {
    public void testXyz() {
    }
    public void testAbc() {
    }
}

As illustrated above, the test methods testAbc and testXyz are not inserted alphabetically into the test class, but instead according to how the methods under test are ordered. Test methods which test the same method are inserted in the order in which they are generated by Cover Plugin.

Last updated