Class TerseTestFormatter

java.lang.Object
org.ek9lang.cli.TerseTestFormatter
All Implemented Interfaces:
TestResultFormatter

final class TerseTestFormatter extends Object implements TestResultFormatter
Terse test output formatter (-t0). Minimal output suitable for scripting and CI pass/fail checks.

Output format:

N tests: X passed, Y failed (A assert, B blackbox, C parameterized)

With verbose flag (-v), also lists each test result with type:

PASS [Assert] module::TestName
FAIL [BlackBox] module::OtherTest
PASS [Param:hello] module::ParamTest
3 tests: 2 passed, 1 failed (1 assert, 1 blackbox, 1 parameterized)
  • Constructor Details

    • TerseTestFormatter

      TerseTestFormatter(boolean verbose)
  • Method Details

    • reportDiscovery

      public void reportDiscovery(List<DiscoveredTest> tests, PrintStream out)
      Description copied from interface: TestResultFormatter
      Report the discovery of tests before execution begins.

      The discovery report should include:

      • Test type breakdown (assert-based vs blackbox vs parameterized)
      • Total test case count (including parameterized cases)
      • Group information if applicable
      Specified by:
      reportDiscovery in interface TestResultFormatter
      Parameters:
      tests - The discovered tests with metadata
      out - The output stream
    • reportExecutionStart

      public void reportExecutionStart(int testCount, PrintStream out)
      Description copied from interface: TestResultFormatter
      Report that test execution is starting. Some formatters may output a progress message here.
      Specified by:
      reportExecutionStart in interface TestResultFormatter
      Parameters:
      testCount - The number of tests to execute
      out - The output stream
    • reportResults

      public void reportResults(List<TestResult> results, PrintStream out)
      Description copied from interface: TestResultFormatter
      Report all test results after execution completes.
      Specified by:
      reportResults in interface TestResultFormatter
      Parameters:
      results - The test results
      out - The output stream