<!-- Source: https://docs.squirro.com/en/latest/technical/kee/test.html -->
# Testing

You can test KEEs using the [test](cli.md#kee-cli-tool-reference-test) subcommand of the [KEE commandline tool](cli.md#kee-cli). The tests are run against test items called _fixtures_. You can create fixtures manually (using a JSON file) or retrieve actual test items from a Squirro project using the [get_fixture](cli.md#kee-cli-tool-reference-get-fixture) subcommand. You can specify the handling of the fixtures in the [testing](config.md#kee-config-testing) section of the KEE `config.json`.

## Fixtures

A fixture contains the `item` field and a `keywords` field (not to confuse with the `keywords` field of the `item` it self). The `keywords` field specifies the keywords and the respective values that are expected to be tagged by the KEE. Here is an example:

```javascript
{
    "item": {
        "id": "fixture-3",
        "title": "News Ticker",
        "body": "Shares of AMZN stock tumbled today on some very curious news.",
    },
    "keywords": {
        "company": [
            "Amazon Inc."
        ]
    }
}
```

You can manually create a fixture or use the [get_fixture](cli.md#kee-cli-tool-reference-get-fixture) subcommand:

```
squirro_kee -v get_fixture 'item-id1' 'item-id2'
```

The IDs of the items can be found in the URL when an item is selected in the _EXPLORE_ tab of a project:

[![](https://s3.amazonaws.com/download.squirro.net/docs/technical/kee/kee_retrieve_item_id.png)](https://s3.amazonaws.com/download.squirro.net/docs/technical/kee/kee_retrieve_item_id.png)

Provide the IDs of the items from which you want to create fixtures with the `get_fixture` command.

> **Note**
>
> You must provide a `cluster`, `token` and `project_id` in the `"squirro"` section of the `config.json` file (see [here](config.md#kee-config-squirro)) for this to work.

Fixtures are stored in the folder `fixtures/` in the KEE project or according to the configuration made in the [testing](config.md#kee-config-testing) section of the KEE `config.json`.

## Testing

Once the fixtures are created, the KEE is tested using the `test` subcommand:

```
squirro_kee -v test
```

See the [documentation](cli.md#kee-cli-tool-reference-test) or this [tutorial](how-cli.md#kee-how-cli) for more details.
