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

Added CDRSlowTestReporter to identify slowest running tests #46

Merged
merged 1 commit into from
Oct 6, 2012

Conversation

onsi
Copy link
Contributor

@onsi onsi commented Sep 16, 2012

For tracker story #36037887

Lemme know if you'd like me to tweak/change/fix this in any way!

@onsi
Copy link
Contributor Author

onsi commented Sep 17, 2012

Actually. Hold off on this - it breaks the install script (silly issue). Will fix and send you a new pull request soon.

@onsi
Copy link
Contributor Author

onsi commented Sep 18, 2012

All better!

@cppforlife
Copy link
Contributor

what if we just add this to the default reporter with env var to turn it on? that way we can have color and slow tests.

@onsi
Copy link
Contributor Author

onsi commented Sep 28, 2012

Sounds good to me. Shouldn't be hard as it runs at the end of the print stats section. If we do this I'd propose pulling the functionality from CDRSlowTestReporter into its own object (CDRSlowTestAnalyzer?) that takes the rootGroups and processes them and either returns or prints out its output. That way we can try to prevent the reporter from getting to bloated. If there's interest I'd be happy to work on this tomorrow. Shouldn't take long.

@idoru
Copy link
Contributor

idoru commented Oct 5, 2012

That sounds like a good idea. As of fd68ffc even the JUnit reporter prints out stats to stdout on run completion, so if we output this as part of the stats then it will appear regardless of which reporter you've chosen.

Should we overload CEDAR_REPORTER_OPTS for this setting? I noticed it is only used for the 'nested' output setting for the default reporter, but the name of the environment variable sounds like it can't wait to be a comma separated list.

@cppforlife
Copy link
Contributor

Given that Xcode has checkmarks for turning on/off specific env variables I think we should sunset CEDAR_REPORTER_OPTS and use separate env vars for nested format and slow examples.

@onsi
Copy link
Contributor Author

onsi commented Oct 6, 2012

That sounds good to me. I'm working on pulling the slow stat reporting
into the default reporter. I'm thinking CEDAR_REPORT_SLOW_TESTS would be a
reasonable env var?

Onsi

On Fri, Oct 5, 2012 at 8:00 PM, Dmitriy Kalinin notifications@github.comwrote:

Given that Xcode has checkmarks for turning on/off specific env variables
I think we should sunset CEDAR_REPORTER_OPTS and use separate env vars for
nested format and slow examples.


Reply to this email directly or view it on GitHubhttps://github.com//pull/46#issuecomment-9194713.

@onsi
Copy link
Contributor Author

onsi commented Oct 6, 2012

Done. The slow stat reporting is in the default reporter now. Use the CEDAR_REPORT_SLOW_TESTS environment variable to turn it on.


@interface CDRSlowTestReporter : CDRDefaultReporter

@end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this file? if not it's also inside xcode.proj.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope my bad. Why are all the headers in their own folder anyway? Will remove...

On Oct 6, 2012, at 9:48 AM, Dmitriy Kalinin notifications@github.com wrote:

In Source/Headers/CDRSlowTestReporter.h:

@@ -0,0 +1,5 @@
+#import "CDRColorizedReporter.h"
+
+@interface CDRSlowTestReporter : CDRDefaultReporter
+
+@EnD
do we need this file? if not it's also inside xcode.proj.


Reply to this email directly or view it on GitHub.

By default the top N=10 slow tests and root example groups
are reported.

Set CEDAR_TOP_N_SLOW_TESTS to modify N.
@onsi
Copy link
Contributor Author

onsi commented Oct 6, 2012

Rebased down to one commit on top of latest pivotal/cedar HEAD.

cppforlife added a commit that referenced this pull request Oct 6, 2012
Added CDRSlowTestReporter to identify slowest running tests
@cppforlife cppforlife merged commit 2878371 into cedarbdd:master Oct 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants