# 1.3 Spring Boot项目测试
## 1.3.1 添加Maven依赖
```xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
```
## 1.3.2 简单测试
需要为类添加注解`@RunWith(SpringRunner.class)`和`@SpringBootTest`。如下
```java
@RunWith(SpringRunner.class)
@SpringBootTest
public class HelloWorldControllerTest
```