You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2019/12/28 01:11:42 UTC

[GitHub] [servicecomb-java-chassis] liubao68 edited a comment on issue #1498: ServiceComb框架下如何进行api接口测试

liubao68 edited a comment on issue #1498: ServiceComb框架下如何进行api接口测试
URL: https://github.com/apache/servicecomb-java-chassis/issues/1498#issuecomment-569371984
 
 
   你可以使用类似@SpringBootTest等把Bean的执行环境初始化起来,然后调用接口进行测试。 不过java-chassis项目的大部分集成测试不是采用这种方式测试的,都是依赖于启动consumer/provider来测试。开发自己的执行引擎或者使用docker,对于微服务的集成测试能够带来非常大的便利。涉及到网络通信的测试,建议采用集成测试的方式(当然集成测试也是在执行mvn test的过程中运行的,用JUnit API检测运行结果, java-chassis的DEMO都是这样被执行的). 
   
   我有两个文章描述了基本思路[1](https://zhuanlan.zhihu.com/p/64329193) & [2](https://zhuanlan.zhihu.com/p/64599829)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services