Legacy Documentation
You're viewing legacy documentation for API Fortress (deployed via an on-premises container). To view documentation for the new SaaS version of API Fortress — now known as Sauce Labs API Testing and Monitoring (with Sauce Connect tunnels) — see API Testing on the Sauce Labs Cloud.

02. Test Composer Guide

The API Fortress Composer offers unparalleled flexibility and ease-of-use with everything at your fingertips to build tests in minutes and eliminate many duplicate tasks. Users of all skill levels may begin using the Composer with little or no training to quickly generate sophisticated functional tests. These tests may easily be reused as end-to-end integration tests and load (stress) tests. In turn, load tests may easily be reused as monitors for performance testing.

Special Note about End-to-End Tests / Integration Tests:
API Fortress has a different philosophy when it comes to creating multistep tests that reproduce user/consumer flows. Creating a series of independent tests that each hit one endpoint, and then running them in a specific order isn’t a proper testing methodology. It doesn’t allow for optimal testing of how each API interacts with each other. For that reason, the API Fortress composer is very flexible and allows you to create a single “test” that can handle a series of API calls. For example Search > Add to Cart > Checkout can and should all be inside of one smart test, and not three separate tests.
Read more about Integration / Multistep Testing:

Begin using the Composer by selecting from two versions: Visual or Code view. The visual Composer does not require coding expertise, and provides real-time suggestions via predictive text to help you create ideal API tests for your needs. The Code view is intended for users who are more comfortable working in code rather than a visual UI. With either Visual or Code view, easily make calls and add assertions for testing your APIs, and insert variables wherever needed. For more information, visit our API Testing University to research best practices and find detailed guidance.

Visual vs. Code View

(1) All of the available components can be seen by clicking on Add Request / Assertions.

If a component is not valid for the operation you are conducting, it will not be made available to help avoid mistakes. For instance, if you don’t add a POST first, you can not add a POST Body or POST Param. NOTE: Free accounts do not give you access to all available components.

Read descriptions of each component in the Reference section of API Fortress Documentation.

(2) This button allows you to easily transform an existing component into another component of the same type.

(3) Global Parameters are variables that are available to be used throughout a test. Reference these variables simply by calling it within the test using the convention:  “${VARIABLE}”.

Input Sets are a group of input variables representing a scenario. The test will be executed once for each input set, overriding the variable values into your test.

(4) HTTP Client – the APIFortress http client is very similar to many other http clients out there. You can make GET/POST/PUT/PATCH/DELETE calls and see their responses.
A key difference in our HTTP client comes from your ability to generate a test for the API you are calling right from there. If you click the “Generate Test” button, API Fortress will create a test for you based on the API’s behavior and response.


Learn how to create a test quickly here.

composer, components, intro