Skip to main content

StudioAssist chat window

Important
  • Katalon Studio Enterprise version 10.1.0 onwards.
  • The AI feature settings is enabled for the Account. If disabled, you can opt for either a personal OpenAI key, or Azure OpenAI key. For more details, see StudioAssist Preferences.

StudioAssist chat window enables you to instantly access and chat with your StudioAssist from within your Katalon Studio app.

From the chat window, you can:

  • Ask instructions for Katalon Studio features, automated test writing, and built-in keywords.
  • Learn about testing concepts whenever you need help.
  • Generate automation test code or explain a code snippet.
  • Ask follow-up questions with a ChatGPT-like experience.

To learn about StudioAssist, you can refer to this document: StudioAssist in Katalon Studio.

How to launch StudioAssist chat window

Automatic launch

When you open a project in Katalon Studio for the first time, StudioAssist chat window will appear automatically on the right side of the workspace.

Manual launch

If StudioAssist chat window is not visible or if it's closed, click the StudioAssist icon on the naub toolbar to open.

StudioAssist icon in Katalon Studio

Alternatively, use the shortcut ^ + ⌥ + N (macOS) for quick access.

No AI models available

If there is no AI model configured for your account, StudioAssist chat window will display a There is no AI model in your account message.

StudioAssist chat window in Katalon Studio

To resolve this, click Request access or Add your API key button and follow the instructions.

  • Request access: Contact your account owner and activate AI features.
  • Add your API key: If you have your own OpenAI key or Azure OpenAI API key, follow this document to configure your settings: StudioAssist Preferences.

Once configured, return to the StudioAssist chat window and click Reload to refresh it.

Notes:
  • For the best experience with the chat window, increase the Max completion token​ to ​16000​.
  • StudioAssist chat window supports gpt-4o-mini-2024-07-18 and gpt-4o-2024-08-06 or later. Using earlier or other models may result in compatibility errors. To learn more about GPT Structured Outputs supported models, you can refer to this OpenAI documentation: Supported models.

How to use StudioAssist chat window

StudioAssist chat window offers three main ways to help you learn and use Katalon Studio for automated testing more efficiently: answering questions about Studio features, generating test scripts, and explaining code.

Note

StudioAssist is designed to answer questions specifically related to Katalon Studio, such as features, keywords, and testing instructions. Avoid asking unrelated or out-of-scope questions to ensure relevant and accurate responses.

  • Ask about testing in Studio: You can get instant answers to your queries about automation testing concepts, such as "How to create a test case in Katalon Studio?", or how to use a Katalon Studio feature effectively.

  • Generate a test script: You can type your request into the chat window to quickly create test scripts, custom keywords, or test data. See Example use cases for StudioAssist.

  • Explain your code: You can ask StudioAssist to explain a code snippet. For example, you can type "Explain this code:" followed by the code snippet you want explained.

StudioAssist Preferences setting in Katalon Studio

Example use cases for StudioAssist

StudioAssist helps automate the process of generating test scripts for various scenarios. Below are some examples of how you can use StudioAssist chat window to support your work:

[Mobile testing] Write a mobile test script

If you have captured mobile objects using Mobile Object Spy and want to write test cases for basic scenarios, you can provide the app ID and object list in a manual script.

Write me a mobile test case with the following steps:
1. Start application, uninstalling the application automatically after run
2. Tab on the linear layout, timeout 0
3. Get text 'HorizontalNestedScrollView', timeout 0
4. Close the app
My app ID: 6261b88f-275b-4ae5-b0d1-b95fbf2560bd
Object list:
findTestObject('Object Repository/android.widget.LinearLayout')
findTestObject('Object Repository/android.widget.TextView - HorizontalNestedScrollView')

[API testing] Verify status code

To generate an API test case, ensure you specify the API endpoint (for example, https://reqres.in/api/users?page=2) and the corresponding test object (getAllUsers) explicitly in your request.

Write me an API test case with the following steps:
1. Send a GET request to the URL 'https://reqres.in/api/users?page=2'.
2. Verify that the response status code is 200.
Use the object ID: findTestObject('getAllUsers').

[Web testing] Generate a Login test script using existing test objects

If you already have test objects prepared in your project, you can quickly generate a web test script using StudioAssist. Simply provide the necessary test object details, variables, and the steps you want to automate.

For an example of predefined test objects, refer to our sample project: Sample WebUI project (Healthcare sample).

I have a list of test objects as below:
- Make appointment button: 'Page_CuraHomepage/btn_MakeAppointment'
- Username: 'Page_Login/txt_UserName'
- Password: 'Page_Login/txt_Password'
- Login button: 'Page_Login/btn_Login'
- Appointment div element: 'Page_CuraAppointment/div_Appointment'

I also have a URL: GlobalVariable.G_SiteURL, and two variables `Username` and `Password`

Write me a 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. Close the browser

Summarize a piece of code

If you need a quick summary of a team member's code without reading it line by line, use StudioAssist to generate a clear and concise explanation.

Summarize what this piece of code does in 3 sentences.

If you only select a code and ask StudioAssist to explain, you will get the longer answer, as StudioAssist is trying to explain line by line what the code is about.

Create a custom keyword

If you need to create a custom keyword in Katalon Studio for specific tasks, you can ask StudioAssist to generate the code for you.

Write me a custom keyword in Katalon Studio to handle a login flow:
- Name the method: login.
- Accept three TestObjects: username field, password field, and login button.
- Accept two Strings: username and password.
- Set the username text, set the password, and click the login button using Katalon’s built-in keywords.
- Provide the complete Groovy code with the @Keyword annotation, necessary imports, and brief documentation.

Explain a custom keyword

If your team uses custom keywords in test scripts, StudioAssist can help you quickly understand what each keyword does.

Explain what this custom keyword does:
// Paste your custom keyword code here

Reuse custom keywords

If you've already generated custom keywords, you can reference them directly in your request to build new test scripts.

Use the clickElement custom keyword to tap on the login button.

Troubleshoot common issues

You can ask StudioAssist to suggest workarounds or troubleshooting steps when encountering errors in your test cases. Provide details about the error or the failing step to get more accurate suggestions.

What should I do if my test case fails at step 3 due to timeout?

Write a manual test case

If you need help drafting a manual test case for your testing scenarios, StudioAssist can assist by generating the steps, expected outcomes, and other details based on your description.

Provide a manual test case outlining the steps to test a basic login process following a password reset. The test case should include a descriptive title, preconditions, test steps with expected outcomes, pass/fail criteria, and any relevant notes for handling errors or exceptions.

Optimize a code

StudioAssist can help you optimize existing code by providing suggestions for cleaner, more efficient, or better-structured implementations. Provide the code snippet and clearly state your intention to optimize it.

Please optimize this code for better performance:
for (int i = 0; i < array.length; i++) {
if (array[i] % 2 == 0) {
System.out.println(array[i]);
}
}

Tips for getting better responses

To get the best results when asking StudioAssist to generate a test case, provide clear and specific details. Here are some tips:

  1. Provide your input in certain format. See Tips to use StudioAssist.
  2. Specify the type of application under test (AUT): Indicate whether you're writing a mobile test, API test, or web test. For example:
    Write me a mobile test case.
    Generate an API test case.
  3. Include details about the AUT: Mention specifics like the app ID for a mobile application or the URL for a web application.
  4. Define object paths clearly: Provide the exact object paths or test objects you want to include in your test. You can use tools like Mobile Object Spy to capture these paths. See Capture objects with Mobile Object Spy.

Known limitations

While StudioAssist chat window offers valuable support, it currently has a few limitations:

  • Limited knowledge base: StudioAssist does not yet pull information directly from Katalon Studio’s official documentation. For complex or uncommon queries, you may need to refer to Katalon documentation manually.

  • Lack of project context: StudioAssist is not aware of test object library, global variables, custom keywords, other test cases, test data, etc. To make sure that the code is generated with proper variables and locators, you should specify them in your question.

  • Single conversation mode: StudioAssist supports only one active conversation at a time. Use the Clear conversation option regularly, especially when switching contexts, to reduce the chances of StudioAssist using incorrect context from previous questions. Your conversation is also automatically cleared when you close StudioAssist chat window.

  • AI responsiveness disclaimer: Responses may be inaccurate or misleading. Always verify outputs before implementation. You can rate responses as Good or Not Relevant to help improve StudioAssist. Your feedback is not used to train the AI model or track your conversations.

  • On Windows, there is no functioning hotkey to open the StudioAssist chat window.

Was this page helpful?