So I have set my suite like this:
@RunWith(Suite.class)
@SuiteClasses({
Foo1Test.class,
Foo2Test.class
})
public class FooTest {
}
My unit tests are like this:
@RunWith(SpringRunner.class)
@SpringBootTest
@AutoConfigureMockMvc
public class Foo1Test {
@Test
public void test1() throws Exception {/*...*/}
}
Everything is fine except when I run my project with mvn clean install
the tests has been run twice. How do I prevent that?