Build/Test Issues

What has impacted a test?

Started by kweinberg on 1,562 views

Hello!

I'm trying to use NCrunch to only run the impacted tests to speed up our continuous integration processes. With the current NCrunch configuration, I'm ensuring that we're only executing tests with the "IsImpacted" trait on them. However, even though zero changes have been made, the majority of the tests still run. I suspect this may be because of some code generation that occurs at build-time but there could be other reasons too. Is there a way to tell what caused a test to be impacted?

Thank you in advance!

Kevin
Hi Kevin,

Thanks for posting! If the code generation produces a consistent result, then it shouldn't trigger the impact detection. Most likely the cause for this not working correctly on the CI server is that the NCrunch cache file isn't being preserved between runs. Check that you have the NCrunch Cache Storage Path setting set to a fixed path that is outside your checkout directory on your CI server. The NCrunch cache file should be saved and shared between runs on your CI server.

Post a reply

Log in to reply.