
GitHub Action output
GitHub Actions Integration
LoadForge provides an official GitHub Action that allows you to trigger load tests directly from your GitHub Actions workflow. This integration makes it easy to incorporate performance testing into your CI/CD pipeline.Setting Up the GitHub Action
To use the LoadForge GitHub Action in your workflow:-
Get Your LoadForge API Token:
Log into your LoadForge account and navigate to the API section to retrieve your API token. -
Add the API Token to GitHub Secrets:
In your GitHub repository, go to Settings > Secrets and add your LoadForge API token asLOADFORGE_API_TOKEN
. -
Create a Workflow File:
Create a.github/workflows/loadforge.yml
file in your repository with the following content:
GitHub Action Parameters
Inputs
Name | Description | Required | Default |
---|---|---|---|
api-token | Your LoadForge API Token | Yes | N/A |
test-id | The ID of the LoadForge test to trigger | Yes | N/A |
duration | Duration of the test run in minutes (2-720) | No | 5 |
Outputs
Name | Description |
---|---|
run_id | The ID of the created LoadForge run |
monitor_url | The URL to monitor the LoadForge run (https://app.loadforge.com/run/monitor/{run_id}) |
Use Cases for GitHub Actions Integration
-
Continuous Performance Testing:
Automatically run load tests on every push to your main branch to catch performance regressions early. -
Pre-Release Testing:
Include performance tests in your release workflow to ensure your application meets performance requirements before release. -
Pull Request Validation:
Run load tests on pull requests to ensure that new code changes don’t negatively impact performance. -
Scheduled Performance Monitoring:
Set up scheduled workflows to run load tests at regular intervals to monitor your application’s performance over time.