Setup Problems

NCrunch Console - Avoid Compilation

Started by mizzm001 on 6,448 views

Is it possible to avoid compilation and only provide the test assembly path with NCrunch console.
Hi, thanks for posting.

Unfortunately not. NCrunch's feature-set requires it to be in control of the build system. It isn't possible to track code coverage data without instrumenting assemblies, which requires post-processing. This means that when using the console tool in your CI system, you have two options:

1. Build your solution using MSBuild/devenv, then build it again with NCrunch for your tests
2. Build your solution using only NCrunch. This will mean that you won't have releasable artifacts (i.e. it's a test-only build).
Thanks for the insight Remco.
Remco wrote:Hi, thanks for posting.

Unfortunately not. NCrunch's feature-set requires it to be in control of the build system. It isn't possible to track code coverage data without instrumenting assemblies, which requires post-processing. This means that when using the console tool in your CI system, you have two options:

1. Build your solution using MSBuild/devenv, then build it again with NCrunch for your tests
2. Build your solution using only NCrunch. This will mean that you won't have releasable artifacts (i.e. it's a test-only build).



We have a case where we don't need code coverage. Could we do without compilation?
mizzm001 wrote:
We have a case where we don't need code coverage. Could we do without compilation?


Conceptually, it then becomes possible. Unfortunately, in practice, there's no way that the console tool can work without performing the builds itself. This is because the console tool itself is basically just the same NCrunch engine as used in the IDE, but it's been adapted to run without a head. The software itself would need to be heavily re-engineered to work in such a way.

Post a reply

Log in to reply.