1

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 Answers1

0

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
Eddie Chen - MSFT
  • 29,708
  • 2
  • 46
  • 60
  • Thank you Eddie, I think I did the same what you provided in your answer, e.g.: my Results directory path is : NUnit.Tests1/NUnit.Test1/allure-results/ I am able to generate the allure-results with Allure Command Line via VSTF, but in case of this plugin I am getting an error. – Ruslan Kryvosheiev Feb 22 '18 at 17:30
  • @RuslanKryvosheiev But the logs and your screenshot indicated that the directory you configured in the Allure task was just "allure-results" rather than "NUnit.Tests1/NUnit.Test1/allure-results". – Eddie Chen - MSFT Feb 22 '18 at 23:35