Daily Usage Issues

ncrunch 2.22 pinning tests automagically?

Started by StephenFriend on 4,856 views

Hi there,

I've just installed 2.22 (VS2015 update 1) and am seeing some unexpected behaviour. I have the engine mode set to 'Run pinned tests automatically, others manually', when I switched branches in git, which caused some projects to reload, nCrunch started running some tests, seemingly because they were getting pinned into the test runner window.

After processing queue had finished and nCrunch was idle, I:
1) clicked the unpin all tests button (while in branch y) (so that the test runner window was empty)
2) switched back to the previous branch (branch x)
3) reloaded the projects that had changed, as prompted by Visual Studio (and again saw tests get pinned to the runner window)
5) waited for nCrunch to finish all of its processing
4) clicked the unpin all tests button (so that the test runner window was empty)
5) switched back to the branch I want to work in (branch y)
6) reloaded the projects that had changed, as prompted by Visual Studio
7) waited for nCrunch to do its thing and watched as tests became magically pinned to the window

Is this expected behaviour? Given that I like to work using the pinned tests mode, having tests that I'm not interested in get run is an overhead that is quite annoying.

Thanks,
Steve
Hi Steve -

This is expected behaviour. It's controlled by a feature you can turn on and off under the 'Customise engine modes' option. When in the standard 'Run pinned tests automatically' mode, NCrunch will automatically pin newly discovered tests to the tests window. The idea behind this is that newly discovered tests are usually deliberately introduced (i.e. you're writing new tests in a fixture and you're interested in them).

It doesn't work well for branch switching, because this tends to create new tests between sessions. I'd suggest just turning it off under your engine mode settings.

Post a reply

Log in to reply.