Skip to content Skip to sidebar Skip to footer

Tools To Coverage Tests Django Rest Framework

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

Solution 1:

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://pycrunch.com

https://github.com/gleb-sevruk/pycrunch-engine

This is how it looks like: tests hit line 33

tests hit another line

enter image description here

It is currently in beta, and may not support all usage scenarios, but I use it every day for development, without major issues.

Solution 2:

I found a tool in the professional pycharm of which does what I need, is the functionality of running the tests with coverage, there is an option that runs the tests again to check if everything is ok:

enter image description here

And in this tool there is also another feature that shows the coverage of your tests against the existing code:

enter image description here

I hope I can help someone who has the same doubt! Thanks!

Post a Comment for "Tools To Coverage Tests Django Rest Framework"