Automatically Generate Your API Tests
Relevant for: API tests
What is the API Test Generator? The API Test Generator Wizard enables you quickly create an API test from a WSDL file containing your service's description. UFT parses this file, and creates one or more API tests, complete with test steps and all step property values populated.
When you should use the API Test Generator? You should use the API Test Generator when you want to create an API test without the need to manually add steps and populate step property values.
From the Start Menu, open the API Test Generator Wizard (Start > All Programs > Micro Focus > Micro Focus Unified Functional Testing > Tools > API Test Generator Wizard.
Once the wizard opens, follow the on-screen instructions to create your test.
What do you want to know?
When generating your API test, you must select a WSDL file that contains the service description. You can access your WSDL file from:
- The local file system
A URL. Make sure that the service specified in the URL is active or accessible when you try to import the service as part of the generation process.
If necessary, specify the security information and proxy details for the service's URL too.
In the Select Methods window, UFT displays all the methods described in the WSDL file you imported. Select one or more of the methods to include in the test.
As part of the test generation process, UFT enables you to create multiple tests, depending on what type of testing you would like to do. You can generate a test for each of the following aspects:
- Positive Testing: A full positive test that checks that the service's operations work as expected. This adds relevant checkpoints for each step (although these are not enabled by default).
- Standard Compliance: Checks the service compliance with industry standards such as WS-I and SOAP.
Security Testing. Tests the security of the service. You can select one of the following types of security testing:
SQL Injection Vulnerability. This checks if the service is vulnerable to SQL injections by injecting SQL statements and errors into relevant parameters.
Cross-site Scripting (XSS). Attempts to hack the service by injecting code with relevant parameters that will disrupt its functionality.
Boundary Testing. Using the negative testing technique, creates tests to manipulate data, types, parameters, and the actual SOAP message to test the component to its limits. You can select one of the following types of boundary testing:
- Extreme Values: Provides invalid data types to the services and verifies they are not accepted.
- Null Values. Provides NULL parameters to the components to verify they are not accepted.
For each aspect selected, UFT creates a separate test.
After you select the methods to include in the test, and the testing aspects you need, UFT generates the tests required. This may take some time. The tests are saved in the folder you specify in the Select Aspects window.
In the Generate window, UFT displays the information about the generation process, including errors.
When the tests are finished, you can open the folder containing the tests (click Open Output Folder) or view the log, if there were problems in the test generation process (click Open Log).