0

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?

anat0lius
  • 2,145
  • 6
  • 33
  • 60

1 Answers1

0

Found the solution here: Why are JUnit tests run twice from within Eclipse?

I renamed my unit test as *TestCase and left the suite as *Test

anat0lius
  • 2,145
  • 6
  • 33
  • 60