Overview
This GitHub Action connects to Octomind’s services to generate a batch of end-to-end tests based on your application. It can be configured to run against specific environments, use prerequisites, and target specific URLs.Prerequisites
- An Octomind account with access to the API
- A valid Octomind API key (generated from the Octomind app)
- Your Octomind test target ID
Setup instructions
1. Add API Key to repository secrets
First, add your Octomind API key to your GitHub repository secrets:- Go to your GitHub repository
- Navigate to Settings > Secrets and variables > Actions
- Click on “New repository secret”
- Name the secret
Octomind_API_KEY
- Paste your Octomind API key as the value
- Click “Add secret”
2. Add the GitHub Action to your workflow
Add the following YAML snippet to your GitHub Actions workflow file (e.g.,.github/workflows/octomind-tests.yml
):
Configuration options
Parameter | Required | Description |
---|---|---|
token | Yes | Your Octomind API key, stored as a GitHub secret |
testTargetId | Yes | The ID of your test target in Octomind |
baseUrl | No | A publicly accessible URL to your deployment. If not provided, defaults to the URL in your default environment |
entrypointUrlPath | No | A specific URL path to be appended to your base URL (e.g., /some/path ) |
environmentId | No | ID of a specific environment to run the tests against |
prerequisiteId | No | ID of a test case that should be executed before batch generation (e.g., login test) |
Use cases
Generate tests on pull request
Automatically generate tests whenever a pull request is created or updated to ensure new features are properly tested. The action will return an overview of the tests generated on the pull request.
Example of Octomind test results in a pull request, screenshot 06/2023
Generate tests after deployment
Trigger test generation after deploying to a test environment to validate the deployment.Generate tests with prerequisites
Use prerequisite tests (like login flows) before generating new tests to ensure proper authentication.Troubleshooting
If you encounter issues with the GitHub Action:- Verify your API key is correctly set in the repository secrets
- Ensure your
testTargetId
is correct - Check that the
baseUrl
is publicly accessible - Review GitHub Actions logs for detailed error messages