Visual Studio 2012 中带有 <unitTestProvider> 的规范流错误 [英] Error with specflow in visual studio 2012 with <unitTestProvider>

查看:29
本文介绍了Visual Studio 2012 中带有 <unitTestProvider> 的规范流错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 selenium、Specflow 和 nUnit 通过 Visual Studio 运行自动化测试.代码在 Visual Studio 2010 中工作.在我再次安装了 Visual Studio 2012、selenium 和 Specflow(我认为我做对了)后,它停止了工作.首先,这些步骤无法识别它们的定义,我想我在所有包含它们的定义的 c# 文件中编写 [Binding] 来修复它.现在,当我尝试构建项目时,它显示了一个我无法解决所有功能文件的错误.

I am using selenium, Specflow and nUnit to run automated tests with visual studio. The code was working with visual studio 2010. After I installed visual studio 2012, selenium and Specflow again (I think I did it right), it stopped working. First, the steps didn't recognize their definitions and I think I fix it writing [Binding] in all the c# files that contains their definitions. Now when I try to build the project it shows an error that I can't solve to all feature files.

它显示了 50 个错误(与我拥有的 Specflow 功能文件的数量相同),它们都相同,并且显示如下:

It shows 50 errors (the same number of Specflow feature files I have), they are all the same, and it says this:

Error: Generation error: SpecFlow 配置错误 ->元素<unitTestProvider>在本节中只能出现一次.

我不知道如何解决这个问题.我希望有人可以帮助我,为此我真的很担心.

I don't know how to fix this. I hope somebody can help me, I am really worry because of this.

推荐答案

仅保留一个 属性 作为 unitTestProvider name="SpecRun"unitTestProvider name="app.config

Keep only one attribute as unitTestProvider name="SpecRun" or unitTestProvider name="NUnit" in app.config

这个错误是由app.config中的两个'unitTestProviders'引起的.

This error is caused by two 'unitTestProviders' in app.config.

这篇关于Visual Studio 2012 中带有 &lt;unitTestProvider&gt; 的规范流错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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