We're excited to introduce GenAI Test Creation for API tests, a new feature designed to accelerate your API testing workflows with the power of generative AI.
Building comprehensive API tests often involves manually defining requests, headers, bodies, and assertions, which can be time-consuming. GenAI Test Creation streamlines this process by automatically generating test steps based on your intent and API details.
Previewing a generated API test
Early access
GenAI Test Creation is currently in early access and available for you to try at no additional cost during this period.
- Most customers: this feature is already enabled and visible on the test creation page.
- Customers who opted out of AI features: if you want to try out GenAI Test Creation, please contact your customer success manager.
- Trial users: request a demo to gain access.
For transparency, mabl currently intends to include GenAI Test Creation as part of the Advanced AI add-on at general availability. Please note that this approach is subject to change.
Try it out
To start creating API tests with GenAI Test Creation, take the following steps:
- Create a new API test: Navigate to New test > API test.
- Define the intent: In the test creation form, describe what you want the test to accomplish. Be specific for better results. For example, instead of just "Test user endpoint," try "Verify full CRUD operations for the /users endpoint: Create user, Get user details, Update user email, Delete user."
-
Provide API information In the "API specification" section that appears, add details about the API under test to teach mabl how to interact with it.
- Upload files: For best results, upload an API specification like an OpenAPI or GraphQL schema. You can also upload Postman collections, HAR logs, code files, or even text descriptions.
- API descriptions: Use the text field to add supplementary details like authentication instructions, required headers, or sample cURL requests.
Providing an intent and API specification
- Generate the test: After filling out the remaining information on the test creation form, click on Create test. mabl's AI will generate a preview outline of the test steps based on your input.
- Review: Review the generated outline for your API test. If it looks good, click Create test again to load the steps into the API Test Editor. If not, modify your intent and click Generate new outline.
- Build out your test: Review the generated steps, including URL, method, headers, body, assertions, variables, in the API Test Editor. Run the steps, validate their behavior, and make any necessary adjustments.
Learn more
We're excited for you to try GenAI Test Creation and accelerate your API testing efforts! Check out the documentation to learn more about Creating API tests with GenAI.
Limitations
Please be aware of the following limitations during the early access period:
- The quality of generated steps depends heavily on the completeness and accuracy of the provided API information and intent. Complex schemas, or incomplete information, might pose challenges.
- Generated steps do not currently include snippets for complex validations or pre/post-request scripts.
- OAuth 1.0 authentication configuration is not automatically generated. If OAuth is required for your API, you will need to configure it manually.
- API flows are not yet supported by GenAI Test Creation.
- GenAI Test Creation is biased towards English. If you define the test intent in a non-English language, the API Test Editor may still generate tasks and assertions in English.