micro-test-plus 3.2.0
µTest++, a lightweight testing framework for embedded platforms
Loading...
Searching...
No Matches
Command line options

Verbosity

By default, the µTest++ reporter shows detailed results only for the failed test cases; successful test cases are shown as a single line with the total counts of passed/failed checks.

Example
test 1
Start 1: minimal-test
1: Test command: /Users/ilg/MyProjects/micro-os-plus.github/xPacks/micro-test-plus-xpack.git/tests/build/native-cmake-sys-release/platform-bin/minimal-test "one" "two"
1: Working Directory: /Users/ilg/MyProjects/micro-os-plus.github/xPacks/micro-test-plus-xpack.git/tests/build/native-cmake-sys-release/platform-bin
1: Test timeout computed to be: 10000000
1: Built with clang Apple LLVM 15.0.0 (clang-1500.0.40.1), with exceptions.
1:
1: • Minimal - test suite started
1:
1: ✓ Check various conditions - test case passed (2 checks)
1:
1: ✓ Minimal - test suite passed (2 checks in 1 test case)
1/12 Test #1: minimal-test ..................... Passed 0.00 sec

To control the verbosity, one of the following command line options can be used:

Note
The source code of the test is in tests/src/minimal-test.cpp.

Verbose mode

When in verbose mode, the µTest++ reporter shows all expectations, regardless of the result.

Example
test 2
Start 2: minimal-test --verbose
2: Test command: /Users/ilg/MyProjects/micro-os-plus.github/xPacks/micro-test-plus-xpack.git/tests/build/native-cmake-sys-release/platform-bin/minimal-test "one" "two" "--verbose"
2: Working Directory: /Users/ilg/MyProjects/micro-os-plus.github/xPacks/micro-test-plus-xpack.git/tests/build/native-cmake-sys-release/platform-bin
2: Test timeout computed to be: 10000000
2: Built with clang Apple LLVM 15.0.0 (clang-1500.0.40.1), with exceptions.
2:
2: • Minimal - test suite started
2:
2: • Check various conditions - test case started
2: ✓ answer is 42
2: ✓ condition is true
2: ✓ Check various conditions - test case passed (2 checks)
2:
2: ✓ Minimal - test suite passed (2 checks in 1 test case)
2/12 Test #2: minimal-test --verbose ........... Passed 0.00 sec

Quiet mode

When in quiet mode, the µTest++ reporter shows only the test suite totals.

Example
test 3
Start 3: minimal-test --quiet
3: Test command: /Users/ilg/MyProjects/micro-os-plus.github/xPacks/micro-test-plus-xpack.git/tests/build/native-cmake-sys-release/platform-bin/minimal-test "one" "two" "--quiet"
3: Working Directory: /Users/ilg/MyProjects/micro-os-plus.github/xPacks/micro-test-plus-xpack.git/tests/build/native-cmake-sys-release/platform-bin
3: Test timeout computed to be: 10000000
3:
3: ✓ Minimal - test suite passed (2 checks in 1 test case)
3/12 Test #3: minimal-test --quiet ............. Passed 0.00 sec

Silent mode

When in silent mode, the µTest++ reporter suppresses all output and the framework only returns the exit code.

Example
test 4
Start 4: minimal-test --silent
4: Test command: /Users/ilg/MyProjects/micro-os-plus.github/xPacks/micro-test-plus-xpack.git/tests/build/native-cmake-sys-release/platform-bin/minimal-test "one" "two" "--silent"
4: Working Directory: /Users/ilg/MyProjects/micro-os-plus.github/xPacks/micro-test-plus-xpack.git/tests/build/native-cmake-sys-release/platform-bin
4: Test timeout computed to be: 10000000
4:
4/12 Test #4: minimal-test --silent ............ Passed 0.00 sec