I have migrated a VS2008 ASP.NET MVC solution to VS2010/MVC2/.NET 4.0 The solution builds locally and all unit tests pass.
Our TFS server is still TFS2008 and I am having problems getting the CI build to pass.
The projects all build successfully, the unit tests all run and pass but the Running Tests item fails.
I followed this blog p...
I am working with Visual Studio 2010 and it's integrated testing functionality.
I have an XML file in my project which is set to copy to the output directory. I can access the file just fine when I compile and run the project. But it doesn't exist when I attempt to access it within a TestMethod.
It looks like the test is run with the ...
Hi,
I have seen VS2010 exposing Network Emulator API. I have installed it and trying to use this API, but not able detect whether it is really running with this code or not. Sometime I have given wrong profile name but it does not throw any error. Please find below my piece of code. If some one have used it please help me.
IntPtr m_emu...
Yesterday, I decided to install the newest NCover version (3.4.2). However, when I ran it on my existing .ncover configuration file, the NCover output suddenly reported that all my MSTest tests failed. Of course those tests succeed when ran within Visual Studio. Because of this, NCover isn't able to determine any coverage.
Somehow the o...
I am setting up some MSTest based unit tests. To make my life easier I want to use a base class that handles the generic setup and taredown all of my tests require. My base class looks like this:
[TestClass]
public class DBTestBase {
public TestContext TestContext { get; set; }
[ClassInitialize()]
public static void MyCla...
I am trying to unit test a lot of my MVC controllers, but unfortunately it keeps failing because it needs a lot of settings from the web.config..
Which I copied over but does not read it, what I'm needing is the membership and rolemanager but I can't just add it to the app.config either, which I've been able to get the connection string...
I know the answer may differ for each test framework. But for the ones you know, what should happen?
...
ReSharper 4.5's test runner will run MSTest tests out of the box, and that's what I'm doing. When a test fails, I click on the test to see the stacktrace and the failure reason. The pane I'm clicking in to do this is the "Unit Test Sessions" pane.
The lower half of this pane (or the right half, if you have it configured that way) show...
I have a few repository classes that are meant to talk to different kinds of data, deriving from an IRepository interface laid out like so:
In implementations, the code talks to a data source, be this a directory of XML files or a database or even just a cache. Is it possible to reliably unit test any of these implementations? I don't...
When I run my Unit Tests, all tests pass, but instead of "Test run succeeded" or whatever the success message is, I get "Test run error" in the little bar that tells me how many of my tests pass, even though all my tests passed.
When i click the text, I'm taken to a page that tells me the following two things happened:
Warning: conf...
Here's the scenario:
Change my code:
Change my unit test for that code
With the cursor inside the unit test class/method, invoke VS2008's "Run tests in current context" command
The visual studio "Output" window indicates that the code dll and the test dll both successfully build (in that order)
The problem is however, that the unit t...
I need to copy all files and subfolders from a specified path to my testrun Out folder. I only want this to happen for certain tests (so, no global solution, like the Deployment section in the Testrunconfig file). I have a solution structure like this
Solution\
Project\
Project.Test\
Resources\
FolderA\
Fold...
I have a .net test class. In the Initialize method, I create a windsor container and make some registrations. In the actual test method, I call a method on the controller class but the interceptor does not work and the method gets directly called. What are potential reasons for this?
Here is all the related code:
Test.cs:
private Some...
I need to run MSTest on an assembly referenced by a UNC path. When I try I get a generic error, which Google tells me is trust related.The machine where MSTest runs and the network host are both Server2008R2 (in some circumstances the same machine).
For example, running this works fine:
mstest /testcontainer:c:\builds\SimpleLibraryT...
In Visual Studio 2010, I have a number of unit tests. When I run multiple tests at one time using test lists, I sometimes reveive the following error for one or more of the tests:
The agent process was stopped while
the test was running.
It is never the same test failing, and if I try to run the test again, it succeeds.
I found ...
I've got an MVC web application with associated controller tests that run under a TFS build as per normal.
I can see the tests running and passing in the build log and they appear in the "Result details for Any CPU/Release" section of the build
I also have a number of other assemblies with associated tests that are running in the same ...
I'm trying to publish test results to TFS2010 using MSTest's /publish parameters. MSTest says that the publish was successful, and looking at the SQLServer tables, data for the test has been uploaded. However, the test results do no appear in the TFS Build reports.
If I use TFS to run MSBuild via the default build template, the results...
Is there something like that in MSTest?
Thanks
...
I'm making my first steps in Test Driven Development with Visual Studio. I have some questions regarding how to implement generic classes with VS 2010.
First, let's say I want to implement my own version of an ArrayList.
I start by creating the following test (I'm using in this case MSTest):
[TestMethod]
public void Add_10_Items_Remove...
We are getting an Automapper error the FIRST time we run our Unit Tests in VS 2008 (MSTest).
"Missing type map configuration or unsupported mapping. Exception of type 'AutoMapper.AutoMapperMappingException' was thrown"
If we re-run the tests ("Run Checked Tests") then they all pass. Only 2 out of the 4 developers are having this issue. ...