Controlling test execution via the command line
The fcfTest library provides a flexible system for test filtering and logging configuration using command-line arguments. This allows you to run only the necessary test groups, exclude problematic areas, or change the output verbosity without recompiling the code.
The
--test-run— forces the execution of selected tests.--test-list— displays a list of all registered tests in the hierarchy (Part -> Group -> Test).--test-help— displays help information regarding available parameters.
Filtering works on the principle of inclusion or exclusion. Parameters can be used multiple times to combine conditions.
| Parameter | Description |
|---|---|
--test-part NAME |
Run only tests belonging to the specified part. |
--test-group NAME |
Run only tests belonging to the specified group. |
--test-test NAME |
Run only a specific test by its name. |
--test-ignore-part NAME |
Exclude the specified part from execution. |
--test-ignore-group NAME |
Exclude the specified group from execution. |
--test-ignore-test NAME |
Exclude a specific test from execution. |
The --test-log-level LEVEL parameter sets the logger's sensitivity threshold. Messages with a level lower than the specified one will be ignored.
off — logging is disabled.ftl — Fatal (critical errors).err — Error (errors).wrn — Warning (warnings).att — Attention (notices).log — Log (standard level, default).inf — Info (information).dbg — Debug (debugging).trc — Trace (tracing).all — All levels.def — Uses the application's default logging level (which islog by default).
1. Running a specific test group with extended logging:
2. Running all tests except for the "Integration" part and the "Legacy" group:
3. Viewing the list of all available tests:
4. Running one specific test:
VPSDime is an industry leading VPS hosting company that provides virtualized server services with high performance, availability and friendly support.