Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Support custom test commands

Open
#3,838 6 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
ruby, vscode
Domain
testing, tooling

Research direction

Start in lib/ruby_lsp/listeners/code_lens.rb at the Code Lens command creation around lines 210-225, then trace how extension configuration is read. Verify that a configured test command such as bin/rails test is preferred over the generated base command when the Test Explorer runs tests.

Written by the indexing model from the issue text.

Description

enhancement pinned
I have checked that this feature is not already implemented
  • This feature does not exist
Use case

The current LSP attempts to automatically determine the command to run tests using the Test Explorer, however this doesn't work for all scenarios. For example, Rails applications use bin/rails test out of the box.

The current commands generated by the LSP do not work for all codebases, so allowing developers to customize the test command would make the Test Explorer functionality more useful for all codebases.

Description

I would like to be able to customize the command used for the test explorer to run tests, for example bin/rails test

Implementation

In the Code Lens command creation, prefer to read from the extension configuration instead of the base command: https://github.com/Shopify/ruby-lsp/blob/main/lib/ruby_lsp/listeners/code_lens.rb#L210-L225

Dominant language
Ruby
Stars
2k
Forks
281
Avg merge
1h 47m
Merged PRs (30d)
8

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Shopify/ruby-lsp

All issues in Shopify/ruby-lsp

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.