simple-elf/allure-report-action

How to segregate allure results pushed to repository

Closed this issue · 7 comments

First of thanks for developing this beautiful utility. This really helps me a lot.

Currently I have automation tests for IOS/Android devices and both have same set of test cases for both the platform. I have got different workflows - smoke, regression etc. etc. So there will be IOS Smoke and Android Smoke likewise regression too. But the allure-results from all of these executions are pushed to same folder in repository. So the history of android testcase will be showing the executions in ios too.

image

Similarly the graphs, trends are all messed up as it will having smoke/regression runs. Not sure how to keep these execution results in separate folder so allure will be showing only test cases for specific platform.

I would also like this.

@mathewkuruvila Were you able to get more than one suite loaded into your reports?
I have multiple workflows and the latest one overwrites all my results for the prior one. So when I go to the suites tab, it only has the latest one. I havent been able to figure out how to have multiple suites from different runs.

I think that's how allure report works. It just shows the latest execution report in "suite" tab.

Oh your gh-pages branch, you can manually create 2 folders iOS & Andriod
When you build and publish your pages , instead of using default location use location of these folders

        uses: simple-elf/allure-report-action@master
        if: always()
        id: allure-report
        with:
          allure_results: TestReports/allure-results
          gh_pages: gh-pages
          allure_report:  iOS-results             #generate report at new destonation folder
          allure_history: iOS-results    #gather history
 - name: Deploy reports to Github Pages 🚀
        if: always()                                 #${{ steps.allure-report.outcome == 'success' }}
        id: deploy-reports-ghpages
        uses: peaceiris/actions-gh-pages@v3
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          PUBLISH_BRANCH: gh-pages
          PUBLISH_DIR:   iOS-results/${{github.run_number}}
          destination_dir:  iOS-results/${{github.run_number}}
          keep_files: true

Thanks for the help. I tried the same. I can push it into different folders. But now the problem is like I am missing historical data. Now allure just shows the current execution status and history is empty.

Got this working by adding "subfolder". Now reports are segregated. Details about "subfolder" are mentioned in the documentation. Thanks again for this great product.

@mathewkuruvila Can you post the final code snippet on how you used the subfolder as resolution for this question?

Just use below code. It has "subfolder" in it.

- name: Generate allure Reports
  uses: simple-elf/allure-report-action@v1
  if: always()
  continue-on-error: true
  id: allure-report
  with:
      allure_results: allure-results
      gh_pages: gh-pages
      subfolder: Android
      allure_report: allure-report
      allure_history: allure-history
      keep_reports: 15