尝试执行mstest + specflow测试时,“没有执行测试”消息 [英] 'No tests to execute' message while trying to execute mstest+specflow tests

查看:199
本文介绍了尝试执行mstest + specflow测试时,“没有执行测试”消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

 使用MsTest和SpecFlow创建了一个单元测试项目。尝试了两个简单的场景,并能够在Visual Studio中从Test Explorer执行测试。

 Created a Unit test project with MsTest and SpecFlow. Tried two simple scenarios and able to execute the tests from Test Explorer in Visual Studio.

创建一个批处理脚本,使用MsTest.exe运行并生成HTML报告。 但是在运行批处理脚本时得到了"没有执行测试"的消息。任何人都遇到过这个问题,需要解决的步骤是什么..

Created a Batch script to run by using MsTest.exe and generate HTML report.  But got message as 'No tests to execute' while running batch script. Anybody have faced this issue and what are the steps to solve..

**命令提示符(管理员)文字**

**Command prompt (Admin ) text**

推荐答案

Hi p alanist,

欢迎来到MSDN论坛。

请使用

vstest.console.exe
和runsettings d功能测试CLI需求。 MSTest.exe是特定于mstest框架(V1)的运行程序。 vstest.console.exe是可用于从不同测试框架运行测试的CLI,包括
mstest v2。 Visual Studio中可用的默认测试模板使用MSTest V2,请检查

这个类似的问题

Please use vstest.console.exe and runsettings for all unit test and functional testing CLI needs. MSTest.exe is a runner specific to the mstest framework (V1). The vstest.console.exe is the CLI that can be used to run tests from different test frameworks including mstest v2. The default test template available in Visual Studio uses MSTest V2, please check this similar issue.

< span lang ="EN"style ="font-size:11.0pt; font-family:'Calibri',sans-serif">我们可以使用这样的命令"vstest.console.exe UITests.dll / logger:trx"在开发人员命令提示符下,它可以成功运行测试
并自动发布测试结果。

最好的问候,

Sara


这篇关于尝试执行mstest + specflow测试时,“没有执行测试”消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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