-
You can put the script anywhere in your django project
-
Then you need to use the following line of code in settings.py
TEST_RUNNER = 'path.DiscoverSlowestTestsRunner' # the path is where you put the script
-
When you run the djagno test you can have addition commands:
--time=300
,The console will output the execution time of each test instead of the test run info. while the time is greater than 300 ms, it will turn red.--report=300
When all test runs are completed, the console will output a test report with a run time greater than 300 ms.--limit=15
The final test report will only show the slowest 15 data
yaosir0317/showEachTestRuntime
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published