tagged [mstest]
No tests to execute msTest
No tests to execute msTest I'm trying to run .NET unit tests on the command line using MSTest My command is When run it returns > Starting execution... No tests to execute. The unit test runs perfect...
- Modified
- 21 Sep at 14:20
Visual Studio 15.8.1 not running MS unit tests
Visual Studio 15.8.1 not running MS unit tests When I updated Visual Studio to the latest version, 1 of my test projects stopped running tests and outputted this message: > Test project {} does not re...
- Modified
- 23 Aug at 13:29
MSTest Equivalent for NUnit's Parameterized Tests?
MSTest Equivalent for NUnit's Parameterized Tests? NUnit supports a feature where you can specify a set of data inputs for a unit test to be run multiple times. What's the best way to accomplish this ...
- Modified
- 3 Jun at 02:13
MS Test: Getting executing testlocation?
MS Test: Getting executing testlocation? How do I find the equivalent of a path to the executing assembly when running tests under MS Test in VS 2010? I need to know where the test is running from, so...
How to run ClassCleanup (MSTest) after each class with test?
How to run ClassCleanup (MSTest) after each class with test? I have several classes with tests suites. Each test class starts from ClassInitialize and finishes by ClassCleanup. My problem is that Clas...
DataTestMethod vs TestMethod
DataTestMethod vs TestMethod I started to use MSTest 2 `DataRow` attributes to check multiple cases in a single test: It works nicely, both in NCrunch and in CI. Only now I noticed that there is speci...
- Modified
- 25 Oct at 11:33
How can I get "Copy to Output Directory" to work with Unit Tests?
How can I get "Copy to Output Directory" to work with Unit Tests? When I build a unit test project before the tests are executed the test output is copied to a TestResults folder and then the tests ar...
- Modified
- 30 Sep at 08:55
How to set test category for all tests in the class
How to set test category for all tests in the class I am using [MSTest](https://en.wikipedia.org/wiki/MSTest), and I want to set the same test category for all methods in test class at once, without s...
- Modified
- 19 Nov at 15:34
Why does TestInitialize get fired for every test in my Visual Studio unit tests?
Why does TestInitialize get fired for every test in my Visual Studio unit tests? I'm using Visual Studio 2010 Beta 2. I've got a single `[TestClass]`, which has a `[TestInitialize]`, `[TestCleanup]` a...
- Modified
- 16 May at 19:24
private TestInitialize method is not initializing objects
private TestInitialize method is not initializing objects I have a test class that should basically be like the following: ``` [TestClass] public class MyTest { private MyClass o1; private MyClass...
- Modified
- 1 Nov at 13:11
MsTest ClassInitialize and Inheritance
MsTest ClassInitialize and Inheritance I have a base class for my tests which is composed in the following way: Now I am trying to create
How can we run a test method with multiple parameters in MSTest?
How can we run a test method with multiple parameters in MSTest? NUnit has a feature called Values, like below: This means that the test method will run six times: We're using MSTest now, b
- Modified
- 28 Jul at 21:10
What is the usage of Assert.Equals?
What is the usage of Assert.Equals? I am working on Unit Testing for my current project and came across something odd. The .Net UnitTesting library has both Assert.Equals and Assert.AreEqual. The [rem...
- Modified
- 1 Apr at 18:46
How To Read UnitTest Project's App.Config From Test With HostType("Moles")
How To Read UnitTest Project's App.Config From Test With HostType("Moles") I have the folowing tests: ``` [TestClass] public class GeneralTest { [TestMethod] public void VerifyAppDomainHasConfigur...
- Modified
- 11 Nov at 14:55
Your project does not reference ".NETFramework,Version=v4.6.2" framework. Add a reference to ".NETFramework,Version=v4.6.2" in the "TargetFrameworks"
Your project does not reference ".NETFramework,Version=v4.6.2" framework. Add a reference to ".NETFramework,Version=v4.6.2" in the "TargetFrameworks" I can't run my unit tests. I have the next error: ...
- Modified
- 16 Oct at 10:52
Visual Studio 2012 testing with csla and entity framework
Visual Studio 2012 testing with csla and entity framework In VS2010 my MSTest test run just fine. When running in VS2012 I am getting an error. The test sets the Csla.ApplicationContext.User with a Cu...
- Modified
- 6 Nov at 16:41
NUnit vs. MbUnit vs. MSTest vs. xUnit.net
NUnit vs. MbUnit vs. MSTest vs. xUnit.net There are quite a lot of unittesting frameworks out there for .NET. I found this little feature comparison: [http://xunit.github.io/docs/comparisons.html](htt...
- Modified
- 20 Jan at 11:24
Prevent MSTest from copying / deploying every dll
Prevent MSTest from copying / deploying every dll When running MSTest from Visual Studio - the unit test execution time is relatively quick. When running MSTest from the command line, with /testsettin...
- Modified
- 18 May at 14:34
Are multiple asserts bad in a unit test? Even if chaining?
Are multiple asserts bad in a unit test? Even if chaining? Is there anything wrong with checking so many things in this unit test?: ``` ActualModel = ActualResult.AssertViewRendered() // check 1 ...
- Modified
- 12 Mar at 04:3
What is the replacement for TestContext.DataRow["MyColumnName"]
What is the replacement for TestContext.DataRow["MyColumnName"] Using MSTest in a .Net Core Unit test project. I am attempting to use a csv datasource to provide the data for a test method. Previously...
- Modified
- 6 Jul at 15:59
MSTest Shows Partial Code Coverage on Compound Boolean Expressions
MSTest Shows Partial Code Coverage on Compound Boolean Expressions From Microsoft's documentation, partially covered code is I'm pretty stumped on this one (simplified for brevity): Given this method:
- Modified
- 18 Oct at 06:53
AssemblyInitialize method doesnt run before tests
AssemblyInitialize method doesnt run before tests I am using MsTest V2 framewrok for my tests. I have Test automation framework (TAF) project and project with tests. Tests project inherited from TAF a...
- Modified
- 4 Jan at 10:13
Explicitly call static constructor
Explicitly call static constructor I want to write unit test for below class. If name is other than "MyEntity" then mgr should be blank. Using Manager private accessor I want to change name to "Test"...
- Modified
- 17 Jul at 10:51
Ignore IgnoreAttribute
Ignore IgnoreAttribute We have MSTest tests which automatically run in hourly production. One of these tests is marked with `[Ignore]` attribute because it is not yet ready to run it in our production...
- Modified
- 12 Apr at 08:35