mardi 7 janvier 2020

Inherited JUnit test class should not execute all tests

I have the following two test classes:

public class MyMainTest {
     public void testMyMainTest(){...}
     public void testAll(){...}
}

public class MySubTest extends MyMainTest{
     ...//all tests form MyMainTest will be executed
     public void testMySubTest(){...}
}

When executing MySubTest all inherited test methods from MyMainTest will be executed. Is it possible, that MySubTestonly executes testAll() ?

Aucun commentaire:

Enregistrer un commentaire