The composer is the cornerstone of API Fortress.
With the composer you can make calls and add assertions for testing your APIs.
There are two versions of the composer: the visual composer and the code view. Visual composer does not need any code knowledge and provides real time suggestions to help you while writing the test. The code view is intended (only for paid accounts) for those that are comfortable with coding and want to add scripting functionalities to their tests.
All the available components can be seen by clicking on Add Request / Assertions.
The panel shows you all the available components grouped by category.
If a component is not valid for the operation you are doing, it is not available (i.e. if you didn’t add a POST first, you cannot add a POST Body or POST Param), so some mistakes can be avoided. Please consider Free accounts do not provide all the available components.
See the other pages in the Reference for the explanation about each component.
In the header:
The first links leads you to the company main dashboard.
“Tests” leads you to the project test list.
“Dashboard” brings you to the project dashboard.
“API Quality” allows you to see the status of your tests.
“Vault” opens the company vault.
“Tools” contains the link to the HTTP client that allows you to make calls and see the responses and the link to Gadgets for generating signatures, base-64 encode/decode or use crypto features.
In the top left of the page, there are tools for helping you to create the test:
From left to right:
+: has the same functionality of the Add Request / Assertions in the composer.
pencil: edit the selected component.
arrows: transforms a component into another.
trash: deletes the selected component.
save: saves the current working copy. Saving the test won’t affect the scheduled version (if any); any change you made will be in your working copy. You will need to publish the working copy to make it effective.
save & exit: exits the composer with or without saving the changes you made.
environments: allows you to open a presets editor.
run tests: runs the test, in order to check if all works fine. You can choose the data center you want to run it on. Running a test inside the composer won’t create logs and reports as well as won’t affect the version that is already scheduled.
autosave: if enabled the working copy will automatically be saved every minute.
Every component can be dragged and dropped to easily rearrange your test.
At the left of the screen there are three buttons:
the first one (top) opens the Global variables / input sets panel, the middle button opens the Vault/Snippet panel and the third one (bottom) opens the HTTP Client.
Global variables / input set panel:
- the Global variables don’t change during the test execution like domain, path, api key.
- Input sets: are groups of variables to run the test against such as IDs, search terms…
Vault: opens the vault/snippet panel, see the dedicated page for the details.
HTTP Client: our console allows you to make calls and see the responses.
On the top left of the console there are the buttons to perform the following actions:
folder: open/close the request panel (the one where you can see the saved requests/payloads).
arrows: expand/reduce the console in the window.
import: import a call made on console into the composer, so you don’t have to write it again into your test.
export: export the selected call in the composer into the console, so it will be easy to see the response without needing to write it.
Generate Test: this button allows you to create a test using the ‘magic tool’ without needing to write anything. In order to use it, first you have to write a call in the console and send it, once the response showed up, you can tap on the magic icon that will auto-magically create the test. If you want to have a better idea on how it works, please check out the tour that is available tapping on ? icon in the header of the composer.
save: save the request you made in the console in order to retrieve it in the future. Once saved, the request and payload will be available to you anytime, just click on the name and it will appear in the console. In this way, you can see it later if you didn’t complete the test or you can compare the current response with the old one in order to check any change made in between.
Downloader: the data center you want to run the request on.
At the bottom there is the console where you can make the call. Once you made a call in the console, you can see the response but the most important thing is that in this way, you will get real time assistance while writing your test: this means that every field in the response will present a suggestion on the data structure.