Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/269.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Specflow测试未启动_C#_Selenium_Bdd_Specflow - Fatal编程技术网

C# Specflow测试未启动

C# Specflow测试未启动,c#,selenium,bdd,specflow,C#,Selenium,Bdd,Specflow,我在尝试运行Specflow测试时不断遇到此错误。我尝试过删除bin,删除了所有nuget包并重新安装,修改了 app.config, but this error still persist Test Name: CreateAnEmailCampaign Result Message: OneTimeSetUp: System.Configuration.ConfigurationErrorsException : Configuration system failed to i

我在尝试运行Specflow测试时不断遇到此错误。我尝试过删除bin,删除了所有nuget包并重新安装,修改了

app.config, but this error still persist 


Test Name:  CreateAnEmailCampaign

Result Message: 
OneTimeSetUp: System.Configuration.ConfigurationErrorsException : Configuration system failed to initialize
  ----> System.Configuration.ConfigurationErrorsException : Unrecognized configuration section sectionGroup. (C:\Users\bin\Debug\Demo.dll.config line 11)


<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow" />
  </configSections>


  <sectionGroup name="NUnit">
    <section name="TestRunner" type="System.Configuration.NameValueSectionHandler" />
  </sectionGroup>
  <NUnit>
    <TestRunner>
      <!-- Valid values are STA,MTA. Others ignored. -->
      <add key="ApartmentState" value="STA" />
    </TestRunner>
  </NUnit>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  <specFlow>
    <!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config -->
  <!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config --><!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config --><unitTestProvider name="NUnit" /></specFlow></configuration>
app.config,但此错误仍然存在
测试名称:CreateAnEmailCampaign
结果消息:
OneTimeSetUp:System.Configuration.ConfigurationErrorsException:配置系统未能初始化
---->System.Configuration.ConfigurationErrorsException:无法识别的配置节sectionGroup。(C:\Users\bin\Debug\Demo.dll.config第11行)

在您发布的appconfig中,元素
sectionGroup
不是
configSections
的子元素,因此错误-

无法识别的配置节节组

要解决此问题,请将
节组
移动到
配置节
内,如下所示


在您发布的appconfig中,元素
sectionGroup
不是
configSections
的子元素,因此错误-

无法识别的配置节节组

要解决此问题,请将
节组
移动到
配置节
内,如下所示



请发布你的app.config请共享app.config和Demo.dll。config@VijayanathViswanathanapp.config添加了dll.config与app.config的代码相同。请发布您的app.config。请共享app.config和Demo.dll。config@VijayanathViswanathanapp.config添加了dll.config与app.config的代码相同