mstest

Jenkins MSTestRunner plugin is unable to launch mstest.exe

半城伤御伤魂 提交于 2019-12-11 05:53:54
问题 I've configured the Jenkins MSTestRunner plugin to use the following path to the MSTest executable: 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\mstest.exe'. However, although this path is correct, the build fails as follows: cmd.exe /C "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\mstest.exe" "/resultsfile:/resultsfile testresults" /testcontainer:Project.Tests/bin/Debug/Project.Tests.dll && exit %%ERRORLEVEL%% 'C:\Program' is not recognized as an

Web testing frameworks for ASP.NET web application

给你一囗甜甜゛ 提交于 2019-12-11 05:39:35
问题 I'm trying to implement some front end testing in a ASP.NET web application, and I would like to know how do the several web testing frameworks compare. Especially MSTest's "Web Tests", because I haven't seen a lot of info about them, and since it seems to have a nice integration with Visual Studio. Related posts: WatiN or Selenium? Watir vs Selenium vs Sahi Selenium WatiN Visual Studio Team System "Web Tests" Thanks in advance. 回答1: One important thing to note about the Microsoft Web Tests

junit test results in tfs

人盡茶涼 提交于 2019-12-11 04:07:21
问题 How to make TFS 2010 show junit test results, that were generated by third-party tool? If it can't, probably, there is a way to convert junit report to xunit/nunit/mstest report. It would be also great! Thanks. 回答1: In order to publish Junit tests during TFS-Build you can make use of TFS Build Extension Power Tool. In there you can find a set of XSLT transforms from JUnit output into TRX. Employing TFS-Build to upload TRX should from then be possible. 来源: https://stackoverflow.com/questions

How to use custom logger for vs test?

跟風遠走 提交于 2019-12-11 03:53:09
问题 I'm trying to use this custom Teamcity logger for VsTest per https://github.com/JakeGinnivan/VSTest.TeamCityLogger and http://msdn.microsoft.com/en-us/library/vstudio/jj155796.aspx After copying the vstest.teamcity.logger.dll to C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions I have it working with the command "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console

Setting timeouts for a test suite in mstest

放肆的年华 提交于 2019-12-11 03:45:25
问题 Is there a way to set timeouts for a whole test suite in mstest, or just for individual tests? I.E., if I want the total running time of the tests in suite X to be no more than 2 minutes, how do I do that? 回答1: Add the test settings file and change the timeout settings. Go over link - Specifying Test Settings for Visual Studio Tests Add test settings files to your solution, and then select the one you want to use. You can add more than one test settings file if you want to be able to switch

Error when changing to <TargetFrameworks> (plural) in .NET Core csproj file

流过昼夜 提交于 2019-12-11 03:35:13
问题 I was following a tutorial on Pluralsight about having an MSTest project target both .net core 2.2 AND .NET 4.7.2. This required going to my .csproj file for my test project and editing it so that the following: <PropertyGroup> <TargetFramework>netcoreapp2.2</TargetFramework> ... would change to become TargetFramework s (that's plural now) and then we add in the .NET 4.7.2 moniker, as follows: <PropertyGroup> <TargetFrameworks>netcoreapp2.2;net472</TargetFrameworks> ... As soon as I saved the

Testing code in GAC deployed assemblies

∥☆過路亽.° 提交于 2019-12-11 03:22:35
问题 Quite often I have unit tests using MSTest for code that is in a GAC deploy assembly. Typically on my development machine I also have a version of code deployed to the GAC. This results in an issue when making changes in the code under test because the unit tests keep running against the GAC deployed assembly. So, to actually test the changed code I have to re-deploy the assembly to the GAC before running the tests. Thats is quite error-prone and not easy to work with. Does anyone have a good

Strategy to simulate events in object under test

…衆ロ難τιáo~ 提交于 2019-12-11 03:08:47
问题 BRAND NEW to unit testing, I mean really new. I've read quite a bit and am moving slowly, trying to follow best practices as I go. I'm using MS-Test in Visual Studio 2010. I have come up against a requirement that I'm not quite sure how to proceed on. I'm working on a component that's responsible for interacting with external hardware. There are a few more developers on this project and they don't have access to the hardware so I've implemented a "dummy" or simulated implementation of the

Timeout in c# tests

白昼怎懂夜的黑 提交于 2019-12-11 02:37:11
问题 Can anyone tell if finally is always executed after a test times out or not. [Timeout(1000)][TestMethod] public void test() { try { System.Threading.Thread.Sleep(2000); } finally { //do something } } 回答1: Finally is executed always , doesn't matter if u have try/catch/ block, it is executed when any of those are finished 回答2: If possible, use the TestCleanUp method in order to do work after the test if it is subject to timeouts. 来源: https://stackoverflow.com/questions/13514672/timeout-in-c

Unit testing Windows store app - MSBuild, MSTest and TeamCity

社会主义新天地 提交于 2019-12-11 02:30:03
问题 I'm trying to setup CI server (TeamCity 7) and run daily build and smoke test on it for Windows store app. The smoke test should just launch the app, wait for 5 seconds and exit. I created MSBuild script that compiles the code (after watching Pluralsight course on continuous integration). In my solution first project is Blank Windows store app, and second is Tests (Unit Test Library (Windows Store apps) - as described at http://msdn.microsoft.com/en-us/library/vstudio/hh440545.aspx). But I