-1

Can someone please put exact steps how to fix "Allure Reports" tab on Azure DevOps displays blank page?

We are using azureDevops server 2020 and looking for automated way o get publish the allure report in Azuredevops pipeline

  1. Installed Allure extention on Azure devops
  2. added below task:
    - task: AllureGenerate@1
      inputs:
      resultsDir: allure-results
      targetDir: allure-report/$(Build.BuildNumber)
  1. After job i do see json files created in above directory: allure-report
  2. Check Allure report tab and its blank page.

Also tried with just publishing as an artifact like below. also getting blank page.

- task: PublishBuildArtifacts@1
  displayName: 'Publish Report'
  inputs:
    PathtoPublish: '$(System.DefaultWorkingDirectory)/target/allure-results'
    ArtifactName: 'allure-results'
    publishLocation: 'Container'

Do we need to do anything additionally to get the report visible to the Azuredevops pipeline page itself. I guess we have to run Allure software some where to get the reports readable.

Can we have any workaround to get this report readable in azuredevops pipeline itself either 1) by installing any software or plugin in Azuredevops build agent? 2) Or can we achieve this using any AKS pods as we have cluster ready in AKS .

Also tried to upload the Test artifact "allure-results" to a webapp container and deployed it. But there we are getting only json file format and not visible as a a report

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
Vowneee
  • 956
  • 10
  • 33

1 Answers1

1

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

 

And you could refer to the Allure Test Reports overview below.

Please note that due too some limitation in the current version of Team Services API the Allure Generate Build Step will only generate the Allure report and save it as a build artifact. To enable "Open Allure Report" option you will need to add additional build step to publish the report somewhere. For instance you can create a simple Azure Web App and upload reports there using Build Task extension like FTP Upload. You website should support HTTPS.

  Please note If you use Azure Website or IIS in general some file types used by Allure are not enabled by default. Please, add mimetypes as shown below to your web.config in order to enable support of .json and .woff file types.

Ceeno Qi-MSFT
  • 924
  • 1
  • 3
  • 5
  • Yes, I read the limitations explained in the Document site already and I tried to create one Azureweb app and deployed the Allure test result json files to the wwroot directory. But Its not displaying anything over there and I could see some unstructured jsonfile there. – Vowneee Nov 07 '22 at 07:38
  • @Vowneee we suppose that you could refer to this doc [allure docker kubernetes](https://github.com/fescobar/allure-docker-service-examples/tree/master/allure-docker-kubernetes-example) – Ceeno Qi-MSFT Nov 21 '22 at 06:31