UPDATE: SO I am getting the error whenever I have all meta tags like HostType,AspNetDevelopmentServerHost,URLToTest. So when I comment these tags I can run the test but I need to have these tags to have the connection string available for controller to connect to database. I created a basic unit test by just right clicking on the action in asp.net mvc and saying Create unit tests...I am just trying to run a basic unit test.I am getting this error -
The test adapter 'WebHostAdapter' threw an exception while running test 'IndexTest'. The web site could not be configured correctly; getting ASP.NET process information failed. Requesting 'http://localhost:55767/VSEnterpriseHelper.axd' returned an error: The remote server returned an error: (500) Internal Server Error.
This is my method -
[TestMethod()] [HostType("ASP.NET")] [AspNetDevelopmentServerHost("C:\\Users\\Administrator\\Desktop\\MyWebsite\\Websites\\Customer1\\Customer1", "/")] [UrlToTest("http://localhost:55767/Admin/Dashboard")] public void IndexTest() { DashboardController target = new DashboardController(); // TODO: Initialize to an appropriate value string id = string.Empty; // TODO: Initialize to an appropriate value ActionResult expected = null; // TODO: Initialize to an appropriate value ActionResult actual; actual = target.Index(id); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); } Any ideas what would be the problem here ? I tried to google but didnt get a good solution for my problem. I am using VS2010 Ultimate and asp.net mvc 2.0.