【发布时间】:2017-09-13 11:25:11
【问题描述】:
我正在与一个开发了自己的自定义测试框架的团队合作,该框架类似于 NUnit,但具有各种附加功能。我正在尝试将SpecFlow 合并到我们的测试中。要使用我们的自定义 TestFixture 和 Test 属性生成代码隐藏功能文件,我需要创建一个插件。
我已经创建了插件,但我正在努力让 SpecFlow 真正看到它。我已经在我的 App.config 中为使用该插件的项目尝试了 path 设置的各种排列,甚至是完全指定的路径:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="specFlow"
type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow"/>
</configSections>
<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>
<plugins>
<add name="SpecFlowAdapters"
path="C:\Development\[OurProductName]\Plugins\SpecFlowAdapters.SpecFlowPlugin.dll"
type="Generator" />
</plugins>
</specFlow>
</configuration>
但每次我重新生成功能代码时,我都会得到
#error Generation error: Unable to find plugin in the plugin search path:
SpecFlowAdapters. Please check http://go.specflow.org/doc-plugins for details.
有没有人能够成功地创建自定义 SpecFlow 生成器,可以指出示例工作代码?
【问题讨论】:
标签: specflow