mstest

Comparison permormance Nunit vs MsTest

Hi, I'm trying to find good comparison about performance of mstest(VS 2008) and nunit(newest). I have found only atricles about features, not examples about times of execution :/ I would be grateful for help ...

Is defining TestMethod's in test base classes not supported by MsTest?

This question concerns a general unit test technique with a potentially very useful wide range of applicable scenarios. But it is easier to understand with an example to illustrate my question better. Let's say I want to test that all types that override Equals() does so correctly. Since Equals() is defined as virtual in System.Object, ...

Duplicate Output Problem with TestContext.WriteLine

I've made an "ordered test" in VS 2008 which executes 4 tests. One of the TestMethod tests it runs has several writeline statements, like this: TestContext.WriteLine("One"); TestContext.WriteLine("Two"); TestContext.WriteLine("Three"); The output I receive in the "Additional Information" of the results shows this output: One Two Thre...

Running only part of the set of all tests with MSTest

I'd like to know if there is any simple way of running with MSTests a certain category of tests. I currently have some Unit and Integration tests. Generally, I just want to run Unit-Tests. I know you can tag each test method with a category, but from what I've seen it seems like it is only useful if you want to create different tests li...

MS Web Test to upload files to sharepoint

0 HI All, I created a webtest to upload file to sharepoint and also made sure that the file that I upload while recording gets deployed to my test out folder by following this article. http://blogs.msdn.com/b/edglas/archive/2008/08/05/how-to-upload-a-file-in-a-web-test.aspx But when I run my test it runs successfully but doesn't uplo...

mstest in ui test with agent

i read that i can install agent in computer without vs 2010 and then using mstest, i did it and then after i record test in ultimate ,i build the project,copy the debug directory to the computer with the agent and run the following command: C:\Documents and Settings\erezg>"C:\Documents and Settings\erezg\Desktop\Debug\M STest.exe"/testco...

Running MSTest Unit tests As part of TeamBuild

I've been looking for a definitive web resource to help with this, but no luck so far. So :how do I run unit tests as part of a TFS build? I have a number of questions for this, so to make it easier I've numbered them in this post. Sorry for this post's length. Visual Studio Team System 2008 is installed on my build machine. I have a ...

Problem in Webtest - while running test containing file upload.

Hi, We've web application developed using MVC2. I am recording webtests for all views in our web app. I'm using VS2008 test edition installed on separate machine for these webtests. My problem is - my recorded webtests fail for a view. THis particular view contains 2 upload controls. Common errors are - 1. Request failed: Empty path na...

Unit Testing, Web Services and Database Transactions

I'm trying to write test cases for my web services in a way that I can rollback any database changes they may make. I can try to surround them with a transaction scope, but how do I specify a context for the transaction? In other words, how does the transaction know which database and server to rollback on? In my case, the SQL server ...

Tests for more inputs

Hi, I'm using MSTest for testing and when I want to apply more inputs then the test looks like this: [TestMethod] public void SumTest() { // data to test var items = new [] { new { First = 1, Second = 1, Expected = 2 }, new { First = -1, Second = 1, Expected = 0 }, new { First = 1, Second = 2, Expected = 3 }, new { ...

Visual Studio 2010 UnitTestAdapter could not be loaded

I have a few dozen VS Solution, each with a a VS Test project in it that I use at work and at home. One day, the tests (in one solution) stopped running, giving me the following error when I run the tests: The test adapter ('Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestAdapter, Microsoft.VisualStudio.QualityTools.Tips....

What happens between TestMethods in MS Visual Studio Unit Tests

The title says it - What happens between TestMethods in MS Visual Studio Unit Tests? I have a bunch of TestMethods in a TestClass that has a TestInitialize method. The TestInitialize method internally loads a Type via Reflection (eg. Type.GetType("MyContainer, MyContainerAssembly") ). MyContainer is a class that inherits from WindsorCo...

Is there an MS Test Runner that is faster

MS Test is killing me. It is so slow compared to NUnit. I am stuck with it because I need to be able to get Test Results into TFS easy. (Plus it works better with Pex and I am using that too). But I would really like it to go faster. Even just a bit faster would be nice. Has anyone made a test runner for MS Test tests that goes fas...

Correct way to unit test private variables

I have the following method: private string _google = @"http://www.google.com"; public ConnectionStatus CheckCommunicationLink() { //Test if we can get to Google (A happy website that should always be there). Uri googleURI = new Uri(_google); if (!IsUrlReachable(googleURI, mGoogleTestString)) { //The internet is...

Is there a way to Run MS Test using Gallio?

I have looked at other questions similar to this and they all seem to be Pre-RTM of Visual Studio 2010 (or they don't have a real answer). I have downloaded the latest version of Gallio and I am trying to run my MS Test Project using it. I added Gallio to my References in my MS Test Project then did a full build and then opened the com...

mstest can't find system.web.mvc assembly

I keep getting the following test run warning: Warning: Test Run deployment issue: The assembly or module 'Microsoft.Web.Mvc' directly or indirectly referenced by the test container 'c:\users\devlife\documents\notalis\notalisprojects\notalis web\branches\dev\source\notalis.web.tests\bin\debug\notalis.web.tests.dll' was not found. Any i...

Testing code in GAC deployed assemblies

Quite often I have unit tests using MSTest for code that is in a GAC deploy assembly. Typically on my development machine I also have a version of code deployed to the GAC. This results in an issue when making changes in the code under test because the unit tests keep running against the GAC deployed assembly. So, to actually test the ...

MSTest can not find App_GlobalResources assembly

Trying to unit test a web application using mstest I have that problem with resources included in App_GlobalResources folder in the web applications. Those resources are built at runtime and because of that they are not found when running the unit tests. How are you solving this problem? ...

where to find Microsoft.VisualStudio.QualityTools.Resource.dll?

I am in the process to setup our new Win7 build machine for our C# project. We don't want to install Visual Studio on that machine. So I am following the instruction "Running mstest without Visual Studio" to setup our machine. On step 3: Put Microsoft.VisualStudio.QualityTools.Resource.dll and Microsoft.VisualStudio.QualityTools...

DeploymentItem fails copying directories when there are multiple test projects per solution

I have a number of test classes and methods that copy a particular directory like so: [TestClass, DeploymentItem("LanguageData", "LanguageData")] public class OcrTests { [TestMethod] public void Can_Capture_Field() { // some code that expects the LanguageData directory to be in the test results Out directory } ...