-
Notifications
You must be signed in to change notification settings - Fork 106
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
Test UI runs each test separately #306
Comments
You can run |
That's a nogo. You'd need to parse stdout and tests can pollute it. |
True. We've been also using JUnit formatter to interface ExUnit with Gitlab/Bitbucket CI systems (https://hexdocs.pm/junit_formatter/readme.html). That would probably be better, but I have no idea how to plug it into an existing project when running tests. Also, there's an alternative VSCode plugin for running tests - Elixir test explorer, but it seems it is using the |
I know and used JUnit formatter. The downside is it's not trivial to setup and it cannot stream results in realtime |
@lukaszsamson has any work done related to this? I'm looking for ways to contribute and the test runner is one of the areas that interest me.
What would be the most appropriate way to make this work? A custom formatter I believe, but in which format and what do you mean by "realtime" |
I haven’t done anything concrete yet. I have a custom mix task that returns exactly the same test files that mix test does. I plan to replace the typescript implementation with that. On the test runner side I can think of two ways. One is custom formatter that streams results in json to stdout and typescript parser. The second and IMO easier is changing the test runner to make it run tests in debug adapter with noDebug option and add an exunit formatter that emits results as DAP output events. I implemented noDebug in 0.17 and added support for intercepting custom DAP messages on the typescript side. |
From your comment, I understand that the challenge here is to include this custom formatter as a dependency, right? |
👋 Would it be possible, while we wait for a better solution, to just run all the tests in one go and report the result once all tests finish? I think in many cases that will be waaay faster than running each test individually. Especially on bigger projects where the start up time can take some seconds. |
That's an option but then we loose info which test failed. It's either all red or green |
Currently (1.14) elixir does not have any easy way of tracking test progress and getting test results programmatically. We can experiment with a custom formatter that outputs JSON or streams jstest compatible events to stdout
The text was updated successfully, but these errors were encountered: