覆盖测试Django Rest Framework的工具 [英] Tools to coverage tests Django Rest Framework
问题描述
我正在研究TDD并在Django Rest Framework中开发API,但我有需要进行研究且找不到一些工具来解决我的问题,因此我试图找出我的测试覆盖了我的应用程序的百分比
为了知道缺少封面的可能性和可能的建议,我找到了 coverage
库,但是它生成了一个包含大量数据的报告,这对于我的案例而言不是很有用,我只想知道我创建的测试的覆盖范围.有谁知道pycharm的任何工具或插件可以满足这些测试要求?
我知道在Visual Studio中有Ncrunch可以做到这一点,但是我不知道pycharm中是否有类似的东西.
我正在为同一个问题苦苦挣扎.
特别是我想可视化每个测试的执行路径并仅运行受影响的测试.
我创建了一个位于后台的工具,仅运行受影响的测试:(您将需要PyCharm插件和pip中的 pycrunch-engine
)
它目前处于测试阶段,可能不支持所有使用情况,但是我每天都在开发中使用它,而没有重大问题.
I am studying TDD and developing an API in Django Rest Framework, and I had a need that I researched and could not find some tools to solve my problem, I am trying to find out how much my tests cover my application in %.
For know the number of possibilities and possible suggestions of what is missing cover, I found the coverage
lib, but it generates a report with lots of data, which are not very useful for my case, I just want to know the coverage of my tests that I created. Does anyone know of any tool or plugin for pycharm that does this coverage of the tests?
I know that in visual studio there is Ncrunch that does this, but I do not know if there is something similar in pycharm.
I was struggling with the same question.
Especially I wanted to visualize the execution path of each test and run only affected tests.
I created a tool that sits in the background and runs only impacted tests:
(You will need PyCharm plugin and pycrunch-engine
from pip)
https://github.com/gleb-sevruk/pycrunch-engine
This is how it looks like:
It is currently in beta, and may not support all usage scenarios, but I use it every day for development, without major issues.
这篇关于覆盖测试Django Rest Framework的工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!