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

Notification

Icon
Error

Understanding 'Only automatically run impacted tests'
glinkot
#1 Posted : Thursday, January 15, 2015 4:12:51 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/11/2015(UTC)
Posts: 8
Location: Australia

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Again just familiarising myself with the tool, quick question. I've set the abovementioned option, and have 3 tests testing a single method. If i edit the code in one of the tests, all 3 retrigger to test again. I would understand this if I changed the code under test, but why would the other tests ever need to rerun when the targeted code has not changed?

I see the feature is mentioned as experimental - but just thought I'd ask as I'm working out if this slower mocking framework I'm trying will be tolerable in real use :)
Remco
#2 Posted : Thursday, January 15, 2015 10:23:54 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
At the moment NCrunch's impact detection is operating at a very basic level. When you make a change to a source file, it will examine the file to see which tests cover it, then consider all of these tests as 'impacted'.

This behaviour is because NCrunch doesn't have an understanding of the programming language itself (C#/VB), since it doesn't physically parse it. The tool is instead built on top of other abstractions above the language level (such as MSBuild), so the 'flat-file' impact detection is just a best effort to try and prioritise tests more intelligently without tying the engine down in expensive deep impact analysis.

There are new opportunities appearing in this area with the production release of Roslyn later this year. I hold high hopes that these opportunities will enable far superior impact detection features within NCrunch.
glinkot
#3 Posted : Thursday, January 15, 2015 11:04:42 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/11/2015(UTC)
Posts: 8
Location: Australia

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Thanks for that. Yes Roslyn will be interesting!

Cheers
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.028 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download