我需要编写一些 mstests 并在 Mac 上运行这些测试。正在测试的源代码的二进制文件已经在 Mac 上启动并运行。
要运行在 Visual Studio 中编写的测试自动化,我是否遵循相同的过程?有关如何开始运行这些测试用例的任何指示 在 Mac 上使用 Mono ?
最佳答案
我知道这个问题很老,但我在寻找在我的 mac 上运行 MSTest 的解决方案时遇到了它。我将调查上述内容,但值得注意的是,VS 4 Mac 上的 MSTest 支持即将到来:
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
但是 - 如果您迫不及待 - 您可以使用
dotnet
cli命令: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
关于macos - 如何在 Mac 上运行 Mstests?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7289117/