mstest

Error trying to run mstest on jenkins

隐身守侯 提交于 2019-11-29 01:13:45
I´m trying to configure MSTest build plugin on jenkins, but I´m getting the following error: Path To MSTest.exe: mstest.exe Result file was not found so no action has been taken. file:/C:/Program%20Files%20(x86)/Jenkins/jobs/SoftwrenchvNext/workspace/TestResult.trx FATAL: null java.lang.NullPointerException at org.jenkinsci.plugins.MsTestBuilder.perform(MsTestBuilder.java:144) The configuration simply specifies TestResult.trx as ResultFileName. This file is not versioned, and I expect it to be created on each build. What needs to be done for that? sky-dev I too had this exact same error

Running VSTS tests without mstest.exe

好久不见. 提交于 2019-11-29 01:12:21
问题 From reasons I won't get into, all our unit tests are using the VSTS test framework. I now want to create an MSBuild script that runs the tests, but I don't want to use mstest.exe from various reasons (it's slower, requires Visual Studio installation everywhere, I need to maintain testrunconfig, etc.) I've seen that TestDriven.net and TeamCity are able to run VSTS tests 'NUnit style', without using mstest.exe. Are you aware of any standalone command line utility that does this? 回答1: You can

In MSTest, How can I verify exact error message using [ExpectedException(typeof(ApplicationException))]

佐手、 提交于 2019-11-29 00:58:38
Using MSTest how can I verify the exact error message coming from a test method? I know [ExpectedException(typeof(ApplicationException), error msg)] doesn't compare the error message coming from my test method, though in other unit test framework it is doing. One way to solve this problem is to write my unit test using some try catch block, but again I need to write 4 lines more. Is there any smartest way to check the error message. Cheers, Pritam You can create your own ExpectedException attribute where you can Assert the message of the Exception that was thrown. Code namespace TestProject {

Parse Fitnesse RESTFul XML output into TFS Test format

谁都会走 提交于 2019-11-29 00:16:56
I'm integrating a Fitnesse Acceptance test suite into a TFS based CI process. I can run the Fitnesse Test suite in a RESTful manner ( http://fitnesse.org/FitNesse.UserGuide.RestfulTests ): http://myfitnesseserver/MyTestSuite?suite&format=xml and get back an XML document of test results. I'd like to transform that into a format that TFS can interpret as number of tests passed / failed. Any pointers? Thanks I have a similar goal at work, so I created a generic command-line Fitnesse test runner that executes a test or suite as a web request, parses the resulting XML and transforms it using the

Does VS2010 Code Coverage support nUnit?

江枫思渺然 提交于 2019-11-28 22:29:46
问题 According to this schema VS2010 Premium and Ultimate has a tool for checking Code Coverage - together with a few other testing tools. Does this support nUnit too, or just MS test? 回答1: It's doable, but requires a bit of setup. I just got it working with xUnit. Presumably the below will work with NUnit too. For this to work, you'll need three projects The System Under Test -- SUT A testing project using your favorite unit testing framework -- xUnitTest A VS Test Project -- VSTest Create the

MSTest: No tests are run because no tests are loaded or the selected tests are disabled

女生的网名这么多〃 提交于 2019-11-28 21:21:02
问题 I have a c# solution with the following structure: mySolution myProject myProject.MSTests References Microsoft.VisualStudio.QualityTools.UnitTestFramework sutMSTests.cs sutMSTests.cs: [TestClass()] public class sutMSTests { [TestMethod] public void MyTest0() { Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(4, 2 + 2); } } When I try to run the tests via Test, Run, All Tests In Solution, I get the following on the VS2008 status line: No tests are run because no tests are loaded or

MSTest and app.config issue

匆匆过客 提交于 2019-11-28 21:06:28
I am stuck trying to automate unit tests runs with MSTest and deployment of app.config. I read multiple posts and blogs, tried multiple things and yet still app.config doesn't seem to be picked up during MSTest execution. Having a dll that contains all my unit tests built with msbuild, here is what I've tried... Attempt 1 Copied app.config to the same location with MyTests.dll as MyTests.dll.config (on one of the msdn forums it was said it'd be picked up automagically) Added [DeploymentItem("MyTests.dll.config")] attribute to each test Ran MSTest.exe /noisolation /testcontainer:d:\MyTestTests

Running mstest from command line against Visual Studio 2012 native C++ tests

风格不统一 提交于 2019-11-28 19:13:49
I have a Visual Studio 2012 Solution with a number of native c++ test projects. I can run all of these correctly and successfully from within Visual Studio 2012 using the Test Explorer tab. However, I cannot get the tests to run when running from the command line. Following the documentation I have been running the following command line mstest /testcontainer:PathToTestProject\Win32\Release\testproject.dll I also need to run mstest /testcontainer:PathToTestProject\x64\Release\testproject.dll for the testing of the 64bit version of the code. When I run these command lines I get the following

Integrating Hudson with MS Test?

我与影子孤独终老i 提交于 2019-11-28 18:21:44
Is it possible to integrate Hudson with MS Test? I am setting up a smaller CI server on my development machine with Hudson right now, just so that I can have some statistics (ie. FxCop and compiler warnings). Of course, it would also be nice if it could just run my unit tests and present their output. Up to now, I have added the following batch task to Hudson, which makes it run the tests properly. "%PROGRAMFILES%\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" /runconfig:LocalTestRun.testrunconfig /testcontainer:Tests\bin\Debug\Tests.dll However, as far as I know, Hudson does not support

Is there anything I can do in NUnit that I can't do in MSTest?

坚强是说给别人听的谎言 提交于 2019-11-28 17:25:24
问题 This question has been asked in various forms in a number of different forums, but, IMHO, I haven't been able to find a place where it's really answered clearly, so I'm going to reframe it and ask it again. I work in a basically Microsoft Shop. We use TFS, and all of our developers have MSDN subscriptions including the Team Suite edition of VS. So we have access to MSTest. I've read the various NUnit vs. MSTest comparisons, and the developer community seems to pretty much overwhelmingly