Generate and Explain code in script editors
Generate code
StudioAssist can generate intelligent automation test code suggestion based on a prompt.
To generate code with StudioAssist, follow these steps:
- Open a test case in Script mode.
- Provide your code prompt in terms of code comments, single line or block comment. For example, the prompt can be:
* Write a Katalon Studio test case to perform the following steps.
* 1. Open browser to the URL stored in G_SiteURL
* 2. Click the make appointment button
* 3. Fill in the username and password fields based on the variables
* 4. Click the login button
* 5. Verify that the appointment div exists
* 6. Close the browser - Select the prompt text. Right-click and select StudioAssist > Generate Code.
Result
StudioAssist then generates the test script below the prompt text:

Explain code
You can select a code snippet and use StudioAssist to explain the code.
To generate code explanation, follow these steps:
- Open a test case with existing test steps in Script mode.
- Select the the desired code snippet. Right-click and select StudioAssist > Explain Code.
Result
StudioAssist then generates the code explanation below the selected script:
