以下のアノテーションをつける

@RunWith(SpringRunner.class)
@SpringBootTest

TestApplicationTests.java
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest
public class TestApplicationTests {

    @Test
    public void contextLoads() {
    }

}
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account log in.