How to run a single Clojure test from the terminal using Leiningen

Estimated 1 minute read · Monday, 8 August 2022

You may want to target and run a specific test or set of tests when testing your code so that you don't keep executing the entire suite each time you make changes to specific tests. This creates a faster feedback loop for you to build and fix code. Usually tests are executed with Leiningen using lein test. You can extend this command to meet the necessary objectives.

Copy
lein test :only my.namespace/my-test

Thanks to this question and answer on Stack Overflow. ❤

We use essential cookies to make our site work. With your consent, we may also use non-essential cookies to improve user experience and analyze website traffic. By clicking 'Accept', you agree to our website's cookie use as described in our Privacy Policy.