Hi I've created some async unit tests using NUnit 2.6.2 and .NET 4.5
NUnit and the Resharper test runner run them fine, but NCrunch doesn't detect them.
NCrunch clearly compiles the code ok, because it runs my synchronous test fine.
I'm using Visual Studio 2012, NCrunch version 1.44.0.11.
This runs:
[Test]
public void SynchronousTest()
{
Assert.True(true);
}
But this doesn't:
[Test]
public async Task AsyncTest()
{
await Task.FromResult(3);
}
Hope you can fix it...
Remco NCrunch Developer
#3581
24 Jan 2013 07:24 UTC
Hi John,
NCrunch doesn't yet have the latest version of NUnit (2.6.2) packaged with it, so it won't work with NUnit async tests straight out of the box.
However, something you may want to try is updating the NUnit binaries used by NCrunch. Replace the following files with their equivalents from the latest version of NUnit:
\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2012\nunit.core.interfaces.dll
\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2012\nunit.core.dll
A quick test from my side shows that this allows the async tasks to work correctly. I haven't yet had a chance to exhaustively regression test compatibility with the new version of NUnit, but the scope of changes in this revision doesn't look big, so hopefully replacing these files won't surface any other problems. I've made a new to include the newest binaries in the next minor revision of NCrunch.
Cheers,
Remco
NCrunch doesn't yet have the latest version of NUnit (2.6.2) packaged with it, so it won't work with NUnit async tests straight out of the box.
However, something you may want to try is updating the NUnit binaries used by NCrunch. Replace the following files with their equivalents from the latest version of NUnit:
\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2012\nunit.core.interfaces.dll
\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2012\nunit.core.dll
A quick test from my side shows that this allows the async tasks to work correctly. I haven't yet had a chance to exhaustively regression test compatibility with the new version of NUnit, but the scope of changes in this revision doesn't look big, so hopefully replacing these files won't surface any other problems. I've made a new to include the newest binaries in the next minor revision of NCrunch.
Cheers,
Remco
Thanks for the speedy response,
I'll give it a try.
Oh, and I forgot to say; Thanks for a great product, and for great service.
I'll give it a try.
Oh, and I forgot to say; Thanks for a great product, and for great service.
Yep, that worked.
Thanks again.
Thanks again.
Remco NCrunch Developer
#3909
30 Mar 2013 22:08 UTC
For anyone interested, support for NUnit 2.6.2 with async tests has been introduced with the newly released version of NCrunch (v1.45).
Remco wrote:For anyone interested, support for NUnit 2.6.2 with async tests has been introduced with the newly released version of NCrunch (v1.45).
Async NUnit SetUp methods have the same issue, and none of the test methods in classes with async setup are recognized by NCrunch. I'm running NCrunch v1.46.0.20 and my current workaround is to do the async initialization in the test methods themselves.
Thanks for creating this great product :)
- Joar
Remco NCrunch Developer
#4478
02 Aug 2013 23:09 UTC
Thanks Joar - I can confirm that NCrunch isn't working with async NUnit setup methods. I've logged this down to be fixed in the next maintenance release.
Post a reply
Log in to reply.