Create end to end test scripts from sheet user stories
When a user story in your sheet is added or changed, its test cases and an end-to-end test script are generated and saved to a review tab, so QA can pick them up.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/create-end-to-end-test-scripts-from-sheet-user-stories/
Paste into Claude, ChatGPT, Cursor or any agent.
- Category
- Engineering · Quality assurance
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/create-end-to-end-test-scripts-from-sheet-user-stories
Set it up with the CLI
- Add it. Copies the folder into
zaps/create-end-to-end-test-scripts-from-sheet-user-stories/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/create-end-to-end-test-scripts-from-sheet-user-stories - Fill in the values in
config.ts, and in any other file the list marks. Replace each one as its comment and SKILL.md say. - Deploy it. Asks for any value still left, signs you in to Zapier if you aren't, then publishes it to your account.
npx zap-pack deploy create-end-to-end-test-scripts-from-sheet-user-stories - Check it. Its recent runs, with status and errors.
npx zap-pack logs create-end-to-end-test-scripts-from-sheet-user-stories
zaps/create-end-to-end-test-scripts-from-sheet-user-stories/
- README.mdWhat it does, for people
- SKILL.mdHow an agent sets it up: what to ask you, and how to test it
- config.tsIts settings 2 to fill in
- connections/chatgpt.tsThe
chatgptaccount it uses - connections/google-sheets.tsThe
google-sheetsaccount it uses - triggers/updated-row-only.tsWhat starts it:
google-sheetsupdated_row_only - workflow.tsThe code; each
ctx.stepis a step in the Zap
Agents: add --yes to any command so it never prompts. When it needs an answer only the user can give, it stops and names the flag that supplies it.
SKILL.md
View MarkdownWhat it does
- Trigger: a story row is updated in the stories worksheet (
google-sheets,updated_row_only). chatgptwrites structured test cases for the story: Test ID, Test Case Name, Purpose, Preconditions and steps.- The workflow pulls the Test IDs, names and blocks out of that text, in plain code.
chatgptwrites a runnable TypeScript end-to-end test script from those blocks.google-sheetslooks up the output row whose Story ID matches. It updates that row if found, otherwise adds a new one, with Story ID, Test IDs, a test case summary and the script.
The prompts send the story text to ChatGPT, so use only stories you are allowed to send to it.
Ask the user
Each REPLACE_… value is set per person. Resolve names to IDs with the user's own connections; don't ask them to paste an ID you can look up.
| Setting | What goes there |
|---|---|
SPREADSHEET_ID |
The spreadsheet that holds the user stories and the output tab; look up its ID from the sheet the user names |
OUTPUT_WORKSHEET_ID |
The tab that receives the generated test cases and scripts; look up its ID (gid) from the spreadsheet in SPREADSHEET_ID |
Also review the defaults with them: STORIES_WORKSHEET_ID ("0" is the first tab, and the trigger's worksheet), STORY_ID_COLUMN and STORY_DESCRIPTION_COLUMN (the stories columns, such as COL$A), OUTPUT_ID_COLUMN, OUTPUT_TEST_IDS_COLUMN, OUTPUT_SUMMARY_COLUMN and OUTPUT_SCRIPT_COLUMN (the output columns; the output tab needs headers in these), and CHATGPT_MODEL (gpt-3.5-turbo-instruct).
Confirm the user may send these stories to ChatGPT before turning the Zap on.
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/create-end-to-end-test-scripts-from-sheet-user-stories, replace each REPLACE_… value as this file says, then run npx zap-pack deploy create-end-to-end-test-scripts-from-sheet-user-stories, which signs the user in to Zapier when it gets there. Otherwise build with Zapier MCP, as the steps below say. No Zapier MCP tools? Read https://docs.zapier.com/mcp/get-started/quickstart.md and follow the page for the app you are running in to get the user connected, then continue with this build.
- Accounts: bind
chatgpt(the user's ChatGPT (OpenAI) connection, used for both prompts) andgoogle-sheets(the account that owns the spreadsheet, used for the stories trigger and the output tab) to the user's connections. Connect ChatGPT before the first run. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced by the user's answer.triggers/updated-row-only.tsandconnections/are settings, not code: set the workflow's trigger and connection bindings from them. Set the trigger'sspreadsheetandworksheettoSPREADSHEET_IDandSTORIES_WORKSHEET_ID. The trigger file names the app by its slug; for the trigger'sselected_api, callsearch_triggerswith that slug, find the row whosekeyis the trigger'sevent, and use<app_key>@<app_version>from it. - Build guide: load Zapier's build guide with
get_zapier_skill("zapier:build-workflows")and follow it to create, test and publish the workflow. - Fields: inspect each action's fields with the user's connections and sample the trigger before the first test run, and fix any key in
workflow.tsthat doesn't match.
Test it
Run this sample as a draft test run (run_workflow_draft) before publishing. Use a test row on the stories tab, not real data.
{
"COL$A": "US-101",
"COL$B": "As a shopper, I can add an item to my cart and see the updated total."
}
Confirm that the output tab gets one row for US-101, with Test IDs such as TC-001, a summary, and a script that begins with TypeScript code. Run it twice to check that the second run updates the same row rather than adding one. If run-status tools aren't available, check the result in Google Sheets directly. Then publish, confirm the trigger is active, and ask the user to delete the test rows; the agent doesn't delete them.
Notes
- Test IDs are read from
Test ID:lines, and names fromTest Case Name:lines. If the model does not follow that format, the run stops without writing anything. - The trigger fires on any update to a story row, so editing a row again re-generates its outputs.
- To route the outputs to a reviewer by email or a review column before the output row is final, or to post the scripts to a code storage endpoint or pull request system, add a step after the test script.
- Never commit a real spreadsheet ID or worksheet ID to a public repo.