> For the complete documentation index, see [llms.txt](https://candesce.gitbook.io/flowriter/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://candesce.gitbook.io/flowriter/generate-test-scripts/test-scripts-in-flowriter.md).

# Test Scripts in Flowriter

Flowriter can analyze a Story's Acceptance Criteria and generate **Step Definition** test scripts, in Javascript.&#x20;

These can be used to save time when creating automated tests to validate the implementation of the feature documented in the Story.

{% hint style="info" %}
**Step Definitions** connect steps in Gherkin -style Acceptance Criteria to programming code.&#x20;

A Step Definition contains an expression that links it to one or more Gherkin steps. When the Cucumber test automation tool executes a Gherkin step in a scenario, it will look for a matching *step definition* to execute.

Flowriter will generate sample Step Definition test scripts, in Javascript, for each Scenario generated from the Story flowchart.

For more information about Step Definitions used in the Cucumber test automation tool, see [Cucumber Step Definitions](https://cucumber.io/docs/cucumber/step-definitions/)
{% endhint %}

<figure><img src="https://619360366-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvFE09GWUQiR5kjeutlr2%2Fuploads%2FcwRAbf9gEgUk9lAccct6%2FScreenshot%202025-01-12%20at%2011.45.40.png?alt=media&amp;token=3a6c09b1-59f0-434b-b44b-891f63283eea" alt=""><figcaption></figcaption></figure>

## Automation frameworks/tools

Step Definition test scripts do not prescribe the test automation framework - different tools may be used to automate testing.

For example, [Selenium](https://www.selenium.dev/) is a popular tool for controlling web apps in automated tests, while [Appium](https://appium.io/docs/en/latest/) is a popular tool for controlling mobile apps in automated tests.

If your feature relates to an app, Flowriter will attempt to determine whether it is a web or mobile app and include sample Selenium or Appium Javascript code in the Step Definition test scripts.

## Manual test steps

Where Flowriter cannot determine the technical nature of the feature, or it includes steps that cannot normally be automatically controlled by a third-party automation framework, it will include comments in the source code to indicate this.
