{"id":20137073,"url":"https://github.com/ctrf-io/github-test-reporter","last_synced_at":"2025-10-05T15:56:40.246Z","repository":{"id":234557967,"uuid":"788637527","full_name":"ctrf-io/github-test-reporter","owner":"ctrf-io","description":"Publish and view test reporting directly in your GitHub Actions CI/CD workflow and Pull Requests with detailed test summaries, failed test analyses, and flaky test detection.","archived":false,"fork":false,"pushed_at":"2024-10-29T22:25:52.000Z","size":2235,"stargazers_count":79,"open_issues_count":3,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-30T00:44:16.345Z","etag":null,"topics":["cicd","ctrf","github","github-actions","test-automation","test-reporting"],"latest_commit_sha":null,"homepage":"https://ctrf.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctrf-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-18T19:51:52.000Z","updated_at":"2024-10-29T22:25:56.000Z","dependencies_parsed_at":"2024-09-06T06:16:09.018Z","dependency_job_id":"12880d7b-7a5f-4bdc-b2b4-d5e49b930d9a","html_url":"https://github.com/ctrf-io/github-test-reporter","commit_stats":null,"previous_names":["ctrf-io/github-actions-ctrf","ctrf-io/github-actions-test-reporter-ctrf","ctrf-io/github-test-reporter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrf-io%2Fgithub-test-reporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrf-io%2Fgithub-test-reporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrf-io%2Fgithub-test-reporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrf-io%2Fgithub-test-reporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctrf-io","download_url":"https://codeload.github.com/ctrf-io/github-test-reporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246436393,"owners_count":20776995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cicd","ctrf","github","github-actions","test-automation","test-reporting"],"created_at":"2024-11-13T21:25:04.426Z","updated_at":"2025-10-05T15:56:40.238Z","avatar_url":"https://github.com/ctrf-io.png","language":"TypeScript","readme":"# Publish and View Test Results Reports in Github Actions\n\n\u003e Integrate Test Reporting into Your GitHub Actions Workflow\n\nA GitHub test reporting tool that supports all major testing frameworks.\nGenerate, publish and alert your team with detailed test results, including\nsummaries, in-depth reports, failed test analyses, flaky test detection and AI\nanalyses directly within your GitHub Actions CI/CD workflow and Pull Requests.\n\nChoose from a variety of pre-built reports or create custom reports tailored to\nyour project's needs, ensuring that test results are always where you need them.\n\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch2\u003e⭐ Support Us ⭐\u003c/h2\u003e\n  \u003ch3\u003eIf you like what you see, drop us a star ⭐\u003c/h3\u003e\n  \u003ch3\u003eIt helps more teams find the project and motivates us to keep building! 💚\u003c/h3\u003e\n\u003c/div\u003e\n\n\n\u003cdiv align=\"center\"\u003e\n\u003cdiv style=\"padding: 1.5rem; border-radius: 8px; margin: 1rem 0; border: 1px solid #30363d;\"\u003e\n\u003cspan style=\"font-size: 23px;\"\u003e💚\u003c/span\u003e\n\u003ch3 style=\"margin: 1rem 0;\"\u003eCTRF tooling is open source and free to use\u003c/h3\u003e\n\n\u003cdiv style=\"margin-top: 1.5rem;\"\u003e\n\u003ca href=\"https://github.com/ctrf-io/github-test-reporter\"\u003e\n\u003cimg src=\"https://img.shields.io/github/stars/ctrf-io/github-test-reporter?style=for-the-badge\u0026color=2ea043\" alt=\"GitHub stars\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/ctrf-io\"\u003e\n\u003cimg src=\"https://img.shields.io/github/followers/ctrf-io?style=for-the-badge\u0026color=2ea043\" alt=\"GitHub followers\"\u003e\n\u003c/a\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\n\u003cp style=\"font-size: 14px; margin: 1rem 0;\"\u003e\nContributions are very welcome! \u003cbr/\u003e\nExplore more \u003ca href=\"https://www.ctrf.io/integrations\"\u003eintegrations\u003c/a\u003e\n\u003c/p\u003e\n\u003c/div\u003e\n\n## Example\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"images/github-readme.png\" alt=\"GitHub Test Reporter\" width=\"600\"\u003e\n\u003c/div\u003e\n\n## Key Features\n\n**🧩 Post anywhere:** job summaries, pull requests, checks, issues, inline annotations, and other developer tools\n\n**📊 Built-in insights:** failures, flaky tests, and trends across hundreds of runs\n\n**🧘 Super flexible:** start fast with powerful built-in reports or go fully custom with your own templates\n\n**🤖 AI-powered analysis:** explains why tests failed and how to fix them\n\n**🔌 Framework-agnostic:** works with any testing tool\n\n## Table of Contents\n\n1. [Usage](#usage)\n2. [Report Showcase](#report-showcase)\n3. [Visual Overview](#visual-overview)\n4. [Available Inputs](#available-inputs)\n5. [Pull Requests](#pull-requests)\n6. [Status Checks](#status-checks)\n7. [Build Your Own Report](#build-your-own-report)\n8. [Customizing Report Order](#customizing-report-order)\n9. [Community Reports](#community-reports)\n10. [GitHub Token](#github-token)\n11. [Storing Artifacts](#storing-artifacts)\n12. [Filtering](#filtering)\n13. [Integrations](#integrations)\n14. [Generating an AI Report](#generating-an-ai-report)\n15. [What is CTRF?](#what-is-ctrf)\n\n## Usage\n\nTo get started add the following to your workflow file:\n\n```yaml\n- name: Publish Test Report\n  uses: ctrf-io/github-test-reporter@v1\n  with:\n    report-path: './ctrf/*.json'\n    github-report: true\n  if: always()\n```\n\n## Report Showcase\n\nCheckout all the built-in reports [here](docs/report-showcase.md)\n\n## Visual Overview\n\n|          ![all](images/all.png)          |    ![github](images/github-failed.png)     | ![flaky-rate](images/insights.png) |    ![historical](images/historical.png)     |         ![pr](images/pr.png)         |\n| :--------------------------------------: | :----------------------------------------: | :----------------------------------: | :--------------------------: | :----------------------------------: |\n| ![suite-folded](images/suite-folded.png) | ![ai](images/ai.png) |     ![custom](images/custom.png)     | ![failed](images/failed.png) | ![suite-list](images/suite-list.png) |\n\n## Generate a report\n\nYou need a CTRF or JUnit report.\n\nThis reporter works best with a CTRF as it's packed with modern properties. [CTRF reporters](https://ctrf.io/integrations) are available for most testing frameworks and easy to install.\n\nFor more details on using JUnit, see [JUnit integration instructions](docs/integrations.md#junit-to-ctrf-integration)\n\n## Available Inputs\n\nFor more advanced usage, there are several inputs available.\n\n```yaml\n- name: Publish Test Report\n  uses: ctrf-io/github-test-reporter@v1\n  with:\n    # Core Configuration\n    report-path: './ctrf/*.json' # Path or glob pattern to the CTRF report JSON file.\n    template-path: './templates/custom-summary.hbs' # Path to the Handlebars template for customizing markdown output.\n\n    # Reports - Choose as many as you like. Default is false. Choosing none will use default reports.\n    summary-report: true\n    github-report: false\n    test-report: false\n    test-list-report: false\n    failed-report: false\n    fail-rate-report: false\n    flaky-report: false\n    flaky-rate-report: false\n    failed-folded-report: false\n    previous-results-report: false\n    insights-report: false\n    slowest-report: false\n    ai-report: false\n    skipped-report: false\n    suite-folded-report: false\n    suite-list-report: false\n    file-report: false\n    pull-request-report: false\n    commit-report: false\n    custom-report: false\n    community-report: false\n\n    # Behavior Options\n    summary: true # Post report to the job summary. Default is true\n    pull-request: false # Comment on pull request with report. Default is false\n    issue: '' # Issue number to comment on. Works with standard issues and pull-request. Default is no issue\n    status-check: false # Create a status check for the workflow. Default is false\n    status-check-name: 'Test Reporter Results' # Name of the status check. Default is GitHub Test Reporter Results \n    community-report-name: 'summary-short' # Name of the community report to use. Default is summary-short\n    title: '' # Set a custom title to display on the report.\n    annotate: true # Add failed test annotations. Default is true\n    on-fail-only: false # Add a pull request comment only if tests fail. Default is false\n    exitOnNoFiles: false # Exit the workflow with a failure status if no test files are found. Default is false\n    exit-on-fail: false # Exit the workflow with a failure status if any tests fail. Default is false\n    exit-on-empty: false # Exit the workflow with a failure status if no tests are found. Default is false\n    use-suite-name: false # Prefix test names with the suite name for better grouping. Default is false\n    collapse-large-reports: false # Collapse large reports (test-table and test-list) for better readability. Default is false\n    update-comment: false # Update existing Pull Request comment. Default is false\n    overwrite-comment: false # Overwrite existing Pull Request comment. Default is false\n    always-latest-comment: false # Create a new comment if the existing comment is not the latest in the thread. Default is false\n    comment-tag: false # Tag to match Pull Request comment\n    write-ctrf-to-file: 'ctrf/ctrf-report.json' # Path to write the internal processed CTRF report for future processing. Default no write\n    upload-artifact: true # Upload to workflow artifact the processed CTRF report for future processing. Default false\n\n    # Advanced Options\n    artifact-name: 'ctrf-report' # Name of the artifact containing test reports. Default is ctrf-report\n    previous-results-max: 10 # Maximum number of previous test results to display in the report. Default is 10\n    fetch-previous-results: false # Always fetch previous workflow runs when using custom templates. Default is false\n    max-workflow-runs-to-check: 400 # Maximum number of workflow runs to check for previous results. Default is 400\n    max-previous-runs-to-fetch: 100 # Maximum number of previous runs to fetch and process for metrics and reports. Default is 100\n    group-by: 'filePath' # Specify grouping for applicable reports (e.g., suite or file path). Default is filePath\n    always-group-by: false # Force grouping by suite or file path for all reports. Default is false\n    report-order: 'summary-report,failed-report,flaky-report,skipped-report,test-report' # Comma-separated list of report types to specify the order in which reports should be displayed\n    integrations-config: '{}' # JSON configuration for integrations with other developer tools\n  if: always()\n```\n\nOnly `report-path` is required.\n\n## Pull Requests\n\nYou can add a pull request comment by using the `pull-request-report` input:\n\n```yaml\n- name: Publish Test Report\n  uses: ctrf-io/github-test-reporter@v1\n  with:\n    report-path: './ctrf/*.json'\n    pull-request-report: true\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n  if: always()\n```\n\nThis uses the built-in\n[pull request comment report](docs/report-showcase.md#pull-request-report).\n\nAdditionally, you can add any report to a pull request comment by adding the\n`pull-request` input:\n\n```yaml\n- name: Publish Test Report\n  uses: ctrf-io/github-test-reporter@v1\n  with:\n    report-path: './ctrf/*.json'\n    flaky-rate-report: true\n    pull-request: true\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n  if: always()\n```\n\nThe `pull-request` input works with all reports, including custom.\n\nrequires a `GITHUB_TOKEN` with pull request write permission.\n\n**Note:** Special considerations apply to pull requests from forks. See [Fork Pull Requests](docs/fork-pull-requests.md) for details.\n\nYou can also comment on a specific issue or pull request by using the `issue`\ninput and providing the issue number ():\n\n```yaml\n- name: Publish Test Report\n  uses: ctrf-io/github-test-reporter@v1\n  with:\n    report-path: './ctrf/*.json'\n    issue: '123'\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n  if: always()\n```\n\nRequires a `GITHUB_TOKEN` with issue or pull request write permission.\n\n### Comment Management Inputs\n\n`update-comment` An existing tagged comment is found, the new report is\nappended to it. Otherwise, a new comment is created.\n\n`overwrite-comment` An existing tagged comment is found, that comment's entire\ncontent is replaced with the new report. Otherwise, a new comment is created.\n\n`always-latest-comment` Create a new comment if the existing comment is not the latest in the thread. Use with `update-comment` or `overwrite-comment`. Default is false\n\n`comment-tag` A unique identifier for comments posted. Used to find and\nupdate/overwrite existing comments.\n\nFor example, the following command creates or updates a comment tagged with the\ncurrent workflow and job names:\n\n```yaml\n- name: Publish Test Report\n  uses: ctrf-io/github-test-reporter@v1\n  with:\n    report-path: './ctrf/*.json'\n    flaky-rate-report: true\n    pull-request: true\n    update-comment: true\n    comment-tag: '${{ github.workflow }}-${{ github.job }}'\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n  if: always()\n```\n\n## Status Checks\n\nThe `status-check` input creates a status check for the workflow.\n\n```yaml\n- name: Publish Test Report\n  uses: ctrf-io/github-test-reporter@v1\n  with:\n    report-path: './ctrf/*.json'\n    status-check: true\n    status-check-name: 'GitHub Test Reporter Results'\n  if: always()\n```\n\nRequires a `GITHUB_TOKEN` with status check write permission.\n\n## Build Your Own Report\n\nThe `custom-report` input lets you build your own report using a Handlebars\ntemplate. The template can include any markdown content and leverage data from\nyour CTRF report and GitHub properties, allowing for dynamic and customizable\nreport.\n\nAdd the following to your workflow file:\n\n```yaml\n- name: Publish Test Report\n  uses: ctrf-io/github-test-reporter@v1\n  with:\n    report-path: './ctrf/*.json'\n    template-path: './templates/custom-report.hbs'\n    custom-report: true\n  if: always()\n```\n\nFor detailed instructions on building your own report, see the\n[documentation](docs/build-your-own-report.md).\n\nFor inspiration, check out the [built-in reports](src/reports) and\n[community reports](community-reports)\n\n## Community Reports\n\nWe welcome and encourage contributions of community-built reports. Community\nreports allow users to share custom reports designed for specific use cases.\n\nTo submit a community-built report create a Pull Request.\n\nYou can see available [community built reports](community-reports)\n\nAdd the following to your workflow file:\n\n```yaml\n- name: Publish Test Report\n  uses: ctrf-io/github-test-reporter@v1\n  with:\n    report-path: './ctrf/*.json'\n    community-report: true\n    community-report-name: summary-short\n  if: always()\n```\n\n## Customizing Report Order\n\nThe GitHub Test Reporter allows you to customize the order in which reports appear in your job summary or pull request comments. This feature gives you complete control over how your test results are presented. To customize the order of reports, use the `report-order` parameter with a comma-separated list of report types:\n\n```yaml\n- name: Publish Test Report\n  uses: ctrf-io/github-test-reporter@v1\n  with:\n    report-path: './ctrf/*.json'\n    summary-report: true\n    failed-report: true\n    flaky-report: true\n    insights-report: true\n    test-report: true\n    # Order reports with the most important information first\n    report-order: 'summary-report,failed-report,flaky-report,insights-report,test-report'\n  if: always()\n```\n\nIf report-order is not provided, a default order is used.\n\n## GitHub Token\n\n`previous-results-report`, `insights-report`, `flaky-rate-report`, `fail-rate-report`, and `slowest-report` need a\nGITHUB_TOKEN:\n\n```yaml\n- name: Publish Test Report\n  uses: ctrf-io/github-test-reporter@v1\n  with:\n    report-path: './ctrf/*.json'\n    flaky-rate-report: true\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n  if: always()\n```\n\n## Storing Artifacts\n\nSome reports require you to store CTRF reports as artifacts, use the\n`upload-artifact` input for full capabilities:\n\n```yaml\n- name: Upload test results\n  uses: ctrf-io/github-test-reporter@v1\n  with:\n    report-path: './ctrf/*.json'\n    upload-artifact: true\n  if: always()\n```\n\n## Filtering\n\n`previous-results-report`, `flaky-rate-report` and `fail-rate-report` filter\nprevious results as follows:\n\n- Runs from the same branch for events of type push, schedule and\n  workflow_dispatch from the same workflow id\n- Runs from the same pull request for events of type pull_request from the same\n  workflow id\n\nThis ensures that you only see workflow runs that are related to your current\nbranch or pull request\n\n## Integrations\n\nCTRF tooling offers seamless developer tool integration, allowing you to combine the GitHub Test Reporter with the following tools:\n\n| Integration | Description | Repository |\n|------------|-------------|------------|\n| Slack Test Reporter | Send test results and notifications to Slack channels | [ctrf-io/slack-test-reporter](https://github.com/ctrf-io/slack-test-reporter) |\n| Microsoft Teams Test Reporter | Post test results and alerts to Teams channels | [ctrf-io/teams-test-reporter](https://github.com/ctrf-io/teams-test-reporter) |\n| AI Test Reporter | Intelligent test analysis using leading AI models | [ctrf-io/ai-test-reporter](https://github.com/ctrf-io/ai-test-reporter) |\n\nFor detailed information about configuring and using these integrations, see our [Integrations Documentation](docs/integrations.md).\n\nIntegrations are currently in beta. Please report any issues to the [GitHub Test Reporter repository](https://github.com/ctrf-io/github-test-reporter/issues).\n\n## Generating an AI Report\n\nYou can generate human-readable AI report for your failed tests using models\nfrom the leading AI providers by using the AI Test Reporter integration or the \n[AI Test Reporter](https://github.com/ctrf-io/ai-test-reporter) directly. \n\n## Further Processing\n\nYou can further process the CTRF report by using the output `report` from the action or by using the `write-ctrf-to-file` input. For reports larger than 1MB, consider using the `write-ctrf-to-file` input.\n\nThis exposes the internal processed CTRF report that is enriched with properties used by the github test reporter.\n\n```yaml\n- name: Write CTRF to File\n  uses: ctrf-io/github-test-reporter@v1\n  with:\n    report-path: './ctrf/*.json'\n    write-ctrf-to-file: './ctrf/ctrf-report.json'\n  if: always()\n```\n\n## What is CTRF?\n\nA test results report schema that provides a standardized format for JSON test\nreports.\n\n**Consistency Across Tools:** Different testing tools and frameworks often\nproduce reports in varied formats. CTRF ensures a uniform structure, making it\neasier to understand and compare reports, regardless of the testing tool used.\n\n**Language and Framework Agnostic:** It provides a universal reporting schema\nthat works seamlessly with any programming language and testing framework.\n\n**Facilitates Better Analysis:** With a standardized format, programatically\nanalyzing test outcomes across multiple platforms becomes more straightforward.\n\n## Support Us\n\nIf you find this project useful, consider giving it a GitHub star ⭐ It means a\nlot to us.\n","funding_links":[],"categories":["Categories","TypeScript"],"sub_categories":["Continuous Triage"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctrf-io%2Fgithub-test-reporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctrf-io%2Fgithub-test-reporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctrf-io%2Fgithub-test-reporter/lists"}