Fuzzy test finding tool: cargo-tst

Hi

I built a quick and dirty solution to a problem I was facing in large code bases. Namely running specific tests. I am curious if others find this useful.

cargo-tst is a tiny exstension to cargo which allows you to search for a test and then run it. The goal is to avoid having to match the name precisely with cargo test my_exact_test_name.

Let me know if you would find this useful. If there is interest I will polish and publish this to crates.io. :slight_smile:

The name is not great, I will try to come up with something better.

Sample recording

Project repo.

Usage

Installation

cargo install --git https://github.com/jmintb/cargo-tst.git

Usage

  1. cd into the project and type cargo tst search_term where search_term is the term used to match against test names.
  2. The five closest matching names will be presented and you can select which one to run.
  3. After selecting a test cargo tst can
    en run without a search term to rerun the same test. The last run test is project specific so there is no overlap when switching projects.

Note code review might not be the correct category. I am looking to gauge interest in using the project. Please don't look at the code it was written rather hastily this morning haha :sweat_smile:

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.