Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to generate test execution time breakdown #61

Open
xiaoleATRI opened this issue Mar 8, 2018 · 3 comments
Open

How to generate test execution time breakdown #61

xiaoleATRI opened this issue Mar 8, 2018 · 3 comments

Comments

@xiaoleATRI
Copy link

xiaoleATRI commented Mar 8, 2018

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:

  1. Time to set up the environment
  2. Time to create the database
  3. Time to load fixtures
  4. Time to execute test steps
  5. 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

@jenisys
Copy link
Member

jenisys commented Mar 10, 2018

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 !?!

@bittner
Copy link
Member

bittner commented Mar 10, 2018

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. 😕

@bittner
Copy link
Member

bittner commented Apr 5, 2019

If anyone is interested to add a performance measuring feature to behave-django a PR is welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants