- Create issues for failing tests
- Generate pull requests to skip flaky tests
- Track test cases across your GitHub repositories
Setup
-
Go to GitHub Settings → Developer Settings
-
Click on “Personal access tokens” and generate a new token
-
For fine-grained tokens, ensure the following permissions:
- Repository access to your target repository
- Contents: Read and write
- Pull requests: Read and write
- Issues: Read and write
-
Copy the token and paste it into the TestResult.co account settings.
-
Save the settings.
Features
Automatic Issue Creation
When a test fails, you can automatically create a GitHub issue with detailed test information:
- Test suite and test name
- Current status
- File location and line number
- Error message (if available)
- Test duration
- Flaky test status
- Direct link to the test case in TestResult.co
Example Issue:
Test Case Details
- Suite: Login Tests
- Test: shouldloginsuccessfully
- Status: Failed
- File: tests/login/login.spec.ts:25
- Project: Web App
Error Message
AssertionError: expected element to be visible
Additional Information
View Test Case
Skip Test Pull Requests
For flaky or problematic tests, you can automatically generate a pull request that adds a skip annotation:
- Navigate to the test case details
- Click “Create Skip PR”
- A new pull request will be created with:
- Skip annotation added to the test
- Detailed description of why the test is being skipped
- Link back to the test case in TestResult.co
Troubleshooting
Common issues and solutions:
Invalid Repository URL
- Ensure the URL is in the correct format:
https://github.com/owner/repository
- Both HTTPS and SSH URLs are supported
Permission Errors
- Verify your access token has the required permissions
- Ensure the token hasn’t expired
- Check that the token has access to the target repository
Rate Limiting
- The GitHub API has rate limits
- Consider using a fine-grained token to avoid organization-wide rate limits
Keep your GitHub access token secure and never share it publicly. You can
regenerate the token at any time if you suspect it has been compromised.