# Export Test Scripts

You can export a Story's Test Scripts to Javascript (.js) files. This is useful for direct import into test automation tools like Cucumber.

On the Story toolbar, click the **Download** button and select **Test Scripts (.js)** from the menu:

<figure><img src="https://619360366-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvFE09GWUQiR5kjeutlr2%2Fuploads%2FGyvj8A3NIR3VMDtmM6S4%2FScreenshot%202025-01-12%20at%2012.54.22.png?alt=media&#x26;token=e66dad59-7582-41d7-8f76-ce2b2e0f9b2c" alt=""><figcaption></figcaption></figure>

## Test Script export file structure

Flowriter will prepare a separate `.js` file for each scenario Test Script. The files will be downloaded in a single ZIP file that when expanded will look similar to this:

<figure><img src="https://619360366-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvFE09GWUQiR5kjeutlr2%2Fuploads%2Frt718uQ9RVRh0yadL5yn%2FScreenshot%202025-01-12%20at%2012.54.33.png?alt=media&#x26;token=15866bf0-aeca-4f83-9567-5c055ff2f5a8" alt=""><figcaption></figcaption></figure>

Open the `.js` files in a code editor:

<figure><img src="https://619360366-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvFE09GWUQiR5kjeutlr2%2Fuploads%2FThD8Ovz9fzfDdbPNzRAK%2FScreenshot%202025-01-12%20at%2012.54.54.png?alt=media&#x26;token=030245f9-a7a0-4ed1-9462-b4fd8d4f83bc" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://candesce.gitbook.io/flowriter/generate-test-scripts/export-test-scripts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
