obsidienne

obsidienne

Hi,

Does anybody work on a test explorer ui for elixir ? Something like Rust Test Explorer ?
Thanks

Showing Posts 1 to 7

hauleth

hauleth

Do you have screenshot how does that tool look like? Or link to it?

obsidienne

obsidienne OP

Sure, some links

Here the exemple for rust, taken from vscode-rust-test-adapter and

and Test Explorer UI - Visual Studio Marketplace

tcoopman

tcoopman

I’ve been looking for this as well. I don’t think it exists and I’ve looked at some existing adapters and it’s too much work to do it quickly, but I don’t think it would be too hard.
For example looking at GitHub - connorshea/vscode-ruby-test-adapter: A Ruby test adapter extension for the VS Code Test Explorer · GitHub gives you some idea of what needs to happen

To be clear, the reason that I would like this, is not that mix test is not sufficient, but this for me really is a case where a gui can be faster to show you all the failures,…

cj5

cj5

While it would be nice to have a UI, for those who are looking for an integrated testing environment, it is possible to create tasks to run the tests inside VSCode console.

Here is how I do it. Create tasks.json inside .vscode directory

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Run test current file",
      "type": "shell",
      "command": "mix",
      "args": [
        "test",
        "${relativeFile}"
      ],
      "presentation": {
        "echo": true,
        "reveal": "always",
        "focus": true,
        "panel": "new"
      }
    },
    {
      "label": "Run test current line",
      "type": "shell",
      "command": "mix",
      "args": [
        "test",
        "${relativeFile}:${lineNumber}"
      ],
      "presentation": {
        "echo": true,
        "reveal": "always",
        "focus": true,
        "panel": "new"
      }
    },
    {
      "label": "Run all tests",
      "type": "shell",
      "command": "mix",
      "args": [
        "test"
      ],
      "presentation": {
        "echo": true,
        "reveal": "always",
        "focus": true,
        "panel": "new"
      }
    },
    {
      "label": "Lint",
      "type": "shell",
      "command": "mix credo",
      "presentation": {
        "echo": true,
        "reveal": "always",
        "focus": true,
        "panel": "new"
      }
    }
  ]
}

And then create keybindings (by using a keybindings.json file inside .vscode or configure globally inside VSCode).

[
  {
    "key": "ctrl+i",
    "command": "workbench.action.tasks.runTask",
    "args": "Run test current file"
  },
  {
    "key": "ctrl+u",
    "command": "workbench.action.tasks.runTask",
    "args": "Run test current line"
  },
  {
    "key": "ctrl+t",
    "command": "workbench.action.tasks.runTask",
    "args": "Run all tests"
  },
  {
    "key": "ctrl+l",
    "command": "workbench.action.tasks.runTask",
    "args": "Lint"
  }
]
Sebb

Sebb

The intellij plugin has a tests-GUI.

https://github.com/KronicDeth/intellij-elixir

There is a screenshot in the readme.

adamzapasnik

adamzapasnik

I released it a few weeks ago Elixir Test Explorer - Visual Studio Marketplace
Unfortunately, it doesn’t handle umbrella projects yet, but I’m working on that.

adamzapasnik

adamzapasnik

New version v0.5.0 has been released with support for Elixir 1.14 :slight_smile:

— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 91898 914
New
AstonJ
The obligatory hello world thread! Who are you and where are you from? :stuck_out_tongue:
4616 55835 594
New
byu
@chrismccord : I just saw the Extract AGENTS.md from Phoenix.new into phx.new generator commit to the phoenix project. My initial shotgu...
New
arcanemachine
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
matt-savvy
Is there a word for the ~> symbol used in Version strings? Do you also just call it a Squiggle Arrow™ ?!
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews