Apidog supports running automated tests in any CI/CD pipeline through a simple CLI command. Whether you're using GitHub Actions, GitLab CI, Jenkins, or a custom webhook handler, you can trigger Apidog tests automatically whenever your Git repository is updated.
The integration is based on a simple principle: Git Webhook + CLI Execution.When a Git event (like a push or pull request) occurs, your CI/CD tool receives the event and runs the apidog run command to execute your test scenarios.This guide uses GitHub Actions as an exampleโbecause it's widely used and requires no additional infrastructure. But the same approach applies to other platforms.This setup is ideal for:
Automatically running API tests on every push or pull request
Monitoring specific branches (e.g. main, develop)
Supporting pre-deployment checks and regression testing
Ensuring consistent test execution in your CI workflows
Now let's walk through the setup using GitHub Actions.
Return to your GitHub repository and open the Actions page.
2.
Create a new workflow and paste the configuration code copied from Apidog.
3.
If you already have an existing CI pipeline, you can merge the Apidog test configuration into it.
4.
Click "Commit changes" to save and enable the workflow.
Please make sure to replace the variable $APIDOG_ACCESS_TOKEN in the code with your actual Access Token.
The workflow file will be saved in your repository under .github/workflows/. It is part of your source code and will be included when you clone or pull the project locally.You can edit it in your local development environment and commit changes through Git like any other file.
The top of the workflow file contains a line like:
This tells GitHub to automatically trigger the workflow whenever someone pushes code or opens/updates a pull request.It's a shorthand syntax equivalent to a more verbose version, and works well for most CI scenarios.If you want to customize which branches or events should trigger the workflow, you can refer to the official documentation: ๐ GitHub Actions: Events that trigger workflows
Once configured, the GitHub Actions workflow will automatically run whenever there is a new code commit. You can monitor the workflow's status and test results on the Actions page.