#
Test suite details
Once you're done creating a test suite for your API, clicking on a test suite row on Test Suites page will take you to the Test Suite Details page. All the tests generated by KushoAI for your API are displayed on this page, along with a bunch of operations that you can perform on them.
Let's take a look at what's present on this page and how you can use the operations available here to test your API.
#
Test suite name
At the top of the page is the name of your test suite. This name is generally derieved from your spec/collection name concatenated with the name of your API. In case of test suites which were created by manually entering API information or using cURL command, the name is auto-generated. In case you want to rename the test suite, you can do so by clicking on the pencil icon next to the name.
#
Test suite API information
The "API Details" button displays the API information for a test suite. This is the information that we picked up from a spec/collection or was entered by you manually during creation of test suite. During test generation, KushoAI uses this API information to create payloads for each test. This API information is editable and changing this will trigger regeneration of the tests a test suite. More details about this here.
#
Filter tests by types
KushoAI generates tests belonging to various categories. Click on "Filter Tests By Types" accordion to view all the different categories for which KushoAI has generated tests. You can also use the categories here to filter tests based on their categories.
If a filter is active, it'll be displayed next to the accordion title in green. To remove a filter and display all tests, click on the filter name displayed in the accordion title.
#
Test counts
The test counts section, as the name suggests, displays counts of tests in various states
- All tests: This is the total number of tests present in a test suite
- Executed: This is the number of tests executed using any of the available run options
- Passed/Failed: This is the number of tests marked as passed/failed based on assertions
#
Tests table
This is the most important section of this page. This is where all the tests generated by KushoAI (and later added by you) are shown. Let's take a look at each column of this table:
- Checkbox - This can be used for selecting multiple tests and performing actions on them like running, adding/removing tags, etc.
- Test description - This is a high-level plain english description of the objective of the test (e.g. Test without proper auth token, Test with null value for name field). Next to the description, you'll see the categories and tags for the test.
- Run - This column has the button for running a test. The column header has a "Run All" button which can be used to execute all tests in one go. The gear icon next to "Run All" button can be used to configure running-related parameters like wait time, parallelization, etc.
- Details - Clicking this button will open a dropdown which displays the Test Details section with following information:
- Status and Time: After running a test, status code received in API response and time taken by the API to execute will be displayed here.
- Request: This is the API payload for the test. This is a variation of the API information that was imported/entered during test generation based on what's being tested. This payload is editable.
- Response: After running a test, the API response will be displayed here.
- Assertions: Assertions are JS code used for validating the API response to determine if a test has passed or failed (similar to asserts in unit tests).
- Assertion Results: This is where results for each assertion will be displayed after running a test
- Status Code - After running a test, the status code in API response is displayed here
- Assertions - Pass/fail status of the test is displayed here after running a test. Note that if assertions are not present, this will be blank or "N/A"
- Actions - Actions that can be performed on a test (like delete, copy UUID for a test, etc.) are displayed here.
Note that this is a paginated table with a default page size of 50. The pagination controls are displayed at the bottom of the table.
This table also has a search bar. You can search using test description, test UUID, categories, tags. Selection and running after search only work on filtered tests, i.e. if 10 tests out of 50 are shown after searching, clicking on "Run All" will only run the 10 filtered tests. Check this section for more info.
#
Test Suite Toolbar
This section displays a bunch of operations that can be performed on a test suite. Let's go over what these operations are:
- Environment selector: Use this switch between environments. Environments allow you to set up different set of variables (like URL, auth tokens, etc.) for each environment (e.g. localhost, qa, stage, pre-prod, prod) which you plan to use for testing.
- Variables: Variables can be used to store values that keep changing (e.g. auth tokens, API keys, etc.). Use this to add/edit/delete variables. Check this page to understand how to use variables in API payloads.
- Workbench: You can use this feature to perform bulk operations on tests like editing API payloads, generating and editing assertions for all tests in a single pane. Check this page for details.
- Generate Report: Reports provide high level summary of a test run. Use this button to send a report in an email or to download a report.
- Add Tests using Payload: Use this to add more tests to the test suite by defining API payload. Check this section for details.
- Add Tests using AI: You can use this to add tests using natural language prompts. Specify what you wish to test in plain english and let KushoAI come up with API payload and assertions. Check this section for details.
- Pre Run Script: Use this to run custom logic in JavaScript before starting test suite run. This can be used for automating stuff like fetching a fresh dynamic authentication token from an auth server and setting it in a variable before every run of test suite. More details here.