Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run Mstests on a Mac?

I have a need to write some mstests and run these tests on a Mac. The binaries for the source code being tested are already up and running on Mac.

To run test automation written in Visual studio, do I follow the same process? Any pointers on how to get started with running these test cases using Mono on a Mac?

like image 282
RashMans Avatar asked Sep 02 '11 20:09

RashMans


1 Answers

I know this issue is old but I came across it while searching for solutions for running MSTest on my mac. I'll investigate the above but also worth noting that MSTest support on VS 4 Mac is imminent:

MSTest support in Visual Studio for Mac will be available in 15.5 release cycle aka VSfM 7.3, which is planned to hit Alpha channel in few weeks. (20th September 2017)

See this github issue

However - if you can't wait - you can use the dotnet cli command:

dotnet test CreditCardValidator.iOS.MSTestAppium/CreditCardValidator.iOS.MSTestAppium.csproj

Build started, please wait... Build completed.

Test run for /Users/owenniblock/test-apps/CCExampleAppium/CreditCardValidator.iOS.MSTestAppium/bin/Debug/netcoreapp2.0/CreditCardValidator.iOS.MSTestAppium.dll(.NETCoreApp,Version=v2.0) Microsoft (R) Test Execution Command Line Tool Version

15.3.0-preview-20170628-02 Copyright (c) Microsoft Corporation. All rights reserved.

Starting test execution, please wait... Failed

CreditCardValidator.iOS.MSTestAppium.Tests.IntentionalFailure Error Message: Assert.IsTrue failed. Stack Trace: at CreditCardValidator.iOS.MSTestAppium.Tests.IntentionalFailure() in /Users/owenniblock/test-apps/CCExampleAppium/CreditCardValidator.iOS.MSTestAppium/Tests.cs:line 21

Total tests: 3. Passed: 2. Failed: 1. Skipped: 0. Test Run Failed.

Test execution time: 1.0736 Seconds

like image 156
Owen Niblock Avatar answered Sep 29 '22 00:09

Owen Niblock