python代码覆盖率测试,功能测试的代码覆盖率

I have a Java RESTful API. I use REST Assured for my functional tests on each endpoint.

Is there a way to get the code coverage for the classes/methods used behind the scene (controllers, services, DAOs/repositories, etc.) when REST Assured (or any similar tool) makes calls to the API? (I guess the API should be started with some agent or something that reports what happens until it is stopped?).

解决方案

You can also use a service like Sealights as this is the problem we solve (I work there) - get code coverage beyond unit tests, meaning that all of your Functional, Selenium, Integration, Performance testing are reported into a single dashboard.

Note that the solution you have used (JaCoCo) is OK but it has drawbacks such as:

Is it only for Java.

You have to collect the coverage from multiple machines and unify it (assuming that you have micro-services or many servers) in order to get the final report.

The coverage is available only when the process is going down so if you have very long tests, it may take you hours till you'll have your initial info.

You can't see the coverage of your backend & frontend code in a single location.

Basically in Sealights we solve all of those problems, help you to focus your tests in areas in the code which have changed, provide status reports will show you how your team is doing including tips on how to optimize your tests and some other cool features.

Last but not least, currently we support Java, NodeJS, Browser Based Tests (ie, Selenium), .NET and Python.

Happy programming ;-)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值