Hi,
I'am having some issues when I'am using the library FakeDbSet. Using my unit test suite (NUnit), my tests goes well, but Ncrunch keeps showing me that there are errors, so if I change my test by adding space anyhere in the code, my tests goes green. Is this problem known?
You can take a look at the picture below:
[img=(- BROKEN LINK -)]Both test case[/img]
Remco NCrunch Developer
#7586
03 Aug 2015 22:35 UTC
Hi, thanks for sharing this issue.
My first thought is that the code under test may be providing an intermittent pass/fail result, depending upon which tests have been executed before it inside the process. See here for more details about this problem - http://www.ncrunch.net/documentation/considerations-and-constraints_test-atomicity.
Marking the test with the NCrunch.Framework.IsolatedAttribute is often a good way to troubleshoot this. If the test passes consistently with the attribute applied, this provides fairly solid evidence that the test is somehow sequence or state dependent.
My first thought is that the code under test may be providing an intermittent pass/fail result, depending upon which tests have been executed before it inside the process. See here for more details about this problem - http://www.ncrunch.net/documentation/considerations-and-constraints_test-atomicity.
Marking the test with the NCrunch.Framework.IsolatedAttribute is often a good way to troubleshoot this. If the test passes consistently with the attribute applied, this provides fairly solid evidence that the test is somehow sequence or state dependent.
Remco wrote:Hi, thanks for sharing this issue.
My first thought is that the code under test may be providing an intermittent pass/fail result, depending upon which tests have been executed before it inside the process. See here for more details about this problem - http://www.ncrunch.net/documentation/considerations-and-constraints_test-atomicity.
Marking the test with the NCrunch.Framework.IsolatedAttribute is often a good way to troubleshoot this. If the test passes consistently with the attribute applied, this provides fairly solid evidence that the test is somehow sequence or state dependent.
Hi,
We found the problem and you are right. For some reason, FakeDbSet keeps data shared in its implementation. Using hte IsolatedAttribute fixed the problem but we also found that there is an onverload to force the data cleanup in it's constructor (weird, but works).
Thank you.
Post a reply
Log in to reply.