macos - 如何在 Mac 上运行 Mstests?

标签 macos visual-studio-2010 mono automated-tests

我需要编写一些 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/

相关文章:

asp.net-mvc-3 - 添加 google recaptcha 服务器端验证 MVC3

c# - 类型 `Kaitai.Elf' 已经包含 `Bits' 的定义

c++ - 如何迭代 IO Kit 的键?

mysql - 无法使用我刚刚设置的用户详细信息从 bash 连接到 MySQL 数据库

c++ - dyld:未加载库:在 OS X 上

mono - 如何将 Farseer 与 MonoTouch/ExEn 应用程序一起使用?

ios - Xamarin iOS 无法 AOT 程序集 Microsoft.EntityFrameworkCore.Migrations.Migration

macos - Elasticsearch 无法在 OSX 上启动或运行

jquery - 用于测试和调试 HTML5 手机游戏的开发平台/模拟器

visual-studio - 我可以在 Visual Studio 中禁用查询设计器以支持带有突出显示的普通 SQL 编辑器吗?