Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Is it possible to ignore/filter tests by execution time?
milund
#1 Posted : Friday, March 2, 2018 8:29:40 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/2/2018(UTC)
Posts: 1
Location: Denmark

Thanks: 1 times
Hi,

We have more than 5000 tests, in a great mixture of unit tests and integration tests - and no category attribute on the tests.
So it would be nice if ncrunch after first run could decide which tests to run continously (those faster than say 100mS) and ignore the rest.

Is that in any way possible?

Thanks,
Michael
Remco
#2 Posted : Friday, March 2, 2018 11:54:31 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi Michael,

Thanks for posting!

Yes, this is certainly possible. You'll need to create a custom engine mode, which needs to have the tests to execute automatically setting overridden, containing a filter by the execution time of the test. You might also want to add an extra condition on the filter so that NCrunch will also execute tests that haven't been executed yet, as otherwise the execution time won't become available.

I would generally recommend using categories if possible. This is because test execution time can be quite variable. If you have a unit test that has a single execution run over 100ms, NCrunch then won't run this unit test again until it's targeted manually and reruns with a lower execution time.
1 user thanked Remco for this useful post.
milund on 3/2/2018(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.031 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download