Skip to content

cla prove - Run internal testing

cla prove: runs system tests and checks their results.

This command executes all test files located in the core test directory and displays the results on screen.

Each test case starts with:

[start] <test case name>

and ends with:

[end] <test case name> [<duration_of_the_test>]

In case of error, the output shows the error message in red.

This command accepts the following options:

  • <directory_or_path> - Passed as an argument to the command, executes only the core tests defined under …/t/.
  • --features - Executes tests for all features.
  • --plugins - Executes tests for all plugins.
  • --feature <feature_name> - Executes tests for the feature .
  • --plugin <plugin_name> - Executes tests for the plugin .
  • --all - Executes all features, plugins and core tests.

Deeper tests

Some tests are too slow to run on every push and only run when an environment variable asks for them:

  • CLARIVE_TEST_HCL=1 - the deeper HCL tests: edge cases of the export and import commands, their output wording, and the sweeps that check the HCL tables against every registered rule operation. Set it when changing anything under lib/Clarive/HCL/, the export, import, diff, fmt or rule-check commands, or the rule operations, forms and CI classes HCL encodes. A run without it says so on every test file that left something out: deeper hcl tests omitted due to env var CLARIVE_TEST_HCL, ...
  • CLARIVE_TEST_PSGI=1, CLARIVE_TEST_MIGRA=1, CLARIVE_TEST_PERFORMANCE=1, CLARIVE_TEST_JS=1 - the PSGI server, migration, performance and GraphQL tests.
CLARIVE_TEST_HCL=1 cla prove t/clarive/hcl t/clarive/cmd/hcl_export.t