behave-django
behave-django copied to clipboard
How to generate test execution time breakdown
Hi, @mixxorz:
I want to have a logging about the test execution to analyze where the most of time has been consumed.
the list of timestamps could be as following:
- Time to set up the environment
- Time to create the database
- Time to load fixtures
- Time to execute test steps
- Time to destroy the database
Currently, I can use behave API to know the time spent in each step, scenario, feature but I don't know how to calculate the time in creation and deletion of database
Thanks
Why do you not use the logging functionality and exclude logging (or at least the diagnostic categories / loggers) from being captured in behave ?
Then you only need to inject the logging statements that do the work at the correct places. The problem may be that part of the logging statement locations are in behave-django
(@mixxorz @bittner ), I assume !?!
The problem may be that part of the logging statement locations are in
behave-django
Not sure that we do anything with logging. All that behave-django
does is make sure that Django infrastructure is fired up and then run behave
, passing in all command line parameters.
EDIT: I think, I get what you mean. Setting up and shutting down Django happens inside behave-django
. This is where @xiaoleATRI wants to jump in to measure timings. :confused:
If anyone is interested to add a performance measuring feature to behave-django a PR is welcome!