1
votes

The VSTS task: Generate Allure Report is failed.

The error is : Unable to process command '##vso[results.publish type=Allure;mergeResults=true;publishRunAttachments=true;resultFiles=D:\a\1\s\allure-report\34;]' successfully. Please reference documentation (http://go.microsoft.com/fwlink/?LinkId=817296) Unknown Test Runner.

Question: can it be a bug or problem connected to configs?

Configurations: .Net version: 4.6.1, Nunit3, Nunit3 allure adapter

Task to run tests is a Command Line task where I used nunit3-console.exe to run test.

Configurations for Allure plugin:

Results directory : allure-results Target directory : allure-report/$(Build.BuildNumber)

The output logs:

****************************************************************************** Starting: Generate Allure Report


============================================================================== Task : Generate Allure Report Description : Generates Allure report based on the test results Version : 1.0.0 Author : Molecula Help : More Information ============================================================================== 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\34 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) Unable to process command '##vso[results.publish type=Allure;mergeResults=true;publishRunAttachments=true;resultFiles=D:\a\1\s\allure-report\34;]' successfully. Please reference documentation (http://go.microsoft.com/fwlink/?LinkId=817296) Unknown Test Runner.

1
Can you show the whole build log by setting the variable system.debug as true? - Marina Liu
What is your Results directory? - Eddie Chen - MSFT
Hi Eddie, I am using the default allure-results directory - Ruslan Kryvosheiev
@Marina, Currently I have no chance to run the build with debug logs, but I will try to keep you updated as soon as I do it. - Ruslan Kryvosheiev
@RuslanKryvosheiev - Did you find solution for this? I am facing same issue. - Helping Hands

1 Answers

0
votes

The default setting directory "allure-results" in the Allure task usually does not point to the actual path to result directory correctly since the path is different in different projects and environment. You need to update the setting to configure it to the actual path to the result directory manually.

According to the information you provided, the path to the result could be like this:

$(Build.SourcesDirectory)\SolutionFolder\ProjectFolder\bin\$(BuildConfiguration)\allure-results