如何获得针对 swagger ui 的 api 测试覆盖率

问题描述:

我想从我的空手道测试脚本中针对 swagger UI 或 JSON 文件获取 API 测试覆盖率.谁能指导我如何获得测试覆盖率?

I would like to get the API test coverage from my karate test scripts against swagger UI or a JSON file. Could anyone guide me on how to get the test coverage?

这是一个非常模糊的问题.我会说只是使用标签.维护标签的 JSON 映射到您的自定义需求(Swagger 或其他任何东西).编写一个小程序,从并行运行器返回的 Results 对象生成覆盖率报告.如果您有更具体的问题,请提出新问题.

This is a very vague question. I would say just use tags. Maintain a JSON mapping of tags to your custom needs (Swagger or anything else). Write a small program to generate your coverage report from the Results object returned from the parallel runner. If you have more specific questions ask a new one.