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



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

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

Thanks: 1 times

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?

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

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,106

Thanks: 676 times
Was thanked: 814 time(s) in 775 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
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.021 seconds.