简体   繁体   English

运行单元测试后,我想查看Django处理过的所有请求

[英]After running unittests, I want to see all the requests Django has processed

My Django project has ~300 unit tests. 我的Django项目有约300个单元测试。 I want to see all the URLs (and HTTP methods - GET/POST/etc) that have been used in the course of unit testing. 我想查看在单元测试过程中使用的所有URL(和HTTP方法-GET / POST / etc)。

The end goal is to produce two (nose) coverage reports: 最终目标是生成两个(鼻子)覆盖率报告:

  • coverage of all the URLS defined in the various urls.py files 各种urls.py文件中定义的所有URL的覆盖范围
  • coverage of my Swagger API Swagger API的内容

Before I go digging into the Django source code, I'm wondering if anyone knows if this is already done for free by some Django object, or if not, a good hint at where to start prodding around. 在深入研究Django源代码之前,我想知道是否有人知道某个Django对象是否已免费完成此操作,或者如果不是,那么这是一个很好的提示,说明从何处开始。

Have a look at django-request . 看看django-request Maybe it can solve your problem. 也许它可以解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Django ModelAdmin对象可用于单元测试中的后续请求吗? - Django ModelAdmin objects reused for subsequent requests in Unittests? 当我想在单元测试中使用反向 function 时发生 django urls.exceptions.NoReverseMatch 错误? - django urls.exceptions.NoReverseMatch error happens when I want to use reverse function in unittests? 我希望 Django 中的 Staffuser 看不到任何超级用户 - I want Staffuser in Django not to see any superusers 防止所有 python 单元测试基于环境变量运行 - Prevent all python unittests from running based on environment variable 完成所有 Python 单元测试后拆除所有打开的线程 - Tearing down any open Threads after completing all Python Unittests Django单元测试随机失败 - Django Unittests Failing Randomly 运行 Django 测试时如何查看标准输出? - How do I see stdout when running Django tests? requests.post 的单元测试没有响应 - Unittests for requests.post with no response Django 问题:我想在 django 管理员多对多字段中看到相反的顺序 - Django Problem : I want to see reverse order in django admin many to many field 我想在 django 的后台保持一个长进程 - I want to keep a long process running in the background in django
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM