Skip to content

testing: implement initial UI for per-test coverage - #212403

Merged
Connor Peet (connor4312) merged 5 commits into
mainfrom
connor4312/212196-3
May 10, 2024
Merged

Connor Peet (connor4312) merged 5 commits into
mainfrom
connor4312/212196-3

Conversation

@connor4312

@connor4312 Connor Peet (connor4312) commented May 10, 2024 •

Copy link
Copy Markdown
Member

Note: this builds on #212325 which has been approved; only contents of the last commit need review.

  • There's now a toolbar on top of the file with test info for that file.
    This was inspired by some coverage extension I saw at one point:
    previously this was only shown in the explorer/test coverage view
    versus being contextual in the file
    • I really like the concept and utility of the toolbar, but it could
      certainly use a bit of polish. Maybe have it be sticky like
      breadcrumbs and styled more after notebooks'
  • I relocated the "toggle inline coverage" action from being the annoying
    popup on the line numbers into the toolbar
  • When per-test coverage is available, that's shown in the toolbar as
    well. Clicking on it allows you to filter to see only coverage
    generated by that test case. Per-test coverage filtering is global,
    and also applies in the Test Coverage view.
    - There's a pseudo-select box for filtering in the Test Coverage view
    (native select boxes are painful with a large number of items)
    - I think it's useful to show the code run by a test in the coverage
    view, but the numbers per-file are a little bogus, at least for the
    selfhost test provider, since I only show #'s for functions run by
    that test. Maybe we just don't show percentages in this mode.

https://memes.peet.io/img/24-05-1941df72-bd93-42f9-9363-32fc3ea69e7d.mp4

Refs #212196

- There's now a toolbar on top of the file with test info for that file.
	This was inspired by some coverage extension I saw at one point:
	previously this was only shown in the explorer/test coverage view
	versus being contextual in the file
	- I really like the concept and utility of the toolbar, but it could
	  certainly use a bit of polish. Maybe have it be sticky like
	  breadcrumbs and styled more after notebooks'
- I relocated the "toggle inline coverage" action from being the annoying
	popup on the line numbers into the toolbar
- When per-test coverage is available, that's shown in the toolbar as
	well. Clicking on it allows you to filter to see only coverage
	generated by that test case. Per-test coverage filtering is global,
	and also applies in the Test Coverage view.
		- There's a pseudo-select box for filtering in the Test Coverage view
		  (native select boxes are painful with a large number of items)
		- I think it's useful to show the code run by a test in the coverage
		  view, but the numbers per-file are a little bogus, at least for the
		  selfhost test provider, since I only show #'s for functions run by
		  that test. Maybe we just don't show percentages in this mode.

https://memes.peet.io/img/24-05-1941df72-bd93-42f9-9363-32fc3ea69e7d.mp4
@connor4312
Connor Peet (connor4312) deleted the connor4312/212196-3 branch May 10, 2024 00:42
@microsoft Microsoft (microsoft) locked and limited conversation to collaborators Jun 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants