如何在Mac上运行Mstests? [英] How to run Mstests on a Mac?

查看:59
本文介绍了如何在Mac上运行Mstests?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要编写一些mstests并在Mac上运行这些测试.被测试源代码的二进制文件已经在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.

要运行Visual Studio中编写的自动化测试,是否要遵循相同的过程? 在Mac上使用Mono 的任何有关如何开始运行这些测试用例的指针?

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?

推荐答案

我知道这个问题很旧,但是我在寻找在Mac上运行MSTest的解决方案时遇到了它.我将对上述内容进行调查,但也值得注意的是,即将在VS 4 Mac上提供MSTest支持:

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:

Visual Studio for Mac中的MSTest支持将在15.5发布周期(即VSfM 7.3)中提供,该版本计划在几周内投放Alpha渠道. (2017年9月20日)

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)

看到此github问题

但是-如果您迫不及待-可以使用dotnet cli命令:

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

dotnet测试CreditCardValidator.iOS.MSTestAppium/CreditCardValidator.iOS.MSTestAppium.csproj

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

开始构建,请稍候...构建完成.

Build started, please wait... Build completed.

试运行 /Users/owenniblock/test-apps/CCExampleAppium/CreditCardValidator.iOS.MSTestAppium/bin/Debug/netcoreapp2.0/CreditCardValidator.iOS.MSTestAppium.dll(.NETCoreApp,Version=v2.0)Microsoft(R)测试执行命令行工具版本

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版权所有(c)Microsoft Corporation.保留所有权利.

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

开始执行测试,请等待...失败

Starting test execution, please wait... Failed

CreditCardValidator.iOS.MSTestAppium.Tests.IntentalFailure错误 消息:Assert.IsTrue失败.堆栈跟踪:在 中的CreditCardValidator.iOS.MSTestAppium.Tests.IntentionalFailure() /Users/owenniblock/test-apps/CCExampleAppium/CreditCardValidator.iOS.MSTestAppium/Tests.cs:line 21

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

总测试次数:3.通过:2.失败:1.跳过:0.测试运行失败.

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

测试执行时间:1.0736秒

Test execution time: 1.0736 Seconds

这篇关于如何在Mac上运行Mstests?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆