mfridman / tparse

CLI tool for summarizing go test output. Pipe friendly. CI/CD friendly.
MIT License
948 stars 22 forks source link

Make smallscreen work for test table as well #91

Closed jak103 closed 1 year ago

jak103 commented 1 year ago

Awesome tool! Thank you so much!

There is an option -smallscreen that will stack the path for the package in the summary table. I like this because I prefer the more dense table you get without this option.

However, the test table always stacks the package path.

What do you think about making the default behavior on the test table be the more dense version and then the -smallscreen can make both tables stack the path? It would make the two tables more consistent.

mfridman commented 1 year ago

What version are you using? Iirc in https://github.com/mfridman/tparse/pull/81 we improved package shortening

If this isn't what you were thinking, can you give me an example of what you're seeing and what the desired output would be?

jak103 commented 1 year ago

The test summary looks like this: Screenshot 2023-03-18 at 12 48 06 PM The package summary looks like this: Screenshot 2023-03-18 at 12 51 04 PM

I'd like the test summary to not use the smallscreen format, and instead give the package on one line, like the package summary.

Reading through #81, it looks like they should have just made the -smallscreen work better with the test summary. Making it match the behavior that it does on the package summary.

mfridman commented 1 year ago

I just re-read this and it finally made sense, sorry for the delay.

To use the example you shared, the pkg/devsite/config should be one line instead of split across multiple lines like the Test names in the Test Summary Table.

~@c2h5oh I'm curious when you implemented #81 .. what was the rationale for splitting the package name across multiple lines like the test names.~

~Do you see an issue if we kept the shortening but concatenated the package name into one line?~

~It'll make the table ~slightly wider, but maybe would be okay? Granted some folks have really long package names .. so this may be the main reason.~

What do you think about making the default behavior on the test table be the more dense version and then the -smallscreen can make both tables stack the path? It would make the two tables more consistent.

Yes, let's do this!

mfridman commented 1 year ago

Put up https://github.com/mfridman/tparse/pull/96 to address this, @jak103 was this what you had in mind? Added some screenshots as an example.