dkelosky / jest-stare

Jest HTML Reporter and Results Processor

Home Page:https://dkelosky.github.io/jest-stare/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Collapsible boxes in HTML report

GregorSondermeier opened this issue · comments

While doing research for unit test HTML reporters I stumbled across jest-stare and I think it looks just fantastic. I'm thinking about introducing jest-stare to my team and including it in our angular/typescript project.

Our project's code coverage is 100%. To achieve this, we have a lot of tests per test suite. This of course makes every report very long.

Here is an example screenshot of a report generated by jest-stare:
jest-stare

As you can see, the scroll bar is very long. I assume it is rather hard to really read through this report and identify the relevant information in this condition.

Request

I'm wondering if it would be possible to enable collapsing/expanding for the various boxes that group the test suites. Maybe together with an collapse all / expand all option.

Hi - thanks for the feedback and request. It shouldn't be too hard (hopefully 😄) to make that enhancement.

In the failure case, you can hide away passing tests and quickly see failing information. Can you describe what you are looking to review when all tests pass? Is it to help verify tests were written correctly?

#58 is something that I might need to revisit if you get near 1k tests in a report otherwise the initial load can take a couple seconds.

Thanks,

Can you describe what you are looking to review when all tests pass? Is it to help verify tests were written correctly?

Not sure if I understand this question correctly. We have a coverage report on the one hand, which confirms we have a high coverate. But to be honest, achieving a high coverage is not that hard, the difficult part is to test multiple times with different values, respecting edge cases, exceptions and what not.

A unit test report like the one from jest-stare, which doesn't focus on coverage, but instead on "what are the actual test cases" is worth a lot, especially for reporting concerns. It really complements a coverage report, because it proves and documents the various test cases we test for.

So this is the information that I'm looking for and that I'd like to be able to present when all tests pass.

I think when everything is collapsed the file paths would the first relevant information and they would provide a good starting point to navigate further down.

Do you need more input?


btw. I'd be happy to contribute if the time allows it, this being open source and all :)

I think this clears things up, thank you.

In my use cases, I never look at the report unless there is a test failure 😄, but now I understand from your frame of reference.

Any contribution or progress on this would definitely be welcome! Otherwise, I probably won't get started on this until 1/11 (my weekend).

Take care,

I started some of this work on the 'collapse' branch. I have a bug to work out where if you collapse a section and then click the pass/fail/pending buttons up top, you can no longer collapse.

Sorry for the slow progress on this, I hope to get to it soon. There are a few other priorities right now

Sorry this is still on my radar, but I've been extremely busy with several other projects and the continues to be pushed back...

Stale issue message

I published @fijijavis as v2 since it's technically a break in the old UI. I like it a lot though - please check it out!

(and @fijijavis please make more awesome UI enhancements 😄 )

@dkelosky Thanks for the quick response! I’m pulling it into my projects now😁