为什么Allure报告在Jenkins中显示空内容?

vwoqyblh  于 2023-10-17  发布在  Jenkins
关注(0)|答案(2)|浏览(405)

在Jenkins中安装Allure报告插件后,得到此- ALLURE REPORT UNKNOWN unknown - unknown(Unknown)0测试用例NaN%
在构建执行完成后,它没有显示结果。我的项目结构就像这样-
根文件夹>> Marcombox(webdriverIO项目)喜欢的图片-!Repository folder
我得到的诱惑报告选项,在每个建设后,建设成功。这是我的后期构建操作看起来像-

Paths to Allure results directories relative from workspace.
Marcombox/allure-results
Report path:
Marcombox/allure-report

Path of resultReport Path下面是命令,我使用-

cd Marcombox && npm install && npm run npx wdio lamda.wdio.conf.js
npm install -g allure-commandline --save-dev
npm run allure generate reports --clean && allure open

这里是Jenkins的工作区-workplace of Jenkins在控制台输出中,我发现了这个-

C:\ProgramData\Jenkins\.jenkins\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\ALLURE_HOME\bin\allure.bat generate 
"C:\ProgramData\Jenkins\.jenkins\workspace\Automation Test\Marcombox\allure-results" -c -o 
"C:\ProgramData\Jenkins\.jenkins\workspace\Automation Test\Marcombox\allure-report"
Report successfully generated to C:\ProgramData\Jenkins\.jenkins\workspace\Automation Test\Marcombox\allure-report
Allure report was successfully generated.
Creating artifact for the build.
Artifact was added to the build.
Finished: SUCCESS

Marcombox/allure-results - like图片-data in folder中有数据

Automation Test
/
Marcombox
/
allure-results
/

data
export
history
plugins
widgets
app.js  Sep 26, 2023, 4:04:08 PM    764.87 KB
executor.json   Sep 26, 2023, 4:05:27 PM    275 B
favicon.ico Sep 26, 2023, 4:04:08 PM    15.04 KB
index.html  Sep 26, 2023, 4:04:08 PM    1.04 KB
styles.css  Sep 26, 2023, 4:04:08 PM    1.45 MB
testrun.json    Sep 26, 2023, 4:05:27 PM    73 B
ki0zmccv

ki0zmccv1#

检查插件安装:确保Allure Jenkins插件已正确安装和配置。转到“管理Jenkins”>“管理插件”并搜索“Allure”。确保它已安装并处于最新状态。

xpcnnkqh

xpcnnkqh2#

1.您不需要在Jenkins上运行allure install和allure generate命令
1.确保您在wdio.config.js文件中的allure reporter配置中指定了allure-results的正确路径
1.确保Allure插件下Jenkins Job配置中的指定路径存在。请注意,它是相对于Jenkins上的workspace的。

相关问题