For the complete documentation index, see llms.txt. This page is also available as Markdown.

Add a custom Playwright configuration

Add a named Playwright configuration (e.g. Mobile) and run features under it.

Runs execute under a named configuration — Default unless told otherwise. Here's how to add a Mobile one.

1

Read the default as your reference

testvibe files get Configurations/Default.config.js

Your config should keep the same shape — it's a standard Playwright config module the sandbox loads as-is.

2

Write the new configuration

mobile.config.js
module.exports = {
  use: {
    browserName: 'chromium',
    viewport: { width: 390, height: 844 },
    isMobile: true,
    hasTouch: true,
  },
};
testvibe files put Configurations/Mobile.config.js --file ./mobile.config.js

The file name is the config name: Configurations/Mobile.config.jsMobile. (Writes outside Features/ or Configurations/ are rejected — see the allowlist.)

3

Verify and run

testvibe configs
testvibe run "Login Functionality" --config Mobile --wait

Over REST that's POST …/features/12/run with {"config": "Mobile"} — see run_feature.

Configurations apply per run — the same generated tests execute under any config, so one feature can be green on desktop and red on mobile. That's the point.

Last updated

Was this helpful?