reddit / emacs
is there something like Test Explorer UI but for Emacs?
shackra · 2022-06-08 14:49
Hi
A coworker noted that they enjoy [this feature in vscode](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-test-explorer), and I can understand the advantages it provides over scrolling the `*compile*` buffer and looking for errors.
**Test Explorer UI provides a user interface for visualizing the state and running unit tests.**
So far nothing popups on the web, something like this probably don't exist?
BettaGeorge · 2022-06-08 15:30
You might get more help if you describe what it is you are looking for. The description in the link tells me next to nothing.
shackra · 2022-06-08 15:55
post edited
fftw · 2022-06-08 16:50
They exist, e.g. https://asciinema.org/a/189880 for php etc. But usually this feature is language specific due to different test runners and structures. What language are you using?
shackra · 2022-06-08 16:54
Go
fftw · 2022-06-08 17:11
Alas I can't find anything like that for golang. Maybe it's time to create the new package? I can't see why it should be impossible for go
shackra · 2022-06-08 19:42
I was thinking the same, time for a new package
globalcandyamnesia · 2022-06-09 04:17
I think the test explorer ui in vscode is fantastic as well and it's a text-based user interface. I don't know of anything similar for Emacs but it seems like something that would be in the bailiwick of `lsp-ui`, if you wanted to add a feature request. Anyways, I'm sad to see this downvoted.
Aaronzinhoo · 2022-07-02 20:13
Have you had any progress on a project? I was thinking of making a similar package as well. I wanted to abstract the UI and manager for test runners. Sort of make it a plug and play system that can support any language.
If you are working on anything I would love to help out if possible.
shackra · 2022-07-02 21:15
I don't even know where to start 😂 but in all seriousness this is an opportunity for Emacs to grow. I think this feature should be a plug-in for lsp-ui at least
Aaronzinhoo · 2022-07-03 01:50
Me neither haha, but it sounds like a fun project.
I agree I think having it as an plug-in to lsp ui with a core module to handle the interface to add test runners and parsers. Sort of like how lsp is a single protocol that many language servers implement. The test runner interface will need to be implemented by each test runner package.
Aaronzinhoo · 2022-07-03 01:57
Trying to think of the minimal set of functions needed to implement this…. Basically a function to find the tests, function to run tests (with modifiable arts), a way to parse the test output so you can show them in a tabulated format. I think the code could mimic how treemacs does error lists!
Once you have a tabulated list of results in a buffer, we need a mode with a key map to perform actions on the list. Most notably goto!
shackra · 2022-07-03 05:58
I'll say we should couple whatever will be implemented with the [Test adapters from Test Explorer UI](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-test-explorer#test-adapters), that's how lsp-mode leverage LSP servers from vscode.
Aaronzinhoo · 2022-07-03 06:14
Yea especially since we are going to directly depend on them. No reason for unnecessary abstractions there.
I see test explorer broke down their tool between adapters and controllers. The different UI elements (modeline vs results buffer) are each their own controller that have access to the “adapters” or test runners. Seems reasonable overall to mimic.