我最近决定获得SpecFlow + 30天试用版,并安装了NuGet软件包SpecFlow + Runner,该软件包还安装了SpecFlow一个。我按照他们的指南注册了许可证密钥,并开始添加功能文件和功能步骤,并在构建解决方案时遇到此错误:

An exception occurred while test discoverer 'SpecRunTestDiscoverer' was loading tests. Exception: Invalid configuration file (..path..)Specs\bin\Debug\Default.srprofile:There is an error in XML document (3, 28). -> Expected hex 0x in '{0}'.


这是Default.srprofile的片段:

<?xml version="1.0" encoding="utf-8"?>
<TestProfile xmlns="http://www.specflow.org/schemas/plus/TestProfile/1.5">
  <Settings projectName="" projectId="{}" />
  <Execution stopAfterFailures="3" testThreadCount="1" testSchedulingMode="Sequential" />


你能帮我么?

请注意,该解决方案是从头开始构建的,仅用于测试SpecFlow +功能。
还要注意,创建的场景非常基础,并且可以与其他测试引擎(带有MSUnit,xUnit或NUnit的SpecFlow)一起使用。

谢谢!

最佳答案

这是因为最新版本的Visual Studio 2017中的NuGet客户端中存在错误。

请查看以下GitHub问题:https://github.com/techtalk/SpecFlow/issues/935



全面披露:我是SpecFlow和SpecFlow +的开发商之一

关于c# - SpecFlow + Runner无法发现测试错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/46346877/

10-13 06:37