---
title: "AI Gherkin Script Suggestions"
canonical: "https://docs.getxray.app/space/XRAYCLOUD/1651736583/AI%20Gherkin%20Script%20Suggestions"
format: markdown
---
![Banner-Xray-Documentation-Enterprise.png](media://57aa498e-508d-4129-b065-10a17007b504)


<details>
<summary>Table of Contents</summary>

> Macro (toc)
</details>

This article covers the process of working with AI-suggested Gherkin scripts after you've configured your testing context. If you haven't yet set up your testing goal and system documentation, see [the first article in this series](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/393052325).  
  
Script Suggestions

Sembi IQ accepts a plain language description of the test you want to automate and suggests a Gherkin feature file. Rather than writing your Scenario or Scenario Outline by hand, you can describe what you want to test and let the AI service draft a script for you to review and edit.


## Describing Your Script

The Gherkin Script Suggestions banner appears at the top of the Automate Scripts screen, with a text area where you can describe the script you need in plain language.


![image]()


You don't need to use any special syntax. Write naturally, as you would explain the test to a colleague. Once you've finished writing your description and click Suggest Script, the AI service will create a new Gherkin feature file based on your description and the parameters and values in your model.


Example descriptions:

- "Test the login flow for a new user. They should be able to enter their email and password, click login, and be redirected to the dashboard."
- "Test the form where a user picks their state, enters their age, and submits it. After submitting, verify the claim status is displayed."

At least eight words are required before the Suggest Script button becomes active.


## Choosing a Gherkin Format

You can choose between two Gherkin formats by selecting one of two buttons above the text area.


![image]()


When the Scenarios toggle is selected, the AI service will suggest a unique Scenario block for each test case, with parameter values substituted directly into the step text.


When the Scenario Outlines toggle is selected, the AI service will suggest a Scenario Outline with an Examples data table, where each row corresponds to a test case.


## **Design Guidance**

If Design Guidance has been set up for your model, the AI service will use your testing goal and any uploaded context documents to improve its suggested script. If Design Guidance is not yet configured, clicking Suggest Script will show a dialog offering two options:


![image]()


Proceed without Guidance creates the script using only your description and the existing model. This can still produce useful suggestions, especially with a clearly-worded and detailed description.


Provide Guidance opens the Design Guidance setup, so you can add a testing goal and context before generating.


## Reviewing the Script

Once the AI service has processed your description, a new script is created containing the suggested Gherkin feature file. For example, given the description "Test the form where a user picks their state, enters their age, and submits it. After submitting, verify the claim status is displayed." with Scenario Outline selected, the AI service might suggest a script like this:


![image]()


You can then make edits to this script as needed, or refine the prompt and have the service suggest another script.  
​  
Once you're ready to save the script, you can do so by clicking the green Accept button. Alternatively, if the suggested script didn't cover what you needed, you click the red Reject button and generate again with a different description. Each generation creates a new script tab.


## Usage Limitation

AI Guidance has a usage limit of 250 requests per user account. If you're approaching or at this limit, contact [support@hexawise.com](mailto:support@hexawise.com) or your company representative. They can review your usage and suggest ways to get the most out of AI Guidance, such as refining your testing goals, providing more specific system documentation, or other approaches based on your specific use case.  
​

## Tips for Writing Effective Descriptions

- Be specific. The more detail you provide, the more relevant the suggested script will be. Describe the user actions, the data involved, and the expected outcomes.
- Use Design Guidance. If your model has a testing goal or context documents configured, the AI service can use that background to produce a script more relevant to your testing objectives.
- Reference your parameters. If you mention parameter names from your model in the description, the AI service can more accurately incorporate them into the suggested steps.
- If the suggested script doesn't match what you need, try rephrasing your description or adding more detail.


<details>
<summary>Support/Troubleshooting</summary>

If you have questions or technical issues, please     [       contact the Support team via the Customer Portal (Jira service management)](https://jira.getxray.app/servicedesk/customer/portal/2/user/login?destination=portal%2F2%2Fcreate%2F28)      or      [send us a message using the in-app chat](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44577312).
</details>