Hello!
Trying to use NCrunch for integration tests against our REST-API using Owin TestServer. No problems when running other test-runners than NCrunch (e.g. Resharper) but when using NCrunch result is always 404 Not Found.
Anybody have a clue why?
Regards
>> Jonas
Remco NCrunch Developer
#11531
22 Nov 2017 08:14 UTC
Hi Jonas,
My best guess would be that the server can't find its end-points when it is being hosted in an NCrunch workspace.
I recommend taking a look at your test project when it is hosted in the NCrunch workspace (right click on the test project in the Tests Window, go to Advanced->Browse to workspace), to see how a test project exists when its tests are being run by NCrunch. It's possible this project has an implicit dependency on the web project hosting the endpoints.
Related documentation:
http://www.ncrunch.net/documentation/concepts_workspaces
http://www.ncrunch.net/documentation/considerations-and-constraints_project-atomicity
http://www.ncrunch.net/documentation/considerations-and-constraints_implicit-file-dependencies
My best guess would be that the server can't find its end-points when it is being hosted in an NCrunch workspace.
I recommend taking a look at your test project when it is hosted in the NCrunch workspace (right click on the test project in the Tests Window, go to Advanced->Browse to workspace), to see how a test project exists when its tests are being run by NCrunch. It's possible this project has an implicit dependency on the web project hosting the endpoints.
Related documentation:
http://www.ncrunch.net/documentation/concepts_workspaces
http://www.ncrunch.net/documentation/considerations-and-constraints_project-atomicity
http://www.ncrunch.net/documentation/considerations-and-constraints_implicit-file-dependencies
Thanks Remco
Did forget to mention that this is .NET Core.
Did forget to mention that this is .NET Core.
Remco NCrunch Developer
#11533
22 Nov 2017 10:14 UTC
Thanks. Are you using Microsoft.AspNet.TestHost?
Yes, Microsoft.AspNet.TestHost 2.0
I'm using the Microsoft.AspNetCore.TestHost.TestServer existing within the Microsoft.AspNetCore.TestHost nuget.
NCrunch working fine when using "ordinary" .NET Framework and it's Microsoft.Owin.Testing.TestServer .
I'm using the Microsoft.AspNetCore.TestHost.TestServer existing within the Microsoft.AspNetCore.TestHost nuget.
NCrunch working fine when using "ordinary" .NET Framework and it's Microsoft.Owin.Testing.TestServer .
Remco NCrunch Developer
#11535
22 Nov 2017 21:46 UTC
Try the build below and see how you go. We've had some on and off issues with TestHost over the last few months, and I'm aware of at least one problem existing in the v3.11 release that we've managed to fix:
http://downloads.ncrunch.net/NCrunch_Console_3.12.0.14.msi
http://downloads.ncrunch.net/NCrunch_Console_3.12.0.14.zip
http://downloads.ncrunch.net/NCrunch_GridNodeServer_3.12.0.14.msi
http://downloads.ncrunch.net/NCrunch_GridNodeServer_3.12.0.14.zip
http://downloads.ncrunch.net/NCrunch_LicenseServer_3.12.0.14.zip
http://downloads.ncrunch.net/NCrunch_VS2008_3.12.0.14.msi
http://downloads.ncrunch.net/NCrunch_VS2010_3.12.0.14.msi
http://downloads.ncrunch.net/NCrunch_VS2010_3.12.0.14.zip
http://downloads.ncrunch.net/NCrunch_VS2012_3.12.0.14.msi
http://downloads.ncrunch.net/NCrunch_VS2012_3.12.0.14.zip
http://downloads.ncrunch.net/NCrunch_VS2013_3.12.0.14.msi
http://downloads.ncrunch.net/NCrunch_VS2013_3.12.0.14.zip
http://downloads.ncrunch.net/NCrunch_VS2015_3.12.0.14.msi
http://downloads.ncrunch.net/NCrunch_VS2015_3.12.0.14.zip
http://downloads.ncrunch.net/NCrunch_VS2017_3.12.0.14.msi
http://downloads.ncrunch.net/NCrunch_VS2017_3.12.0.14.zip
http://downloads.ncrunch.net/NCrunch_Console_3.12.0.14.msi
http://downloads.ncrunch.net/NCrunch_Console_3.12.0.14.zip
http://downloads.ncrunch.net/NCrunch_GridNodeServer_3.12.0.14.msi
http://downloads.ncrunch.net/NCrunch_GridNodeServer_3.12.0.14.zip
http://downloads.ncrunch.net/NCrunch_LicenseServer_3.12.0.14.zip
http://downloads.ncrunch.net/NCrunch_VS2008_3.12.0.14.msi
http://downloads.ncrunch.net/NCrunch_VS2010_3.12.0.14.msi
http://downloads.ncrunch.net/NCrunch_VS2010_3.12.0.14.zip
http://downloads.ncrunch.net/NCrunch_VS2012_3.12.0.14.msi
http://downloads.ncrunch.net/NCrunch_VS2012_3.12.0.14.zip
http://downloads.ncrunch.net/NCrunch_VS2013_3.12.0.14.msi
http://downloads.ncrunch.net/NCrunch_VS2013_3.12.0.14.zip
http://downloads.ncrunch.net/NCrunch_VS2015_3.12.0.14.msi
http://downloads.ncrunch.net/NCrunch_VS2015_3.12.0.14.zip
http://downloads.ncrunch.net/NCrunch_VS2017_3.12.0.14.msi
http://downloads.ncrunch.net/NCrunch_VS2017_3.12.0.14.zip
Great
That version seems to fix the errors! Thanks!
That version seems to fix the errors! Thanks!
Post a reply
Log in to reply.