elixir-lsp / vscode-elixir-ls

Elixir language support and debugger for VS Code, powered by ElixirLS.
https://marketplace.visualstudio.com/items?itemName=JakeBecker.elixir-ls
MIT License
545 stars 105 forks source link

Running wallaby `feature` tests in VS Code #396

Closed buildreactive closed 10 months ago

buildreactive commented 11 months ago

Discussed in https://github.com/elixir-wallaby/wallaby/discussions/717

Originally posted by **totaltrash** December 6, 2022 Anyone using vs code and know of a way to run wallaby features from the code editor? Not 100% sure, I might have inadvertently installed a testing extension (I recently went wild with extensions for docker and remote development, though there are no installed testing extensions listed for me), and I can now run ex unit tests by hitting the green arrow, but it's not offering the same for features: ![image](https://user-images.githubusercontent.com/637350/206048059-508eaeab-2c97-4f01-b7b9-d75463d4725f.png)

Additional details Same problem here. May be an issue with ElixirLS plugin, which provides support for "Test discovery, running and debugging via Test Explorer." Might also be that Wallaby isn't providing test hinting... I've no idea which is the case.

Unfortunately the plugin currently completely missed Wallaby feature tests – they just don't show up.

VSCode plugin details:

Note: Cross posted issue to Wallaby as I've no idea if this is a plugin issue, or a Wallaby issue. https://github.com/elixir-wallaby/wallaby/issues/754

lukaszsamson commented 11 months ago

I fail to see what is the problem

buildreactive commented 11 months ago

As I wrote above:

Unfortunately the plugin currently completely missed Wallaby feature tests – they just don't show up.

Phrasing it another way:

Wallaby tests are not detected by the ElixirLS plugin, and trying to execute them in VSCode does not work.

Here's a snapshot:

Screenshot 2023-12-06 at 17 33 19
lukaszsamson commented 11 months ago

Sorry I don't know that lib and your report was a bit chaotic. ElixirLS extracts test info from :ex_unit_tests in :on_module compile tracer https://github.com/elixir-lsp/elixir-ls/blob/724d1729436dbf503ba9be02e2158c340de6d68a/apps/language_server/lib/language_server/ex_unit_test_tracer.ex#L108. Maybe the test type filtering is too aggressive in https://github.com/elixir-lsp/elixir-ls/blob/724d1729436dbf503ba9be02e2158c340de6d68a/apps/language_server/lib/language_server/ex_unit_test_tracer.ex#L119

Feel free to create a PR fixing that