Skip to main content

API testing with test data set

Automator.AI boasts a powerful feature: Automated API Testing with Test Data Set. Designed to streamline API testing processes, this feature automates the execution of test cases with predefined datasets. By integrating this capability into the Automator tool, testers can significantly improve testing efficiency, enhance coverage, and ensure the reliability and quality of APIs. Enhance testing efficiency by running collections with various datasets, testers can comprehensively validate API functionality, leading to more robust applications.

The tool offers an intuitive interface for managing test datasets, empowering users to define and organize datasets comprising diverse input parameters and payloads.

Testing APIs with a dataset involves sending various requests to the API with ability to define and manage different sets of input data and verifying the responses. Users can effortlessly execute test cases against API endpoints using prepared test data, facilitating real-time monitoring of execution progress and result analysis.

Users can create and organize datasets within the Test Data Set section, specifying various input parameters and save it as shown below

 Image for Test data set section

Once date set is created he can use it during execution of an API collection , scheduling execution of API collection’s and for integration with CI/CD tools

For execution of API testing with test data set user needs to go to API testing section and click on Run button then the below screen will be visible

 API testing with test data image

When executing API tests, users select the desired API collections, environment, and test data set and number of iteration. If environments and test dataset have same variables - preference would go to test dataset. {{automator.env.keyName}} -- for calling the test dataset in api.

Overview on how execution will take place depending upon number of iteration and test data sets

  1. If there are 2 test dataset rows and number of iterations are also 2 then for 1st Iteration data from 1st row will be used and for 2nd iteration data from 2nd row will be used

  2. If there are 3 test dataset rows and number of iteration are 2 then for 1st Iteration data from 1st row will be used , for 2nd iteration data from 2nd row will be used and 3rd dataset will be ignored as number of iterations is selected as 2

  3. If there are 3 test dataset rows and number of iteration 4 then for 1st Iteration data from 1st row will be used, for 2nd iteration data from 2nd row will be used, for 3nd iteration data from 3nd row will be used and then for 4th iteration data from from 1st row will be used

On execution, the dataset values will replace the environment variables used in request and reports will be available in section for API testing reports. Real-time monitoring of test execution progress, including status of the request, pass/fail results, and execution logs.

Test datasets can also be utilized during scheduling execution, ensuring seamless automation and reporting based on predefined schedules.

 Scheduler section image

User can select the API collections to be executed, environment and Test data set with which he wants to execute the API collections. Once the execution is completed based on time & date for which it is scheduled, the reports will be available and will also receive it on email if notifications is turned on for it.

Comprehensive test reports are generated summarizing test results, including passed, failure details, and overall API performance metrics. This feature empowers users to validate API functionality, performance, and reliability across various scenarios and inputs with minimal manual intervention, thus enhancing the efficiency and effectiveness of the testing process.

Facilitates integration with CI/CD pipelines, enabling seamless integration of API testing into the software delivery process. The created data set can also be used in the integration section as shown below

Integration section image

User needs to select the key, API collections to be integrated, environment and Test data set with which he wants to integrate the API collections. Once all this selected then by clicking on next user can select the integration tool and proceed accordingly.

With automating the API testing process, it saves time and effort associated with manual test execution and validation especially for repetitive testing or critical tasks. It ensures consistent and reliable test execution by eliminating human errors and inconsistencies.

By following these steps, you can effectively test APIs with a dataset, ensuring that the API functions correctly under various conditions and scenarios. Seamless execution of test cases against the API endpoints using the specified test data.