Autoscript using documentation
Last updated
Last updated
The QAautoMATER tool has the capability to generate templates for all API scripts based on the Swagger URL.
It extracts the JSON body from where we can derive the implementation. For example, we need to input the URL https://fakerestapi.azurewebsites.net/swagger/v1/swagger.json. The JSON definition URL may vary depending on the applicatio
The autoscript using documentation page can be accessed by navigating through Automation > API Testing > Autoscript using documentation.
In the configuration, we have added the baseURL https://fakerestapi.azurewebsites.net/ for the QA environment. To provide details in the Basic section, we need to use the same environment and component URL
We need to enter the same information in the Basic Details section on the Autoscript development documentation page.
Please provide the Swagger URL. Note that the Swagger base URL should contain the base URL, and the relative URL should point to the JSON definition. After opening the Swagger URL, the page should return a JSON response
After clicking the 'New API Scripts' button, templates for API scripts will be created for all endpoints, which can be viewed on the right side of the page.
QAautoMATER automatically creates the component name and assigns the test script name to the test script. In the Swagger documentation, the Logical Controller is viewed as the Component in QAautoMATER.
Document Details contains the following fields:
It determines the total number of controllers or components found in the Swagger documentation.
It determines the total number of endpoints under all controllers or components in the Swagger documentation
The existing endpoint displays the count for which a test script has already been created in QAautoMATER
It determines the total number of scripts created for all endpoints by QAautoMATER.
QAautoMATER creates templates for all test scripts, automatically assigning payload values. It also generates negative test scripts to check for client-side errors such as 400, 401, and 404. In cases where the application API follows standard protocol, no modifications are required for these test scripts. However, if the application does not adhere to standard protocol, all test scripts that need modification will have names starting with TBD.
This chart displays the number of test scripts in the completed state out of all test scripts, indicating that no modifications are required for those particular test scripts.
Please note that for test scripts whose names start with TBD, we need to update the payload and assertion in accordance with the test case requirements.
Video file for Auto script using documentation