1
SpringCloud进行单元测试有什么好的建议
source link: https://www.oschina.net/question/134262_2324100
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
今天 07:46
引入spring-boot-starter-test依赖, 启动类加上@RunWith注解, 然后你运行一个单元测试方法的时候就会把整个Spring Cloud依赖的东西都一起启动了,单元测试运行结束之后也自动退出。
千万不要去折腾什么Mock之类的,那都是扯淡。
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK