我们在 RestEasy 中创建了 REST 服务,并在 wildfly 服务器中运行。我们正在运行 Postman 测试用例来测试 Rest URL。
有没有办法在我们执行 postman 测试套件时获得服务的代码覆盖率?
我们使用 SonarQube 来分析代码覆盖率。
最佳答案
我想不是,这里有人问过类似的问题: Generate Sonar code coverage report from Postman tests
楼主在下方评论道:
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.
另外,newman 似乎有一张票: https://github.com/postmanlabs/newman/issues/408
虽然这可能有帮助
关于java - 如何使用 postman 测试获得代码覆盖率,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39869204/