Overview
The custom integration uses Bugster’s webhook API to trigger test runs when your deployments are ready. This approach gives you full control over when and how Bugster tests are executed in your deployment pipeline.The custom integration is the same API that powers our GitHub Actions integration behind the scenes.
API Endpoint
Required Parameters
Your Bugster API key. Get this from Settings > API Keys in your Bugster dashboard.
Your Bugster project identifier. Find this in Project Settings > General in your Bugster dashboard.
Your Bugster organization identifier. Available in Settings > Organization in your Bugster dashboard.
The URL where your application is deployed and where Bugster should run tests. Required when
deployment_state
is "success"
.Optional Parameters
Current state of your deployment. Bugster only runs tests when set to
"success"
.Possible values:"success"
- Deployment completed successfully, trigger tests"in_progress"
- Deployment is still running, don’t run tests"cancelled"
- Deployment was cancelled, don’t run tests"error"
- Deployment failed, don’t run tests
The Git commit SHA for this deployment. Use either
commit_sha
OR branch
, not both.The Git branch name for this deployment. Use either
branch
OR commit_sha
, not both.The deployment environment name (e.g., “production”, “staging”, “preview”).
Response
Integration Steps
1
Get your credentials
Navigate to your Bugster dashboard and collect:
- API Key: Settings > API Keys
- Project ID: Project Settings > General
- Organization ID: Settings > Organization
Keep your API key secure. Never commit it to version control or expose it in client-side code.
2
Add webhook to your deployment pipeline
Add the API call to your deployment script or CI/CD pipeline. The webhook should be called after your deployment succeeds and your application is accessible.
3
Test the integration
Deploy your application and verify that:
- The webhook is called successfully
- Bugster receives the deployment notification
- Test runs appear in your Bugster dashboard
You can monitor webhook calls in your Bugster dashboard under Project Settings > Integrations.
Best Practices
Environment-specific testing: Use the
environment
parameter to run different test suites for staging vs production deployments.Error handling: Always check the webhook response and implement retry logic for failed requests.
Only call on success: Set
deployment_state
to "success"
only when your deployment is complete and accessible. Bugster cannot test broken deployments.Example Implementations
See our GCP Cloud Build integration guide for a real-world example of using the custom integration API.Troubleshooting
Repository does not have .bugster configuration folder
Repository does not have .bugster configuration folder
Error message:
"Skipping event: Repository does not have .bugster configuration folder"
This means your repository is missing the .bugster
folder with test configurations. To fix this:- Run
bugster quickstart --api-key=YOUR_API_KEY
in your repository - Follow the prompts to set up your test configuration
- Commit the generated
.bugster/
folder to your repository - Redeploy and trigger the webhook again
The
.bugster
folder must be present in the repository branch you’re deploying for tests to run.Tests not running after webhook call
Tests not running after webhook call
- Verify
deployment_state
is set to"success"
- Ensure
environment_url
is accessible and returns a valid response - Check that your API key, project ID, and organization ID are correct
- Confirm the
.bugster
configuration folder exists in your repository
Authentication errors
Authentication errors
- Confirm your API key is valid and hasn’t expired
- Ensure the
X-API-KEY
header is properly formatted - Check that your API key has the necessary permissions
Invalid project or organization
Invalid project or organization
- Verify your project ID and organization ID in the Bugster dashboard
- Ensure you’re using the correct IDs for the environment you’re targeting