Custom test environments
4 min readLast updated 2026-04-25New
Define custom environments with specific cookies, headers, geolocation, and viewport settings.
Custom environments let you simulate specific user conditions — logged-in state, geo-location, device viewport, or custom headers.
Example: EU user simulation
{
name: 'eu-logged-in',
baseURL: 'https://example.com',
geolocation: { latitude: 52.52, longitude: 13.40 },
timezoneId: 'Europe/Berlin',
storageState: 'auth/eu-user.json',
extraHTTPHeaders: {
'X-Test-Region': 'eu-west',
},
}javascriptViewport presets
Use built-in presets: desktop, tablet, mobile, or define custom { width, height } values.
Was this article helpful?
Still have questions?
Our support team is here to help. Reach out directly or search the docs.