Skip to main content
Improved formatting.
Source Link

A good place to start is now probably: https://springTesting improvements in Spring Boot 1.io/blog/2016/04/15/testing-improvements-in-spring-boot-1-4.

They describe a basic sample like the following:

@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment=WebEnvironment.RANDOM_PORT)
public class MyTest {
}

as a replacement to, one of many:

@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(MyApp.class)
@WebIntegrationTest
public class MyTest {
}

A good place to start is now probably: https://spring.io/blog/2016/04/15/testing-improvements-in-spring-boot-1-4

They describe a basic sample like the following:

@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment=WebEnvironment.RANDOM_PORT)
public class MyTest {
}

as a replacement to, one of many:

@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(MyApp.class)
@WebIntegrationTest
public class MyTest {
}

A good place to start is now probably: Testing improvements in Spring Boot 1.4.

They describe a basic sample like the following:

@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment=WebEnvironment.RANDOM_PORT)
public class MyTest {
}

as a replacement to, one of many:

@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(MyApp.class)
@WebIntegrationTest
public class MyTest {
}
Source Link
user1767316
  • 3.5k
  • 3
  • 41
  • 48

A good place to start is now probably: https://spring.io/blog/2016/04/15/testing-improvements-in-spring-boot-1-4

They describe a basic sample like the following:

@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment=WebEnvironment.RANDOM_PORT)
public class MyTest {
}

as a replacement to, one of many:

@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(MyApp.class)
@WebIntegrationTest
public class MyTest {
}