Forum member
zlicht
7 posts
Posts by zlicht
-
NCrunch tests fail randomly
Minimal code to reproduce: [code=csharp] public interface IFinder { Task<string> GetTextAsync(string id); } public class Finder { private readonly IFinder _finder; public Finder(IFinder finder) { _finder = finder; } public Task<string> GetTextAsyn…
07 Sep 2023 11:53 UTC
-
NCrunch tests fail randomly
[quote=Remco;16858]I suspect this issue may depend on the sequence in which your tests are executing. Can you try placing the NCrunch.Framework.IsolatedAttribute at assembly level in all of your test projects? It will be interesting to see if this gets rid of the problem. When tests are marked …
07 Sep 2023 11:29 UTC
-
NCrunch tests fail randomly
I copied one of my affected classes and tests into a fresh new project and ran Churn Mode, and it did not fail any tests.
07 Sep 2023 08:13 UTC
-
NCrunch tests fail randomly
[quote=Remco;16848]Can you get it to happen for specific tests by using Churn Mode?[/quote] Yes, it happens in Churn Mode. [quote=Remco;16848]Does setting your 'Instrument output assembly' setting to 'False' for all the involved projects resolve the issue? (note this will drop all code coverage)[/…
07 Sep 2023 07:42 UTC
-
NCrunch tests fail randomly
[quote=Remco;16844][quote=zlicht;16843] I was wrong about the previous statement. I added meaningless spaces to trigger NCrunch.[/quote] Can you confirm whether you receive this problem when running the tests using any other runner? Is this something you can reproduce with a sample solution t…
06 Sep 2023 03:45 UTC
-
NCrunch tests fail randomly
[quote=Remco;16842]Hi, thanks for posting. NCrunch runs tests automatically using the code straight out of memory. The saving of code to disk is not generally a trigger for NCrunch to run tests. Do you experience this problem also with other runners?[/quote] I was wrong about the previous …
05 Sep 2023 02:02 UTC
-
NCrunch tests fail randomly
I have tests throughout the entire project that behave inconsistently when using NSubstitute: they pass or fail randomly at different locations, without any code modifications, simply by saving files. When this happens, only one random test will fail. When test fails, a similar error is thrown: …
04 Sep 2023 18:44 UTC