How can I list all tests using `mix test`
Asked Answered
H

1

6

Is there a command-line invocation I can used in conjunction with mix that will output all test names without running the tests?

Humane answered 28/9, 2016 at 16:9 Comment(3)
I think there is not, such command, but you can list all test names with grep -h "test " ./test/**/*.exs | sed -e 's/do$//g'Gunpowder
It's not really an answer to your question but for your future reference you can find command line switches for mix test by typing mix help testPlacer
To add to Oleksandr, you can create your own custom mix tasks and implement the run/1 function.Caulk
G
3

This will still run the tests:

mix test --trace

Found in the mix help test page

EDIT: Didn't see the bit saying 'without running the tests', but I thought it might be helpful

Garlic answered 22/1, 2017 at 5:58 Comment(1)
This is also useful to see which tests are running if you've excluded a bunch of them, e.g. if you use tags then run mix test --only my_tag_name --trace to see which ones have been excluded and which have been run.Subordinate

© 2022 - 2024 — McMap. All rights reserved.