Skip to content

Improve test run output #139

@cgay

Description

@cgay

I'd like to see several improvements to Testworks output:

  • An option to display no progress output except for failing tests. --progress failures I suppose. i.e., don't display pass, not implemented, expected to fail.
  • It should be rare that tests do output to the console. When they do it's generally for debugging. (threads-test-suite stands out as doing a lot of essentially meaningless output.) All such debug output should be via test-output:testworks and should by default go to test-temp-directory()/test-name.log and there can be an option to also send it to the console. --test-output=all, for example...not sure of name.
  • Display test run time as a number of microseconds, or heuristically ms, usec, ns. My time library already does this so perhaps wait and use that. Seconds as the unit is just too big these days.
  • Always display the final summary output. Specifically, with the options that are passed to make check (--report json --report-file foo.json) I still want the final count of passing/failing tests to be shown on the terminal.
  • No need to display passing/failing suites. I've never found this remotely useful.
  • In the summary output, display the counts for tests last, after checks, because that last line should have the info I really care about.
  • Don't display "0 benchmarks". (This might might already be the case?) Our plan is to run benchmarks as separate libraries.
  • Possibly: note which tests are new after each --load so they can be associated with their .so file and we can execute them in that same order and display the .so filename before any progress output for that set of tests. (The output from make check is currently pretty random and hard to know what tests belong to what library.)
  • Can probably elide "Running test " before each test in the progress output. Just print the test name there.
  • Can greatly improve output for test-equal failures:
    test-encode/decode-varint failed
        encode-varint-bytes(i) = bytes: [{stretchy vector 128, 128, 128, 128, 248, 255, 255, 255, 255, 127} and {stretchy vector 3} are not =.  sizes differ (10 and 1), element 0 is the first non-matching element]
          FAILED in 0.002164s and 58KiB
    
    should become something like this
    test-encode/decode-varint: values differ starting at element 0
        encode-varint-bytes(i): size=10 {stretchy vector 128, 128, 128, 128, 248, 255, 255, 255, 255, 127}
        bytes:                  size=1 {stretchy vector 3}
    

Those are my thoughts. We'll see how it develops.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions