Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colourful output for human resultformat #208

Open
lukecotter opened this issue Jun 29, 2021 · 0 comments
Open

Colourful output for human resultformat #208

lukecotter opened this issue Jun 29, 2021 · 0 comments

Comments

@lukecotter
Copy link

lukecotter commented Jun 29, 2021

Is your feature request related to a problem? Please describe.
I want the human output to be easier to find the failing tests so they can be fixed.
Right now that involves scrolling a mixed list of passing and failing tests in the output.
This can be hard to do if the list is long or there is already other output in the terminal.

It can also be difficult to spot which tests have a fail status when there is a long list of tests, I often resort to searching the terminal output for "fail" but this matches tests names with fail in them.
It can be especially difficult if you use a narrow terminal and the text has wrapped or long test names caused the outcome column to be pushed far across.

Summary section is output first which means a lot of scrolling back up the terminal output to find out if the long list of tests has any failing ones you need to worry about.

Describe the solution you'd like
Test Results

  • Pass tests outcomes shown as a green pass badge.
  • Fail tests outcome shown as a red pass badge.
  • Stack trace shown below the test name, in the same column.
    Easier to follow + parse and takes up less width in the terminal output.
  • Coverage shown in green if 75 or over, red otherwise

Summary

  • Summary moved to bottom of output with new Failed tests section below that.
    Allows user to determine if errors exists without scrolling to top for a long time. Useful if terminal has lots of previous output.
  • passed, failed + skipped figures show in green, red + yellow.
  • passed, failed + skipped values show as a number with the rate in brackets.
  • Coverage shown in green if 75 or over, red otherwise

Failed Tests
-New section in the Human Report which shows only the failed test at the bottom of the terminal output in the same format as Test Results section (if any exist).

I have already implemented the above feature in the related pull request.
It also makes two other changes

  • handle spaces between tests
    e.g
    --classnames=" ATest , SecondTest " is valid and not just
    --classnames="ATest,SecondTest"
  • column after multi row cell now aligned at top e.g
col 1               |  col2
------------  |  ---------
Some multi   | more text
row text        |

instead of

col 1               |  col2
------------  |  ---------
Some multi   | 
row text        | more text

Additional context
Here is the output that will now be displayed with the changes in the related PR.

Screenshot 2021-06-29 at 09 46 16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant