Error when generates a report - Allure Test Reports(Molecula) plugin - Azure Devops(VSTS)
See original GitHub issueDescribe the bug I’m using this plugin for Allure https://marketplace.visualstudio.com/items?itemName=Molecula.allure-test-reports When Azure try to generate the report throws next errors
For Ubuntu
agent:
[command]/usr/local/bin/node /home/vsts/work/_tasks/AllureGenerate_5c975f9d-1c3a-469f-b7c2-8907bf3eacfb/1.0.0/node_modules/allure-commandline/bin/allure generate --output /home/vsts/work/1/s/allure-report/46 /home/vsts/work/1/s/allure-results
events.js:174
throw er; // Unhandled 'error' event
^
Error: spawn /home/vsts/work/_tasks/AllureGenerate_5c975f9d-1c3a-469f-b7c2-8907bf3eacfb/1.0.0/node_modules/allure-commandline/dist/bin/allure EACCES
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
at onErrorNT (internal/child_process.js:415:16)
[... lines matching original stack trace ...]
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
throw er; // Unhandled 'error' event
^
Error: spawn /home/vsts/work/_tasks/AllureGenerate_5c975f9d-1c3a-469f-b7c2-8907bf3eacfb/1.0.0/node_modules/allure-commandline/dist/bin/allure EACCES
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
at onErrorNT (internal/child_process.js:415:16)
[... lines matching original stack trace ...]
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
For Windows
agent:
[command]C:\Program Files\nodejs\node.exe D:\a\_tasks\AllureGenerate_5c975f9d-1c3a-469f-b7c2-8907bf3eacfb\1.0.0\node_modules\allure-commandline\bin\allure generate --output D:\a\1\s\allure-report\49 D:\a\1\s\allure-results
Command aborted due to exception {}.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:153)
at ru.yandex.qatools.allure.command.ReportGenerate.runUnsafe(ReportGenerate.java:48)
at ru.yandex.qatools.allure.command.AbstractCommand.run(AbstractCommand.java:52)
at ru.yandex.qatools.allure.CommandLine.main(CommandLine.java:46)
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:153)
at ru.yandex.qatools.allure.command.ReportGenerate.runUnsafe(ReportGenerate.java:48)
at ru.yandex.qatools.allure.command.AbstractCommand.run(AbstractCommand.java:52)
at ru.yandex.qatools.allure.CommandLine.main(CommandLine.java:46)
at ru.yandex.qatools.allure.data.AllureReportGenerator.generate(AllureReportGenerator.java:58)
at ru.yandex.qatools.allure.data.AllureReportGenerator.generate(AllureReportGenerator.java:53)
at ru.yandex.qatools.allure.AllureMain.main(AllureMain.java:48)
Exception in thread "main" ru.yandex.qatools.allure.data.ReportGenerationException: Could not find any allure results
at ru.yandex.qatools.allure.data.AllureReportGenerator.generate(AllureReportGenerator.java:58)
at ru.yandex.qatools.allure.data.AllureReportGenerator.generate(AllureReportGenerator.java:53)
at ru.yandex.qatools.allure.AllureMain.main(AllureMain.java:48)
To Reproduce Steps to reproduce the behavior:
-
Go to Azure Devops
-
Install Allure plugin https://marketplace.visualstudio.com/items?itemName=Molecula.allure-test-reports
-
Go to your Azure project according to your user/workspace.
-
Go to
Pipeline
section -
Create a new pipeline.
-
Setup a build with Ubuntu/Windows (according what error you need to reproduce) agent
-
Setup any project to generate results (In this case Maven/Java project)
-
Setup sheel script for Ubuntu agent to verify files in
allure-results
directory (use CMD for Windows) -
Setup allure plugin to take
allure-results
directory to generate a report. -
Run pipeline
Expected behavior When pipeline finished (failed or not), it should generate Allure report files.
Screenshots
Error for Ubuntu
Verifying if allure-results
directory exists and if it contains files results.
Stack trace when Allure plugin is trying to generate a report.
Error for Windows
Verifying if allure-results
directory exists and if it contains files results.
Stack trace when Allure plugin is trying to generate a report.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:19 (6 by maintainers)
Top GitHub Comments
Here is the fix. There are two ways depending on agent you are using.
chmod 755 $(Agent.WorkFolder)/_tasks/AllureGenerate_5c975f9d-1c3a-469f-b7c2-8907bf3eacf1/1.0.0/node_modules/allure-commandline/dist/bin/allure
@MegalaRajendran seems to be nobody is maintaining this plugin.
I have another solution for you. You could start up an Allure docker container in your server (Allure Docker Service: https://github.com/fescobar/allure-docker-service ) and you could send your results from AzureDevops to that container through API.
https://github.com/fescobar/allure-docker-service#send-results-through-api