Test-More / Test2-Harness

Alternative to Test::Harness
Other
23 stars 26 forks source link

Improve test status line #191

Closed exodist closed 3 years ago

exodist commented 4 years ago
( PASSED )   job 1  ...
Events seen: xxx (1:job.t ...)

The 'job 1' is colorized, but the 1:job.t is not. The latter should be colorized with a matching color.

I think the whole line should be updated:

[123/123 P:123 F:123] Events: 123456 (123:Foo.pm, 456:bar)

In order: [ Tests Completed so far / Total Tests

P: NUMBER OF PASSING TESTS SO FAR F: NUMBER OF FAILING TESTS SO FAR ] Events: Event Counter ( ID:FILENAME.t )

I might be nice if FILENAME.t was GREEN while passing and RED while failing, but I am not certain the necessary info is available to the renderer to determine that, though that is fixable.

exodist commented 3 years ago

Sick today, so dove in while board. I simplified things and experimented, here are my findings:

1) Adding colors to the jobs like 123:foo.pm is possible, but very distracting and overly complicated, it is hard to read. So I am not giving each file its job color. Also adding a job color makes the ...) at the end of overly-long status lines extremely complicated.

2) For the status on the left I went with a simple: [P-#|F-#|R-#|T-#] Pass, Fail, Running, and Todo. When color is enabled each of these is colored with Green, red, cyan, and yellow. When any number is 0 it is white instead of the designated color since it is not meaningful.

3) I did change the color of (123:foo ...) to cyan to match the 'running' color, it also helps it to stand apart from the event counter.