﻿---
title: Skip tests in Scout
description: There are multiple ways to ensure a Scout test or test suite does not run at all, or runs only in certain environments. Scout uses Playwright, which provides...
url: https://www.elastic.co/elastic/docs-builder/docs/3016/extend/kibana/scout/skip-tests
products:
  - Kibana
---

# Skip tests in Scout
There are multiple ways to ensure a Scout test or test suite does not run at all, or runs only in certain environments.
<tip>
  Best practices when skipping tests:
  - Skipping is usually temporary—re-enable as soon as possible.
  - Create a tracking issue in the Kibana repo (label: `skipped-test`) and link it in a comment next to the skip.
  - AppEx QA maintains internal documentation (for Elasticians only) on [tracking skipped tests](https://docs.elastic.dev/appex-qa/track-skipped-tests).
</tip>


## Skip tests in all test runs

Scout uses Playwright, which provides `test.skip()` and `test.describe.skip()` to skip tests or suites in **all** environments.
If you prefer to control which environments your tests run in, use [deployment tags](https://www.elastic.co/elastic/docs-builder/docs/3016/extend/kibana/scout/deployment-tags) instead.

### Skip a test suite

```ts
import { test, tags } from '@kbn/scout';

// Add a comment to explain why this suite is skipped
test.describe.skip('test suite', { tag: tags.stateful.classic }, () => {
  test('test', async ({ page }) => {
    // this test will be skipped
  });
});
```


### Skip a single test

```ts
import { test, tags } from '@kbn/scout';

test.describe('test suite', { tag: tags.stateful.classic }, () => {
  // Add a comment to explain why this test is skipped
  test.skip('first test', async ({ page }) => {
    // this test will be skipped
  });

  test('second test', async ({ page }) => {
    // this test will run
  });
});
```


### Using `test.fixme()`

Playwright also provides `test.fixme()` as an alternative to `test.skip()`. It behaves the same way but semantically indicates the test is broken and needs to be fixed:
```ts
import { test, tags } from '@kbn/scout';

test.describe('test suite', { tag: tags.stateful.classic }, () => {
  // Add a comment to explain what needs to be fixed
  test.fixme('broken test', async ({ page }) => {
    // this test will be skipped and marked as "fixme"
  });
});
```


## Skip tests by location, architecture, or domain

Instead of skipping entirely, control which environments suites run in using deployment tags (`@{location}-{arch}-{domain}`).
For example, to run only on stateful classic environments:
```ts
import { test, tags } from '@kbn/scout';

test.describe('Stateful classic feature', { tag: tags.stateful.classic }, () => {
  test('my test', async ({ page }) => {
    // this test only runs in stateful classic environments
  });
});
```

See [Deployment tags](https://www.elastic.co/elastic/docs-builder/docs/3016/extend/kibana/scout/deployment-tags) for shortcuts and patterns.