> 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/export-test-scripts.md).

# 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&amp;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&amp;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&amp;token=030245f9-a7a0-4ed1-9462-b4fd8d4f83bc" alt=""><figcaption></figcaption></figure>
