# Add a custom Playwright configuration

URL: https://docs.testvibe.com/testvibe-api/guides/custom-playwright-config

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

```bash
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.

- ### Write the new configuration

mobile.config.js

```javascript
module.exports = {
  use: {
    browserName: 'chromium',
    viewport: { width: 390, height: 844 },
    isMobile: true,
    hasTouch: true,
  },
};
```

```bash
testvibe files put Configurations/Mobile.config.js --file ./mobile.config.js
```

The file name is the config name: `Configurations/Mobile.config.js` → `Mobile` . (Writes outside `Features/` or `Configurations/` are rejected — see [the allowlist](/testvibe-api/concepts/files-and-configurations) .)

- ### Verify and run

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

Over REST that's `POST …/features/12/run` with `{"config": "Mobile"}` — see [`run_feature`](/testvibe-api/reference/runs/run_feature) .
2. ### Write the new configuration

mobile.config.js

```javascript
module.exports = {
  use: {
    browserName: 'chromium',
    viewport: { width: 390, height: 844 },
    isMobile: true,
    hasTouch: true,
  },
};
```

```bash
testvibe files put Configurations/Mobile.config.js --file ./mobile.config.js
```

The file name is the config name: `Configurations/Mobile.config.js` → `Mobile` . (Writes outside `Features/` or `Configurations/` are rejected — see [the allowlist](/testvibe-api/concepts/files-and-configurations) .)

- ### Verify and run

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

Over REST that's `POST …/features/12/run` with `{"config": "Mobile"}` — see [`run_feature`](/testvibe-api/reference/runs/run_feature) .
3. ### Verify and run

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

Over REST that's `POST …/features/12/run` with `{"config": "Mobile"}` — see [`run_feature`](/testvibe-api/reference/runs/run_feature) .
info
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.
