Hi Community members,
Have you ever wondered how much easier automated testing could be with an AI-powered assistant at your side?
Katalon Studio introduces StudioAssist, your new AI-powered sidekick designed to revolutionize your automated testing experience. Built on OpenAI’s GPT API, StudioAssist empowers you to write and understand test code with unprecedented ease and efficiency.
Key features of StudioAssist 
- Intelligent Code Generation: Craft automation test code effortlessly by providing StudioAssist with clear, contextual code comments as prompts.
- Code Explanation: Unsure about a specific code block? StudioAssist sheds light on its functionality with clear explanations.
Optimizing StudioAssist Usage 
To maximize the benefits of StudioAssist, please keep the following in mind:
- Prompt Formatting: Structure your prompts in a specific format to ensure StudioAssist interprets your requests accurately.
- Context is Key: Provide relevant context within your prompts to allow StudioAssist to generate the most fitting code or explanation.
You can see an example prompt below
/* Write a Katalon Studio test case to perform the following steps:
* 1. Open the browser and navigate to the URL stored in the GlobalVariable `G_SiteURL`.
* 2. Click the "Make Appointment" button with the ID: Object Repository/Page_CURA Healthcare Service/a_Make Appointment.
* 3. Fill in the username field using the value from the GlobalVariable `username` with the ID: Object Repository/Page_CURA Healthcare Service/input_Username_username.
* 4. Fill in the password field using the value from the GlobalVariable `password` with the ID: Object Repository/Page_CURA Healthcare Service/input_Password_password.
* 5. Click the "Login" button with the ID: Object Repository/Page_CURA Healthcare Service/button_Login.
* 6. Close the browser.
*/
Steps to Enable Katalon’s AI Features for your Organization
Notes: You need to be the Organization Owner for the account.
- Login to Katalon TestOps
- From the Katalon Platform homepage, click on the Settings icon in the upper-right corner of the page.
- Click on the Organization Name at the upper-left corner.
- Navigate to Account Settings.
- Enable AI Control.
Generate Code using StudioAssist
Below is an example of how you can generate code using StudioAssist right within Katalon Studio.
- Open a test case in Script Mode
- Provide your code prompt in terms of comment. For example:
/* Write a Katalon Studio test case to perform the following steps:
* 1. Open the browser and navigate to the URL stored in the GlobalVariable `G_SiteURL`.
* 2. Click the "Make Appointment" button with the ID: Object Repository/Page_CURA Healthcare Service/a_Make Appointment.
* 3. Fill in the username field using the value from the GlobalVariable `username` with the ID: Object Repository/Page_CURA Healthcare Service/input_Username_username.
* 4. Fill in the password field using the value from the GlobalVariable `password` with the ID: Object Repository/Page_CURA Healthcare Service/input_Password_password.
* 5. Click the "Login" button with the ID: Object Repository/Page_CURA Healthcare Service/button_Login.
* 6. Close the browser.
*/
-
- Select the prompt text. Right-click and select StudioAssist > Generate Code. You can also use the hotkeys, Ctrl + Shift + C for Windows or ^ + ⌥ + C for macOS:
Explain Code using StudioAssist
Below is an example of how you can use StudioAssist to explain a block of code within Katalon Studio
- Open a test case with existing test steps in Script mode.
- Select the desired code snippet. Right-click and select StudioAssist > Explain Code. You can also use the hotkeys, Ctrl + Shift + E for Windows* or ^ + ⌥ + E for macOS.
Key benefits of using StudioAssist
- Faster Testing: Automates test script creation by translating natural language into code, reducing manual effort and saving time.
- Better Code: Generates well-structured, clean, and maintainable code following best practices and coding standards.
- Easier Understanding: Explains code snippets and simplifies complex code blocks for improved comprehension.
- Improved Collaboration: Enhances communication among team members, streamlines code reviews, and promotes knowledge sharing.
- AI-Powered: Utilizes OpenAI’s GPT for intelligent code generation, with continuous improvements for smarter capabilities.
Current limitations of StudioAssist in Katalon Studio
- AI Hallucinations: It may generate code with nonexistent keywords that require manual revision.
- Lack of Context Awareness: StudioAssist cannot access test object libraries, variables, custom keywords, or project-specific data.
- Programming Knowledge Requirement: Users need coding and debugging skills to correct and adapt the generated code.
Reference
Please refer to our documentation for more information on using StudioAssist: https://docs.katalon.com/docs/proof-of-concept/studioassist-in-katalon-studio
If you find this article helpful, then don’t forget to leave us a like or a heart
, and share it with your colleagues and teammates. We greatly appreciate your support for the KShare series!