mstest

free automatic regression test tool for asp.net applications ?

we are working in a small team. We often had problems like developer1 did some changes in stored procedure or funtion and it affected work of developer2. Such issues are traced out by chance later. Please guide me how such issues can be stopped. Is there a free tool that we can run to test such issues. thanks ...

I'm trying to call MSTest from a console app inside an SVN pre-commit hook, but getting an error?

I am trying to call MSTest.exe from a simple console app that is executed from inside an SVN pre-commit hook. If I use TortoiseSVN to Commit, it auto-runs the console app code below. (skip after the code to see what happens...) // CODE static void Main(string[] args) { string testPath = @"C:\Users\myname\Documents\SVN\Test\bin\De...

how do I get MSTest to run as Administrator, when called from a console app?

This console app code calls MSTest and starts to run the unit test but fails with "Access Denied" to some assemblies required for unit testing (see errors below code). Any way to smoothly make MSTest to run as Admin from here? I tried a manifest, didn't change anything, since the manifest refers to the calling app, not to mstest, right...

how to set TestTimeout in DDT

Hi All, I'm running 100 of test cases from a xml data source using MSTest. But my test case execution never complete as few of my test cases doing something wrong. I wanted to know is there any way to specify test timeout time for individual test cases. I know in VS testrun config we can add this time. But this is for the entire test me...

How to print test details in Mstest command line

I'm running 100 tests using data driven concept. My data source is a xml. When I run my test project using Mstest.exe I don't get any details except "Loading .vsmdi...staring execution". And as my test cases takes 5 hrs to complete, till that time I need to wait whether its passed or fail. I have added some console.writeline in my test...

Spurious errors from WatiN with MSTest

I'm running MSTest to use the browser-automation framework, WatiN. When I run tests individually they always pass but however when I run the entire set of automation tests 7-8 tend to fail with different errors each time. All the tests are isolated and login to the site from the beginning every time, so I don't think it's related to the ...

Visual Studio 2008: Unit-Test methods in generic classes are not detected properly

Hi all I have a bunch of repository classes which I want to unit-test using Visual Studio 2008. They implement the following interface: public interface IRepository<TEntity> where TEntity : IEntity { /// <summary> /// Get entity by ID /// </summary> /// <param name="id">The ID</param> /// <returns></returns> TEn...

MSTest.exe not able to load ADO.NET Data providers?

I'm having a really strange issue with MSTest. I have a test that is more of an integration test, and needs to connect to the database. It does this by getting the ADO.NET data provider factory through a call to: var factory = DbProviderFactories.GetFactory("Oracle.DataAccess.Client"); In my app.config file, I have: <system.data> ...

Are the tests that MsTest generates actual unit tests?

Visual Studio 2010 generated a bunch of unit tests for me which seems to be handy, but I question whether they are actual unit tests. For example, it generated a test it called SaveTest which executes the following code: User user = new User(); //I have to create a user user.Save(); //This saves the user to the database. //Assertions ...

Outputing text in UnitTests

When i run my unit tests, i would like to print out and read how long it takes to run a function. I tried using Console.WriteLine() Trace.WriteLine() but that didn't work. Anyone know the proper method i should be using? I have the following unit test [TestMethod()] public void ProductSerializationTest() { Stopwatch swSerializatio...

Do MSTest deployment items only work when present in the project test settings file?

I can't seem to grasp how MSTest deployment items are supposed to be configured. I have been able to get them working properly by modifying the project's test settings file, but this is less then ideal -- the deployment item configuration is separated from individual tests, and the file paths appear to be stored as absolute paths unless ...

How to obtain test case name in Visual Studio Test Framework at runtime?

Hi All, How can i get test case name during runtime in Visual Studio Test Framework? I am using VS 2010 to write my unit test cases and I need to get test case name during Test Init for each test and save those in file. Sample Code [TestInitialize()] public void MyTestInitialize() { string testCaseName = /...

Skip unit tests that take a long time

Hi, I'm working with MS-Test for my unit tests writing. most of my tests have a duration of less than 0.1 seconds. I want to somehow tell VS "ignore the tests that take a long time to run when i'm running the tests manually, and when you run them on the build do not ignore them. I know that in nunit there is an "explicit" attribute tha...

How to run Coded UI Tests without Visual Studio 2010 Premium

Hi, I want to ask you if it is possible to build and run coded ui tests without Visual Studio 2010 Premium installed? Or can I just install Visual Studio 2010 Premium and use it command line without licensing? I know it works, but is the license ok with that? ...

Stop VS2008 Unit Tests from creating loads of files?

After years of faithful nUnit use, I'm having a fling with the Visual Studio Unit Testing framework thats built into VS2008. Apart from the crushing guilt ; ) ... one of the issues is that 'VSTest' creates a file and a folder every time you run tests, and those files ('Visual Studio Test Results File') and folders really build up over t...

How much faster is NUnit compared to MSTest

Roy Osherove, author of The Art Of Unit Testing, has commented on a blog that of the many things NUnit supposedly does better, it being much faster is one of them. My question is how much faster though, if at all? Are we talking an order of magnitude? 10%? 50%? I'm asking this because for the moment I can't compare the two. I am tryin...

How slow is too slow for unit tests?

Michael Feathers, in Working Effectively With Legacy Code, on pages 13-14 mentions: A unit test that takes 1/10th of a second to run is a slow unit test... If [unit tests] don't run fast, they aren't unit tests. I can understand why 1/10th a second is too slow if one has 30,000 tests, as it would take close to an hour to run....

How to run a single test case from MSTEST

Hi All, I am using MStest to run a single test case but could not find a correct command I tried: 1)mstest.exe /testcontainer:testproject.dll /test:MethodTest1 This run all the test case starting from name MethodTest1. I have other test name Like MethodTest100, MethodTest101 2)mstest.exe /testcontainer:testproject.dll /test:MethodTes...

WPF - XamlParseException when unit testing method in Window class

I'm trying to use MSTest to write unit tests for methods in my MainWindow class in my WPF application. However, I get the following exception: System.Windows.Markup.XamlParseException: 'Provide value on 'System.Windows.StaticResourceExtension' threw an exception.' Line number '127' and line position '32'. ---> System.Exception: Cann...

Perform Visual Studio Data Compare automatically prior to running MSTest tests

I need to perform a data compare operation to refresh a dev database froma sample data database prior to running integration tests using the VS test harness. Anyone know a way to automatically configure this? ...