I created one Unit Test project where I am testing my view, but it does not show any result. Below is my code: -
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SinglePage.Controllers;
using System.Web.Mvc;
namespace UnitTestProject1
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
Console.WriteLine("METHOD");
HomeController ctrl = new HomeController();
Console.WriteLine("Pass");
ViewResult r = ctrl.Index() as ViewResult;
Assert.AreEqual("View1", r.ViewName);
}
}
}
After clicking the Run All button from Test Explorer, I get the message below:
------ Start test started ------
No plugin was found that can import the settings file with the extension '.csproj. Either select a new settings file or install an extension that understands this extension of the settings file.
========== Open the test: 0 found (0: 00: 00.0010010094) ==========
source
share