惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Security Blog
Microsoft Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
About on SuperTechFans
月光博客
月光博客
Jina AI
Jina AI
F
Fortinet All Blogs
博客园 - 聂微东
The Cloudflare Blog
美团技术团队
B
Blog RSS Feed
N
Netflix TechBlog - Medium
罗磊的独立博客
The GitHub Blog
The GitHub Blog
I
InfoQ
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Apple Machine Learning Research
Apple Machine Learning Research
H
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog
博客园 - 三生石上(FineUI控件)
宝玉的分享
宝玉的分享
阮一峰的网络日志
阮一峰的网络日志
V
V2EX

Neuman’s blog

Menghaoran Dns Vs Whois How To Download Video From Website 如何去消耗服务端资源 长度与宽度 依赖于第三方服务的场景要怎么测试 Gui测试之图片识别 别做拒绝成长的苹果树 Zookeeper
Spring Boot Test
Neuman's blog · 2018-03-02 · via Neuman’s blog

对spring boot应用进行测试

添加如下两个注解,编写测试类,可以测试Spring boot应用


@RunWith(SpringRunner.class) 运行Junit并支持Spring-test特性
@SpringBootTest 为springApplication创建上下文并支持SpringBoot特性

spring boot的一些简单介绍

Controller Service Dao


测试方法

junit

注解

@Test
@Before
@After
@BeforeClass
@AfterClass

testng

比起junit我更偏向于testng

主要的优点我认为是Listener的定制化和xml配置用例测试套