Chr*_*elt 5 c# xunit .net-assembly specflow
我正在编写一个自定义插件来自定义SpecFlow生成的自动生成的代码文件.
构建解决方案并将其放入SpecFlow测试项目的"lib"文件夹之后.在保存我得到的SpecFlow功能文件时
Specflow plugin : Generation error: Missing [assembly:GeneratorPlugin] attribute in 'path to dll'
Run Code Online (Sandbox Code Playgroud)
即使我在插件程序集中标记了这一点
[assembly: GeneratorPluginAttribute(typeof(CustomGeneratorPlugin))]
Run Code Online (Sandbox Code Playgroud)
使用反射/自我测试我可以自己加载程序集并解析属性
代码在这里 - https://github.com/chrismckelt/SpecFlowCustomPlugin
有什么想法导致这个?谢谢
通过将以下“路径”属性添加到生成器 SpecFlow 配置部分来解决
<generator path=".\lib"
Run Code Online (Sandbox Code Playgroud)
完整配置
<specFlow>
<generator allowDebugGeneratedFiles="false" allowRowTests="true" generateAsyncTests="false" path=".\lib" />
<runtime stopAtFirstError="false" missingOrPendingStepsOutcome="Ignore" />
<trace traceSuccessfulSteps="true" traceTimings="false" minTracedDuration="0:0:0.1" stepDefinitionSkeletonStyle="RegexAttribute" />
<plugins>
<add name="McKeltCustom" path=".\lib" type="GeneratorAndRuntime" />
</plugins>
<stepAssemblies>
<stepAssembly assembly="SpecFlow.Assist.Dynamic" />
</stepAssemblies>
</specFlow>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3198 次 |
| 最近记录: |