如何为 Xunit.net 项目生成 Allure2 报告
How to generate Allure2 report for Xunit.net project
Allure2支持xunit项目吗?我没有在 Allure2 文档中找到它 https://docs.qameta.io/allure/2.0/ 但是是否有一些适配器可以实现它?
Allure2 确实支持 xunit 项目。它不需要特殊的适配器。 Allure2 有内置插件 trx-plugin and xunit-xml-plugin。
使用 allure-commandline 为 .netcore2 xunit 测试项目采取的步骤。 (参考文档安装 allure 命令行 - docs.qameta.io/allure/latest/#_installing_a_commandline)
TRX报告:
- 使用命令生成输出 xunit trx 报告:dotnet test --logger:trx
- 使用命令生成 Allure 报告:allure serve /home/path/to/project/target/surefire-reports/
XML 报告:
在测试项目中添加对 Xunit Logger nuget 包的引用。
使用命令生成输出 xunit xml 报告:dotnet test --logger:xunit
使用命令生成 Allure 报告:allure serve /home/path/to/project/target/surefire-reports/
Allure2支持xunit项目吗?我没有在 Allure2 文档中找到它 https://docs.qameta.io/allure/2.0/ 但是是否有一些适配器可以实现它?
Allure2 确实支持 xunit 项目。它不需要特殊的适配器。 Allure2 有内置插件 trx-plugin and xunit-xml-plugin。 使用 allure-commandline 为 .netcore2 xunit 测试项目采取的步骤。 (参考文档安装 allure 命令行 - docs.qameta.io/allure/latest/#_installing_a_commandline)
TRX报告:
- 使用命令生成输出 xunit trx 报告:dotnet test --logger:trx
- 使用命令生成 Allure 报告:allure serve /home/path/to/project/target/surefire-reports/
XML 报告:
在测试项目中添加对 Xunit Logger nuget 包的引用。
使用命令生成输出 xunit xml 报告:dotnet test --logger:xunit
使用命令生成 Allure 报告:allure serve /home/path/to/project/target/surefire-reports/