【问题标题】:Allure error after updating SpecFlow package更新 SpecFlow 包后出现 Allure 错误
【发布时间】:2020-11-02 15:00:22
【问题描述】:

我正在使用 Specflow、C# 和 Allure 编写测试以生成报告。更新包后

  • Specflow,
  • Specflow.xUnit
  • SpecFlow.Tools.MsBuild.Generation

从版本 3.3.573.4.31 我收到此错误:

System.TypeInitializationException : The type initializer for 'Allure.SpecFlowPlugin.AllureTestTracerWrapper' threw an exception.
---- System.TypeInitializationException : The type initializer for 'Allure.SpecFlowPlugin.PluginHelper' threw an exception.
-------- System.MissingMethodException : Method not found: 'Void TechTalk.SpecFlow.FeatureInfo..ctor(System.Globalization.CultureInfo, System.String, System.String, System.String[])'

你知道我该如何解决这个问题吗?

感谢您就如何解决此问题提出任何意见或建议。

【问题讨论】:

标签: c# specflow allure


【解决方案1】:

Specflow.Allure 包现已更新以支持 SpecFlow 3.4+ https://www.nuget.org/packages/SpecFlow.Allure/3.5.0.4

【讨论】:

    【解决方案2】:

    您收到此错误的原因是 SpecFlow.Allure 尚未与 SpecFlow 3.4 一起使用。对 >=3.3.57 的 NuGet 包的依赖是错误的。

    我们在 SpecFlow 中对 3.4 进行了与 3.3 不兼容的更改。

    此问题的 GitHub 问题在这里:https://github.com/allure-framework/allure-csharp/issues/133

    只要 Allure 不更新 NuGet 包,你就必须回到 SpecFlow 3.3。

    【讨论】:

      猜你喜欢
      • 2016-06-08
      • 2022-11-24
      • 1970-01-01
      • 2014-01-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-03
      相关资源
      最近更新 更多