Continuous API testing
Talend Cloud API Tester's CLI test runner integrates well with most CI solutions, all you need is the latest Java JDK and Maven installed on your CI machine.
The following solutions are compatible with Talend Cloud API Tester:
- Jenkins
- Azure Pipelines
- AWS CodeBuild and CodePipeline
- Travis CI
- CircleCI
- Team Foundation Server
- Gitlab CI/CD
Other CI/CD solutions may be compatible too. If you have another working solution, please contact us so we can update this page.
CI workflow
Your API tests should follow this flow:
You should build your API from the sources, then run unit tests, deploy it and finally run integration tests against it using Talend Cloud API Tester.
Technically, there are two main ways to do so which are described below. For more information on how to configure your CI builds, see Talend Cloud API Tester Examples.
Basic workflow: test your main branch once a day
If you choose to test your API on a static environment, you can run the test on demand or schedule your job to run nightly. This solution is easy to implement and does the job, but note that:
- Only one test can run at a time.
- The data in your API gets "polluted" when running a test and you must clean it before running another test or they won't run in the same conditions.
- Anybody with access to that environment can request the API while the test is running, which can result in hard-to-debug test failures.
If you are testing on a staging environment, you can create a CRON task that runs once a night and make it:
- Pull the API code and test file from GitHub.
- Build and test your API code.
- Deploy it to your environment.
- Run your API tests against it with the maven plugin.
- Get your test reports.
Once the job exists, you should be able to run it on-demand too.
Advanced workflow: check your API on each commit
A more advanced solution is to deploy your API in a container for each job run. That allows you to:
- Test multiple branches at the same time.
- Work in a compartmentalized environment.
- Test every commit.
If you are testing your API in containers, you can create a task that runs each time the sources are updated and make it:
- Build and unit tests the API code.
- Deploy it in a container.
- Run your API tests against it with the Talend Cloud API Tester Maven plugin.
- Get your test reports.