mstest

Where are mstest data-driven unit test results stored in tfs warehouse?

Can anyone tell me if/where mstest data-driven test results (specifically the error messages) are stored in the tfs warehouse? In DimTestResult column error messages are populated for non-datadriven tests.... ...

ClassCleanup in MSTest is static, but the build server uses nunit to run the unit tests. How can i adjust?

Hi All, MSTest has a [ClassCleanup()] attribute, which needs to be static as far as I can tell. I like to run through after my unit tests have run,and clean up my database. This all works great, however when I go to our build server and use our Nant build script, it seems like the unit tests are run with NUnit. NUnit doesn't seem to lik...

Multiple Asserts in a Unit Test

I've just finished reading Roy Osherove's "The Art of Unit Testing" and I am trying to adhere to the best practices he lays out in the book. One of those best practices is to not use multiple asserts in a test method. The reason for this rule is fairly clear to me, but it makes me wonder... If I have a method like: public Foo MakeFoo(i...

how often should the entire suite of a system's unit tests be run?

Generally, I'm still very much a unit testing neophyte. BTW, you may also see this question on other forums like xUnit.net, et cetera, because it's an important question to me. I apoligize in advance for my cross posting; your opinions are very important to me and not everyone in this forum belongs to the other forums too. I was ...

VS2010 MSTest CruiseControl.NET .NET 3.5

Hi, We're in the process of upgrading from VS2008 to VS2010 since it's now released. We are using CC.NET along with MSTest and want to use MS coverage tool instead of NCover. Interestingly, as I've seen others talking about as well, when you upgrade your project from VS2008 to VS2010 your Test Projects get converted to .NET 4. Nice move...

Can Visual Studio 2010 Test .net 3.5 SP1 Projects?

I have some projects in a solution that are running on .net 3.5 SP1 (and can never ever be updated to 4.0 as they are SharePoint projects). When I try to create a new Visual C# Test Project in VS2010 Premium, I have to choose .net 4.0 which is apparently intended. Now I don't care about what my Unit Test project is (don't have to care ...

Ms Test or NUnit?

Is there any advantage to picking NUnit for unit/integration testing vs the built in MsTest? ...

Running NUnit tests in Visual Studio 2010 with code coverage

We have recently upgraded from Visual Studio 2008 to Visual Studio 2010. As part of our code base, we have a very large set of NUnit tests. We would like to be able to run these unit tests within Visual Studio, but with code coverage enabled. We have ReSharper, so can run the tests within Visual Studio, but it does not allow the code co...

Getting path of file copied after deployment in a unit test

The connection string in my app.config for my C# project looks like Data Source=.\SQLEXPRESS;AttachDbFilename='|DataDirectory|\EIC.mdf';Integrated Security=True;User Instance=True" I am writing unit tests for the project and have the set the test run configuration to copy the EIC.mdf, but I do am not able to reference the Deployed cop...

Which unit test framework in VS2010 - MSTest or NUnit?

Possible Duplicates: Ms Test or NUnit? NUnit vs Visual Studio 2008s Test Projects for Unit Testing? what test data approach/framework is recommended for .net unit testing Are there real differences between NUnit and Microsofts Unit Testing Framework (VS 2008)? Any recommendations re whether to got MSTest or NUnit for a ...

what test data approach/framework is recommended for .net unit testing

Hi, what test data approach/framework is recommended for .net unit testing? I'm in VS2010, C#, doing business logic layer testing. By approaches I mean like: creating database snapshots, programmatically creating each time, etc etc. Like what approach to use to ensure at the start of each test the database is in a known state. ...

Un able to run MSTest Tests with code coverage enabled while using NHibernate

i'm unable to run MSTest Tests with code coverage enabled while using NHibernate i get the following error message Unit Test Adapter threw exception: Type is not resolved for member 'NHibernate.Cfg.HibernateConfigException,NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4'.. edit : Same thing...

Testing UI with MsTest

With NUnit, I could use NUnitForms to test the UI. It's massively cumbersome, but it gets the job done. Is there something similar for MsTest for the version shipping in VS2008? ...

Problem: writing parameter values to data driven MSTEST output

Hi, I am trying to extract some information about the parameter variants used in an MSTEST data driven test case from trx file. Currently, For data driven tests, I get the output of same testcase with different inputs as a sequence of tags , but there is no info about the value of the variants. Example: Suppose we have a [data drive...

Any way to separate unit tests from integration tests in VS2008?

I have a project full of tests, unit and integration alike. Integration tests require that a pretty large database be present, so it's difficult to make it a part of the build process simply because of the time that it takes to re-initialize the database. Is there a way to somehow separate unit tests from integration tests and have the...

MSTest code coverage

Hi, I have a test project for a web service and, when I run tests in debug mode, everything works ok. However, when I just run tests, I get following error, for a referenced assembly that I try to obtain code coverage: Class Initialization method WebServiceTest.wstest.MyClassInitialize threw exception. System.IO.FileLoadException: Sys...

MSTest unit test passes by itself, fails when other tests are run

I'm having trouble with some MSTest unit tests that pass when I run them individually but fail when I run the entire unit test class. The tests test some code that SLaks helped me with earlier, and he warned me what I was doing wasn't thread-safe. However, now my code is more complicated and I don't know how to go about making it threa...

Problems with data driven testing in MSTest

Hello, I am trying to get data driven testing to work in C# with MSTest/Selenium. Here is a sample of some of my code trying to set it up: [TestClass] public class NewTest { private ISelenium selenium; private StringBuilder verificationErrors; [DeploymentItem("GoogleTestData.xls")] [DataSource("System.Data.OleDb", "...

Global.asax for Unit Tests?

In my MSTest UnitTest project, before running any tests, I need to execute some commands. Is there a feature, kind of like Global.asax is for web based projects, that will let me kick off something before any tests run? I should make it clear that when I say "execute some commands", I don't mean DOS commands, but execute some code. ...

MSTest in Express editions of Visual Studio 2010

I'm leaning toward using MSTest as unit testing framework for a new project but I'm concerned with cutting off developers (maybe even myself in the future and/or in some specific environment) using Express editions of Visual Studio. I know MSTest wasn't available in VS2008 Express but with Microsoft pushing unit testing in recent years ...