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

Notification

Icon
Error

Execution time filter with console tool?
GreenMoose
#1 Posted : Friday, March 2, 2018 12:25:22 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 503

Thanks: 142 times
Was thanked: 66 time(s) in 64 post(s)
From the question in thread http://forum.ncrunch.net...by-execution-time.aspx:
Remco;11860 wrote:
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.


Does this kind of filter work with console tool in some way? (i.e. can it be utilized on CI server to skip those tests with high durations).
If so, can I reuse these (via some NCRunch cache folder I presume) settings to ensure these are executed at a later stage, without having to re-execute all tests?

(This would be extremely cool in CI scenarios, where I then could have 1 "only quick tests" build on each commit, and for those tests not being executed, I fire off another build after a grace period has passed for instance, so I avoid holding up CI time with long running tests).
Remco
#2 Posted : Friday, March 2, 2018 12:45:24 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,974

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Absolutely. The console tool is just a headless client, so it has access to all the same settings. The console tool works via automatic execution only, so as long as you set the 'Tests to run automatically' filter accordingly in the console tool's configuration, it will only run the tests that pass this filter.

Be warned that there is no real intelligence behind a time-factored filter. Variations in test running times can cause unexpected things to happen. It might work quite well as long as you have some kind of fallback to ensure all the test are eventually run.
GreenMoose
#3 Posted : Friday, March 2, 2018 12:52:45 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 503

Thanks: 142 times
Was thanked: 66 time(s) in 64 post(s)
So, given I have the settings below, is it the "NCrunchCacheStoragePath " folder I need to "keep" between sessions in order for NCrunch to remember the previous test states? I guess this also will work with "when impacted" filter then?

Quote:

/o "D:\TeamCity\buildAgent\work\5ba2a6bbeb83d413\_Tmp\_NCrunch\Results" -NCrunchCacheStoragePath "D:\TeamCity\buildAgent\work\5ba2a6bbeb83d413\_Tmp\_NCrunch\Cache" -WorkspaceBasePath "D:\TeamCity\buildAgent\work\5ba2a6bbeb83d413\_Tmp\_NCrunch\WC"
Remco
#4 Posted : Friday, March 2, 2018 10:31:35 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,974

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
[quote=GreenMoose;11864]So, given I have the settings below, is it the "NCrunchCacheStoragePath " folder I need to "keep" between sessions in order for NCrunch to remember the previous test states? I guess this also will work with "when impacted" filter then?
[quote]

Yes, as long as you have the cache storage path pointing to a known directory that will be the same across every build run. You may also need to take steps to prevent multiple builds running in parallel, as this could create some confusing results around the cache data access.
1 user thanked Remco for this useful post.
GreenMoose on 3/5/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.058 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download