mstest

How do I tell MSTEST to run all test projects in a Solution?

你离开我真会死。 提交于 2019-12-03 09:49:15
I need to know how to tell MSTEST to run all test projects in a solution file. This needs to be done from the command line. Right now I have to pass it a specific project file, I'm trying to get it to run from a SOLUTION file. I'm hoping this is possible, because in Visual Studio, hitting Ctrl+R, A, runs ALL tests in the currently opened solution. The way I've interpretted the help files, you have to pass in each DLL specifically. I want to run this from the command line from my CruiseControl.NET server, so I can write other utilities to make this happen. If there is a wierd way of getting

How to set test category for all tests in the class

喜欢而已 提交于 2019-12-03 09:19:34
I am using MSTest , and I want to set the same test category for all methods in test class at once, without setting TestCategory attribute to each method individually. How can this be done? The most convenient and obvious way would be to set TestCategory attribute on class, but it can be applied to methods only. The ultimate goal is to skip integration tests during test run on TFS check-in. To be able to set the [TestCategory] attribute at the class level, install the “MSTest V2” TestFramework using NuGet. Ref: https://blogs.msdn.microsoft.com/devops/2016/06/17/taking-the-mstest-framework

Running native VS2012/C++ 64-bit unit tests from command line

删除回忆录丶 提交于 2019-12-03 08:56:10
问题 I'm attempting to run unit tests from the command line. I tried using the mstest.exe program using the following command: E:\VS Projects\...\>"C:\Program Files (x86)\Microsoft Visual Studio 11.0\ Common7\IDE\MSTest.exe" /testcontainer:mytest.dll /testsettings:"E:\VS Projects\...\Local.testsettings" The mstest program responce was: Microsoft (R) Test Execution Command Line Tool Version 11.0.50727.1 Copyright (c) Microsoft Corporation. All rights reserved. Loading E:\VS Projects\...\Local

MSTest Looking For DLL In Wrong Location

流过昼夜 提交于 2019-12-03 08:04:31
I have a test harness running and it was failing to run due to Type not resolved, which more specifically was a SerializationException on a bad bind. I used fuslogvw to track down where it was looking for the DLL and not finding it and I'm confused as to why it is looking in the location it is: === Pre-bind state information === LOG: DisplayName = DavisVision.Common.Data, Version=3.1.0.34, Culture=neutral, PublicKeyToken=c410b32babd148a6 (Fully-specified) LOG: Appbase = file:///C:/PROGRAM FILES (X86)/MICROSOFT VISUAL STUDIO 14.0/COMMON7/IDE/COMMONEXTENSIONS/MICROSOFT/TESTWINDOW/ LOG: Initial

Chromedriver is extremely slow on a specific machine using Selenium Grid and .net

前提是你 提交于 2019-12-03 06:44:07
问题 Overview: Chromedriver works normally on one machine but extremely slowly on two other identical machines. Setup: Selenium Webdriver using .Net for coding and Selenium Grid for distributing the tests. MSTest is being used from within Visual Studio 2010 in order to run the tests. A 64bit Windows 7 local machine acting as the Hub Three 32-bit Win 7 remote machines (two of them are virtual) on my local network all configured as nodes. Here is the command used to start the nodes on the remote

MSTest executing all my tests simultaneously breaks tests - what to do

偶尔善良 提交于 2019-12-03 06:28:51
问题 Ok, this is annoying. MSTest executes all of my tests simultaneously which causes some of them to fail. No this is not because my tests are fragile and susceptible to build order rather it is because this is a demo project in which I use a Db4o object database running from a file. So I have a couple of DataAccess tests checking that my repositories work correctly and boom, MSTest blows up. Since it tries to run all its tests at the same time it gets an error when a test tries to access the

Is summary necessary in unit test method

懵懂的女人 提交于 2019-12-03 06:07:55
Since the naming of a unit test method makes its purpose more meaningful, is it necessary to add a summary to a unit test method? Example: /// <summary> /// Check the FormatException should be thrown when a give country data line contains a invalid number. /// </summary> [TestMethod] public void FormatException_Should_Thrown_When_Parse_CountryLine_Containing_InvalidNumber() { ... } I think the long descriptive name is more important than the XML comment. Since the unit test isn't going to be part of an API, you don't need the XML comment. For Example: [TestMethod] public void FormatException

MSTest.exe not finding app.config

给你一囗甜甜゛ 提交于 2019-12-03 05:47:34
问题 I'm currently trying to run MSTest.exe from NCover, but I believe the question could apply generally to running MSTest.exe from the command line. If I have the "/noisolation" argument, then MSTest.exe appears to find and use the app.config as expected. Without it, NCover doesn't capture any coverage information. From my research so far, it seems NCover needs /noisolation. So the question is how to get my *.config files to work when that argument is passed. My NCover settings are: Application

How to set the working directory for MS Test projects

霸气de小男生 提交于 2019-12-03 05:32:58
how can I set the working directory for MS Tests projects, like I can do it for normal application projects? My Component that is tested need to access some config files that are also used by other applications. So far I have to copy these files the bin/debug folder of my test project, as these files are expected to be in the working directory. Is it possible to set a working directory for test projects? For those who use Visual Studio 2012, if you set the output directory of the test project under Properties|Build|OutputPath then that will become the working directory when you run the tests

Why does Visual Studio create a new .vsmdi file?

杀马特。学长 韩版系。学妹 提交于 2019-12-03 05:23:37
问题 If I open a solution in Visual Studio 2008 and run a unit test then VS creates a new .vsmdi file in the Solution Items folder and gives it the next number available e.g. My Solution2.vsmdi. Any idea why VS is doing this and how I can get it to stop doing this? 回答1: It appears that the VSMDI problem is a known bug and has been around since VS2005 Team System but it has no clear fix as yet. Another reason to NOT use MS Test. An MSDN blog details how to run unit tests without VSMDI files. 回答2: