courtneypresto / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Elapsed time for global and per testcase setup and teardown #158

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be useful for the purpose of optimizing the test suite (tests that
run faster will be used more often and by more people) if there were timing
values for the setup and teardown of the environment shared by multiple tests.

Since the risk of interaction between tests in a shared environment is
mostly taken when the setup and/or teardown of that environment is to slow
to run per test it often contributes a significant share to the total runtime.

This means it is the part we need to look at to reduce runtime of the whole
test suite. The only place where this time is taken into account right now
is in the total time at the end of the output which makes it hard to
determine which setup and teardown needs to be optimized and if an
optimization attempt was successful.

Original issue reported on code.google.com by mhoerm...@gmail.com on 24 Jun 2009 at 9:37

GoogleCodeExporter commented 9 years ago
You can start a discussion on the discussion group about this, but my thinking 
is
that we should not do this by default as it clutters the output with 
information that
many users won't be interested in.  We could add more command line flags to 
control
this behavior, but that complicates the usage and I'm not convinced it's worth 
it.  I
recommend you to either use a profiler or wait for the event listener API to be
published and then write your own test result printer.

Original comment by zhanyong...@gmail.com on 7 Aug 2009 at 4:00