Skip to content
 
 

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpringBoot Demo

本 Demo 用于演示 SpringBoot 框架的使用。

本 Demo 的测试部分基于测试金字塔理论,目的是探求 SpringBoot 框架下对测试金字塔思想的表达,以及一些优秀工具的演示:

运行程序

运行以下 Gradle 任务启动程序:

./gradlew bootrun

然后用浏览器访问:

运行测试

使用以下命令运行 API 的端到端测试:

./gradlew test --tests "name.huhao.springbootdemo.e2e.*"

使用以下命令运行 Controller 的集成测试:

./gradlew test --tests "name.huhao.springbootdemo.integration.*"

使用以下命令运行 Controller 的单元测试:

./gradlew test --tests "name.huhao.springbootdemo.unit.*"

备忘

端到端测试中的数据库重置

本 Demo 中的端到端测试使用了 flyway-test-extensions 进行每个测试用例运行前的数据库重置。

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages