I'm struggling to get any integration tests working with ASP.Net Core RC2. I created a basic web project that works fine in the browser, showing the default page as expected. Then I added a new class (in the same project) with the following test code:
[TestClass] public class HomeControllerTests { private HttpClient client; [TestInitialize] public void Initialize() {
The test fails with the following exception:
Index view not found. The following locations were searched:
/Views/Home/Index.cshtml
/Views/Shared/Index.cshtml
I am using MSTest, not xUnit at this point. Unfortunately, changing ContentRoot to what was suggested in the "recurring" question does not solve the problem.
Has anyone received integration tests? I tried to configure the settings of WebHostBuilder , but no luck.
source share