|
| 1 | +# Integrations |
| 2 | + |
| 3 | +GitHub Test Reporter supports various integrations to enhance your test reporting workflow. These integrations allow you to seamlessly combine the GitHub Test Reporter with popular developer tools. |
| 4 | + |
| 5 | +You can use multiple integrations in the same workflow. |
| 6 | + |
| 7 | +Integrations are currently beta. Please report any issues to the [GitHub Test Reporter repository](https://github.com/ctrf-io/github-test-reporter/issues). |
| 8 | + |
| 9 | +| Integration | Description | Repository | |
| 10 | +|------------|-------------|------------| |
| 11 | +| Slack Test Reporter | Send test results and notifications to Slack channels | [ctrf-io/slack-test-reporter](https://github.com/ctrf-io/slack-test-reporter) | |
| 12 | +| 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) | |
| 13 | +| AI Test Reporter | Intelligent test analysis using leading AI models | [ctrf-io/ai-test-reporter](https://github.com/ctrf-io/ai-test-reporter) | |
| 14 | + |
| 15 | +For detailed information about configuring and using these integrations, see our [Integrations Documentation](docs/integrations.md). |
| 16 | + |
| 17 | +To suggest a new integration, please open an issue on the [GitHub Test Reporter repository](https://github.com/ctrf-io/github-test-reporter/issues). |
| 18 | + |
| 19 | +## Configuration |
| 20 | + |
| 21 | +Integrations are configured using the `integrations-config` input in your GitHub Actions workflow. The configuration is passed as a JSON string: |
| 22 | + |
| 23 | +```yaml |
| 24 | +- name: Publish Test Report |
| 25 | + uses: ctrf-io/github-test-reporter@v1 |
| 26 | + with: |
| 27 | + report-path: './ctrf/*.json' |
| 28 | + integrations-config: | |
| 29 | + { |
| 30 | + "slack": { |
| 31 | + "enabled": true, |
| 32 | + "action": "results", |
| 33 | + }, |
| 34 | + "teams": { |
| 35 | + "enabled": true, |
| 36 | + "action": "results", |
| 37 | + }, |
| 38 | + "ai": { |
| 39 | + "enabled": true, |
| 40 | + "action": "openai", |
| 41 | + } |
| 42 | + } |
| 43 | + env: |
| 44 | + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 45 | + TEAMS_WEBHOOK_URL: ${{ secrets.TEAMS_WEBHOOK_URL }} |
| 46 | + OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }} |
| 47 | +``` |
| 48 | +
|
| 49 | +## Available Integrations |
| 50 | +
|
| 51 | +### Slack Integration |
| 52 | +
|
| 53 | +The Slack integration allows you to send test results directly to your Slack channels. |
| 54 | +
|
| 55 | +The Slack integration is powered by the [Slack Test Reporter](https://github.com/ctrf-io/slack-test-reporter), see the latest documentation for more information. |
| 56 | +
|
| 57 | +#### Configuration Options |
| 58 | +
|
| 59 | +```yaml |
| 60 | +- name: Publish Test Report |
| 61 | + uses: ctrf-io/github-test-reporter@v1 |
| 62 | + with: |
| 63 | + report-path: './ctrf/*.json' |
| 64 | + integrations-config: | |
| 65 | + { |
| 66 | + "slack": { |
| 67 | + "enabled": true, |
| 68 | + "action": "results", # One of: "results" | "ai" | "failed" | "flaky" |
| 69 | + "options": { |
| 70 | + "title": "Test Results", |
| 71 | + "prefix": "Custom prefix", |
| 72 | + "suffix": "Custom suffix", |
| 73 | + "consolidated": false, |
| 74 | + "onFailOnly": false |
| 75 | + } |
| 76 | + } |
| 77 | + } |
| 78 | + env: |
| 79 | + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 80 | + if: always() |
| 81 | +``` |
| 82 | +
|
| 83 | +See the [Slack Test Reporter](https://github.com/ctrf-io/slack-test-reporter) for more information. |
| 84 | +
|
| 85 | +### Microsoft Teams Integration |
| 86 | +
|
| 87 | +The Microsoft Teams integration allows you to send test results directly to your Microsoft Teams channels. |
| 88 | +
|
| 89 | +The Microsoft Teams integration is powered by the [Microsoft Teams Test Reporter](https://github.com/ctrf-io/teams-test-reporter), see the documentation for more information. |
| 90 | +
|
| 91 | +```yaml |
| 92 | +- name: Publish Test Report |
| 93 | + uses: ctrf-io/github-test-reporter@v1 |
| 94 | + with: |
| 95 | + report-path: './ctrf/*.json' |
| 96 | + integrations-config: | |
| 97 | + { |
| 98 | + "teams": { |
| 99 | + "enabled": true, |
| 100 | + "action": "results", // One of: "results" | "flaky" | "ai" |
| 101 | + "options": { |
| 102 | + "title": "Test Results", |
| 103 | + "onFailOnly": false |
| 104 | + } |
| 105 | + } |
| 106 | + } |
| 107 | + env: |
| 108 | + TEAMS_WEBHOOK_URL: ${{ secrets.TEAMS_WEBHOOK_URL }} |
| 109 | + if: always() |
| 110 | +``` |
| 111 | +
|
| 112 | +See the [Microsoft Teams Test Reporter](https://github.com/ctrf-io/teams-test-reporter) for more information. |
| 113 | +
|
| 114 | +### AI Integration |
| 115 | +
|
| 116 | +The AI integration provides intelligent analysis of your test results using advanced AI models. |
| 117 | +
|
| 118 | +The AI integration is powered by the [AI Test Reporter](https://github.com/ctrf-io/ai-test-reporter), see the latestdocumentation for more information. |
| 119 | +
|
| 120 | +```yaml |
| 121 | +- name: Publish Test Report |
| 122 | + uses: ctrf-io/github-test-reporter@v1 |
| 123 | + with: |
| 124 | + report-path: './ctrf/*.json' |
| 125 | + integrations-config: | |
| 126 | + { |
| 127 | + "ai": { |
| 128 | + "enabled": true, |
| 129 | + "action": "openai", // One of: "openai" | "claude" | "azure-openai" | "grok" | "deepseek" | "mistral" | "gemini" | "perplexity" | "openrouter" |
| 130 | + "options": { |
| 131 | + "model": "gpt-4", |
| 132 | + "systemPrompt": "Custom system prompt", |
| 133 | + "frequencyPenalty": 0, |
| 134 | + "maxTokens": 1000, |
| 135 | + "presencePenalty": 0, |
| 136 | + "temperature": 0.7, |
| 137 | + "topP": 1, |
| 138 | + "log": false, |
| 139 | + "maxMessages": 10, |
| 140 | + "consolidate": false, |
| 141 | + "deploymentId": "your-azure-deployment-id" |
| 142 | + } |
| 143 | + } |
| 144 | + } |
| 145 | + env: |
| 146 | + OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }} |
| 147 | + if: always() |
| 148 | +``` |
0 commit comments