Data

Spreadsheets as a first-class test data source

Connect a Google account once per team. Pick spreadsheets, give them aliases, and reference rows directly in your generated Playwright code. Tokens auto-refresh; headers and rows are cached so test runs do not hammer the Sheets API.

Try Lastest free →Read the docs

What you get

Three things this integration does - and what they mean for your team.

01

Per-team OAuth

One connection per team, not per user. Tokens are stored encrypted with automatic refresh - no expired-token midnight pages.

02

Aliases, tabs, and ranges

Configure each data source with an alias, the spreadsheet, the tab, the header row, and an optional fixed range (A1:D50). Tests reference rows as data["users"][i].email.

03

Cached for replay speed

Headers and rows are cached at the Lastest server. Replays read from the cache, not Sheets - so suite runtime stays predictable and Sheets API quotas are respected.

How it works

Data flow, configuration, and result routing - visualised.

Diagram 1 · OAuth + token refresh

How Lastest stays connected to Google

Team adminone-time authGoogle OAuthdrive.readonlyGoogle Sheets APILastestencrypted token + refreshttlauthorizeaccess + refreshsilent refresh
Team admin authorizes once. Lastest stores access + refresh tokens encrypted, and refreshes silently before expiry. Revoke at myaccount.google.com → Security → Third-party access.

Diagram 2 · Data source configuration

Spreadsheet → alias → test code

SpreadsheetMyTeam · Usersalias: userstab: Sheet1header row: 1range: A1:D50Lastest cacheheaders + rowsTestsdata['users']configread by alias
Configure a data source with alias, spreadsheet, tab, header row, and optional range. Lastest fetches and caches headers + rows. Tests reference data by alias.

Diagram 3 · Cached read at test time

Where the data actually comes from at run time

Test runfor-each rowCachettl 60sCache hit≤ 5msCache misslive APISheets APIquota safehitmissrefill
On test run, Lastest reads from its cache (TTL configurable). Cache miss → live Sheets API call → cache update. No N test = N spreadsheet calls.

Configure

Drop-in config for Google Sheets

Lastest .env for the Google Sheets OAuth flow

GOOGLE_CLIENT_ID=your-client-id
GOOGLE_CLIENT_SECRET=your-client-secret
GOOGLE_SHEETS_REDIRECT_URI=https://your-lastest/api/auth/callback/google-sheets

Frequently asked questions about Lastest + Google Sheets

How are tokens refreshed?
Automatically. Lastest stores the refresh token encrypted and exchanges it for a fresh access token before expiry.
Can different teams connect different Google accounts?
Yes - connections are per-team, so one Lastest instance can host many teams each with their own Sheets data.
Does Lastest support service accounts?
Today the integration uses OAuth. Service-account flow is on the roadmap; for now, share the relevant sheets with the OAuth user.
How fresh is the data at run time?
As fresh as the cache TTL allows (default 60 seconds). Force-refresh from the data source UI when you change a sheet and want the next run to pick it up immediately.
What scopes does Lastest request?
drive.readonly and spreadsheets.readonly. Lastest never writes back to your Drive or Sheets.