allure2: Error when generates a report - Allure Test Reports(Molecula) plugin - Azure Devops(VSTS)

Describe 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:

  1. Go to Azure Devops

  2. Install Allure plugin https://marketplace.visualstudio.com/items?itemName=Molecula.allure-test-reports

  3. Go to your Azure project according to your user/workspace.

  4. Go to Pipeline section

  5. Create a new pipeline.

  6. Setup a build with Ubuntu/Windows (according what error you need to reproduce) agent image

  7. Setup any project to generate results (In this case Maven/Java project)

  8. Setup sheel script for Ubuntu agent to verify files in allure-results directory (use CMD for Windows) image

  9. Setup allure plugin to take allure-results directory to generate a report. image

  10. 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. image

Stack trace when Allure plugin is trying to generate a report. image

Error for Windows Verifying if allure-results directory exists and if it contains files results. image

Stack trace when Allure plugin is trying to generate a report. image

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 7
  • Comments: 24 (6 by maintainers)

Most upvoted comments

Here is the fix. There are two ways depending on agent you are using.

  1. Use Azure Pipelines - vs2017-win2016 agent
  2. Use any Linux agent (Azure Pipelines Ubuntu or self hosted) with extra task before creating Allure Report 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

Same issues as orginally posted. Does this plugin ever works ? I copied results through script to allure-reports/buildId folder. still dont see allure showing reports on the finished build pipeline

@fescobar Thanks for the workaround. Will Try . Hope this solves