Questions tagged [ncrunch]

NCrunch is a continuous testing tool for Visual Studio .NET. It intelligently takes responsibility for running automated tests so that you don't have to, and it provides a huge amount of useful information about your tests (such as code coverage and performance metrics) inline in your IDE while you work.

NCrunch works with MSTest, NUnit, and other popular automated test frameworks.

It also provides the following options for how it runs automated tests (among many others):

  • Whether to run tests automatically or manually.
  • How to divide CPU cores between Visual Studio and NCrunch.
  • The maximum number of processing threads to use at once (> 1 for parallel test execution).
  • Optimization for fastest test execution or maximum memory efficiency.

See the NCrunch overview and documentation to learn more about it.

90 questions
2
votes
1 answer

NCrunch showing brace for a loop as untested

Consider the block of code shown in the image below: There is the one pesky black/'this line of code is not covered by any tests' dot. Anyone able to shed any light on how this is not covered by any tests, considering it is referring to the closing…
glosrob
  • 6,631
  • 4
  • 43
  • 73
1
vote
0 answers

How to ignore tests by category (trait) name in NCrunch

I'm using xUnit + NCrunch. I've got some tests marked as integrational: [Trait("Category", "Integration")] How do I skip those tests in NCrunch? The tests are not in the separate assembly so I cannot ignore the entire assembly completely.
Serhii Shushliapin
  • 2,528
  • 2
  • 15
  • 32
1
vote
1 answer

How to make NCrunch use specific appsettings.json file?

There are some API tests in my solution that require setting from appsettings.json file. Local environment differs from DEV/PROD. Because of that I have main appsettings.json config and additional appsettings.Development.json with some settings…
Serhii Shushliapin
  • 2,528
  • 2
  • 15
  • 32
1
vote
1 answer

How to configure NCrunch so that it can build a Blazor project

When NCrunch (version 4.2.0.7) tries to build a Blazor project (version 3.0.0-preview9), it produces the following error: packages\microsoft.aspnetcore.blazor.build\3.0.0-preview9.19465.2\targets\Blazor.MonoRuntime.targets (441, 5): The command…
Rodolfo Grave
  • 1,148
  • 12
  • 24
1
vote
2 answers

How to detach all LocalDb databases used by NCrunch Node service

Occasionally, the clean-up code for the tests that use LocalDB is not run (perhaps when tests are being cancelled). The result is a lot of garbage local db databases. I get an error like this when running tests that attempt to create another…
1
vote
0 answers

NCrunch and FakeItEasy.OutAndRefParametersConfigurationExtensions

I have a codebase with NUnit test suites, which I run with both Resharper Unit Test Sessions and NCrunch. One of my test requires FakeItEasy.OutAndRefParametersConfigurationExtensions. Most of the time it works, but occasionally NCrunch fails that…
Brondahl
  • 7,402
  • 5
  • 45
  • 74
1
vote
1 answer

how to parallel test in ncrunch

I have a set of test methods as below: [TestMethod] public void test1() { System.Threading.Thred.Sleep(10000); } [TestMethod] public void test2() { System.Threading.Thred.Sleep(10000); } [TestMethod] public void test3() {…
user3416447
  • 119
  • 1
  • 2
  • 9
1
vote
1 answer

C# Nunit Moq Cannot make test pass

I have this class: class MyClass { private ISomeInterface blabla; public MyClass() : this(new SomeInterfaceImplementation()) {} internal MyClass(ISomeInterface blabla) { this.blabla = blabla; } public void…
Sebastien
  • 1,308
  • 2
  • 15
  • 39
1
vote
2 answers

NCrunch integration with Typemock failing to run tests

I am getting the following exception from NCrunch when tests are being run. *** Failures *** Execute TypeMock.TypeMockException: *** Typemock Isolator is currently disabled. Enable using the following: * Within Visual Studio: - Use Typemock…
sweetfa
  • 5,457
  • 2
  • 48
  • 62
1
vote
0 answers

using ncrunch with asp.net core 1.0 wont build

I am trying to use ncrunch with asp.net core but ncrunch is showing my build are failing. Is there a way to run ncrunch in asp.net core for unit testing.
maxspan
  • 13,326
  • 15
  • 75
  • 104
1
vote
1 answer

NCrunch "no tests are queued for execution"

In Visual Studio 2015 Community Edition Update 3 and with NCrunch 2.15.0.9, my MSTest unit tests do compile (I can run them in MSTest), but NCrunch shows them as No tests are queued for execution. Monitoring 2 tests, with no tests ignored The…
Thomas Weller
  • 55,411
  • 20
  • 125
  • 222
1
vote
1 answer

SpecFlow: how to inject ScenarioContext when NInject is used as IoC

After updating our solution from SpecFlow1.9 to 2.0 and NUnit2.6.4 to 3.2.1 we get a SpecFlowException when the SpecFlow tests are executed with NCrunch TechTalk.SpecFlow.SpecFlowException : The ScenarioContext.Current static accessor cannot be…
Erik Stroeken
  • 519
  • 4
  • 16
1
vote
1 answer

NCrunch Failing to Build Project with PostSharp dependency

The "PostSharp.MSBuild.PostSharp30ExtractTools" task could not be loaded from the assembly
jchadhowell
  • 1,131
  • 1
  • 14
  • 25
1
vote
1 answer

Display Output In NCrunch Test After Changing Console Ouput Stream

Here is one of my unit tests: [] let [] ``inputX test`` () = let simulator = Simulator(@"H:\MyProj\Inputs" @@ @"inputX.txt",false) use sw = new StringWriter() in Console.SetOut(sw) simulator.Run() …
1
vote
2 answers

JustMock and nCrunch

I am getting the following error message: The type or namespace name 'Telerik' could not be found (are you missing a using directive or an assembly reference?) I added Just Mock to my testing project and I followed the configuration instructions at…
Jonathan
  • 1,725
  • 3
  • 19
  • 45