如何使用邮递员测试获得代码覆盖率 [英] How to get code coverage using postman test

查看:159
本文介绍了如何使用邮递员测试获得代码覆盖率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在RestEasy中创建并在wildfly服务器中运行的REST服务。我们正在运行Postman测试用例来测试Rest URL。

We have REST services created in RestEasy and running in wildfly server. We are running Postman test cases to test the Rest URLs.

当我们执行postman测试套件时,有没有办法获得服务的代码覆盖?

Is there a way to get a code coverage of the services when we execute postman test suite?

我们使用SonarQube分析代码覆盖率。

We use SonarQube to analyse the code coverage.

推荐答案

我认为不,这里也提出了类似的问题:
从邮差测试中生成声纳代码覆盖率报告

I think no, a similar question was asked here: Generate Sonar code coverage report from Postman tests

原始海报进一步评论:


事实上,经过一段谷歌搜索后,作为一项工作我们可以在java应用服务器中使用远程
Jacoco代理。我们将尝试在测试执行之前和之后运行
jacoco maven目标,以便
生成jacoco覆盖报告。请参阅:链接如果我们
,我会更新帖子取得了一些进展。

In fact, after a bit of googling, as a work-around we could use remote Jacoco agent hooked in the java application server. We'll try to run jacoco maven goals before and after the tests execution in order to generate jacoco coverage report. See: link I'll update the post if we have some progress.

此外,纽曼似乎对此有所了解:
https://github.com/postmanlabs/newman/issues/408

Also, newman seems to have aticket about it: https://github.com/postmanlabs/newman/issues/408

虽然这可能会有所帮助

这篇关于如何使用邮递员测试获得代码覆盖率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆