API Fortress is an API-first platform that was built from the ground up for deployment flexibility and non-disruption to existing workflows. Whether you are transitioning to a CI/CD pipeline or have already invested in a CI/CD pipeline, it is easy and seamless to integrate continuous API testing powered by API Fortress into your CI/CD pipeline. We offer a scheduler, APIs, and command-line tools to simplify integrations with your CI/CD pipeline.
Find APIs on the API Fortress platform for most features, including data and test execution. You can use that API to easily run a single test, all tests, tests with specific tags, and more. Learn more about this:
- Jenkins and API Fortress
- Bamboo and API Fortress
- Comprehensive API docs
- Search below to the General Guide for all other CI platforms:
- Azure DevOps Server
- Gitlab CI
- And more!
We have also created a command-line tool that is easy to use, and exposes the execution of APIF tests in their local environment. It is also a great way to expose results during the build phase directly in the CI platform.
- Download APIF-Auto
- Jenkins and APIF-Auto
- APIF-Auto General Docs - The command-line tool can be used with any CI/CD platform! We are working on creating additional dedicated docs.
Depending on your CI/CD platform, you may need to install a plugin that allows for HTTP requests during the build process. API Fortress will need the plugin to execute the tests.
The first step of integrating API Fortress into your CI/CD process is to grab the generated API hook for the project in question. To do so, go to the Settings panel in API Fortress. This view, seen below, can be accessed from anywhere in the application by clicking the gear icon in the top right corner. Please note that you need Manager access to generate a webhook. From Settings, click the API Hooks section to generate the hook for your project.
The next step depends on what you’re trying to test. The following directions are based on the assumption that you wish to run all of the tests in a project. You can also run a single test, or a series of tests with a certain tag. If you would like to learn more, please contact API Fortress.
As it stands, our API hook is as follows:
The normal command to run all of the tests in the project, per the API Fortress docs is /tests/run-all, so we append this onto the end of the API call. You may need to request a JUnit output. To do that, simply collect a few query parameters. First, set sync to true so that we can set format to JUnit.
In short, we need to append
?sync=true&format=junit to the webhook call. That gives us the final API call:
Great! If we make this API call via a browser or a tool like Postman, we can see our results in JUnit. We’re almost there.
From your CI/CD platform’s dashboard, you’ll need to paste the webhook call to the flow. We have more specific docs available, for instance, if you wish to use Jenkins.
The test results can then be passed along to platforms like qTest or Zephyr in your CI/CD pipeline.