6

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

Michael Bishop
  • 4,240
  • 3
  • 37
  • 41
  • 1
    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'` – Oleksandr Avoiants Sep 28 '16 at 18:00
  • 1
    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 test` – Onorio Catenacci Sep 28 '16 at 18:28
  • To add to Oleksandr, you can [create your own custom mix tasks](http://www.phoenixframework.org/docs/mix-tasks#section-creating-our-own-mix-tasks) and implement the `run/1` function. – KA01 Sep 28 '16 at 19:40

1 Answers1

3

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

ollien
  • 4,418
  • 9
  • 35
  • 58
Dylanthepiguy
  • 1,621
  • 18
  • 47
  • 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. – Optimae Jun 10 '21 at 15:55