# test · Chromia Docs (concept)

> You can use the test command (chr test) to run the tests specified in the test key in the project settings file (chromia.yml).

Source: https://docs.chromia.com/build/cli/commands/test/

# test

Plain text

```
Usage: chr test [<options>]

  Run tests in working directory

Configuration Properties:
  -s, --settings=<settings>  Alternate path for project settings file

Options:
  -bc, --blockchain=<blockchain>
                                Run tests for specified blockchain(s).
  -m, --modules=<modules>       Run tests in this module(s) only. Must be the
                                part of the specified modules or its
                                submodules. Comma delimited, will default to
                                all modules either under each selected
                                blockchain or test
  --file=<path>                 Run tests in one file
  --tests=<>                    test method pattern
  --use-db / --no-db            If a session towards the configured database
                                should be established
  --test-report                 Generate JUnit XML test reports
  --test-report-dir=<path>      JUnit XML test reports directory (defaults to
                                "build/reports")
  --fail-on-error[=true|false]  Sets test execution to stop on error and
                                override any "failOnError" settings for tests
                                that are in the scope being executed
  -ts, --timestamp              Timestamp on logs
  --hide-lib-warnings           Hide library warnings in build output
  -h, --help                    Show this message and exit
```

You can use the test command (`chr test`) to run the tests specified in the `test` key in the
[project settings file](https://docs.chromia.com/build/configuration/project-config/) (`chromia.yml`).

* Runs all the tests under the test attribute in `./chromia.yml`:

Terminal

```
chr test
```

* Runs all the tests under the test attribute of a selected Project Settings file:

Terminal

```
chr test --settings <path/chromia.yml>
```

* Runs a specific test module:

Terminal

```
chr test --modules test.data_test
```

* Runs test under test attribute for a specific blockchain:

Terminal

```
chr test --blockchain <blockchain name>
```

* Runs all the tests based on the specified text filter:

Terminal

```
chr test --tests my_filter
```

[View this page on docs.chromia.com](https://docs.chromia.com/build/cli/commands/test/)Content mirrored from the live docs
