我修改了.srprofile来配置我自己的报告模板。
但是当执行时抛出以下错误消息并且没有生成html文件 -
System.InvalidOperationException:找不到渲染模板资源 在TechTalk.SpecRun.Framework.Reporting.ReportTemplateLoader.LoadTemplate(报告报告)....
对.srprofile所做的更改:
<Report copyAlsoToBaseFolder="true">
<Template name="ReportTemplate.cshtml" outputName="AutomationReport.html" />
</Report>"
我在这里做错了吗?
答案 0 :(得分:1)
SpecFlow + Runner正在输出目录中搜索ReportTemplate.cshtml(通常是bin \ debug)。如果将文件添加到项目中,则默认情况下不会将其复制到输出目录。
将文件属性中的“复制到输出”更改为“始终”