Skip to main content


Usage: chr test [OPTIONS]

Run tests in working directory

╭─ Configuration Properties ───────────────────────────────────────────────────────────────────────────────────────────╮
│ -s, --settings=SETTINGS Alternate path for project settings file
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ -bc, --blockchain=BLOCKCHAIN Select which blockchain(s) to test
│ -m, --modules=MODULES Select which modules to test, will default to tests in settings file (Comma separated)
│ --sql-log Log sql expressions │
│ --tests=TEXT 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")
│ -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 config file (chromia.yml).

  • Runs all the tests under the test attribute if the current working directory is where the chromia.yml file exists:
chr test
  • Runs all the tests under the test attribute of a selected Project Settings file:
chr test --settings chromia.yml
  • Runs a specific test module:
chr test --settings chromia.yml --modules test.data_test
  • Runs test under test attribute for a specific blockchain:
chr test --settings chromia.yml --blockchain <blockchain name>
  • Runs all the tests based on the specified text filter:
chr test --tests my_filter