Reuse a login session
Log in once, store the session, and pass it into other Flows with DoesQA Run.
Last updated
Log in once, store the session, and pass it into other Flows with DoesQA Run.
Logging in on every Test Case slows a suite and can trip rate limits on the application. Log in once in a parent Flow, store the session data, then pass it into other Flows so they start already signed in.
Use the Flow Builder for this walkthrough.
To reuse the same login steps in many Flows without sharing a live session, use a Step Group instead.
A login URL and credentials as Values
At least one child Flow that should start signed in (create it before the parent calls it)
The cookie or storage key your application uses after login
Each child Run gets a fresh browser. It must apply the session data the parent will pass in.
Start with Open. Point it at a page in your application.
Start with Open. Point it at your login URL.
Add the matching Store step:
Set Value Store Key to a clear name, such as cookieValue. That key holds the data for this Run so DoesQA Run can pass it on.
Add DoesQA Run from Express.
Set a Run Label.
Choose Flow Selection: pick the child Flows, a Run Recipe, or tag filters.
In Values, map the stored key into the name the child expects:
{{cookieValue}} pulls the parent’s stored key. The child then reads $auth_token in its Set step.
Pro tip: Use Await & Match Results on DoesQA Run when the parent should fail if a child Run fails. Use Trigger Only when the parent only needs to start the children.
A child Run cannot start another DoesQA Run. Keep session handoff to one parent level.
Last updated
{
"auth_token": "{{cookieValue}}"
}