boot-test icon indicating copy to clipboard operation
boot-test copied to clipboard

Running a single test from namespace

Open kul opened this issue 9 years ago • 6 comments

It would be nice to have support for running single tests also. Currently test only takes whole namespace using -n.

kul avatar May 14 '15 08:05 kul

It has the -f for filter, and takes an expression for filtering tests, but I'm not clearly understand how it can be used in a reasonable usable way.

niwinz avatar May 24 '15 09:05 niwinz

I have own version of test task completelly based on this package but without humane-test-output and with new additional parameter for filter by name.

So that line:

boot test -f "(= (:name (mata %)) 'foobar)"

Can be used in this maner:

boot test -s foobar

You can found the code here: https://github.com/funcool/bootutils/blob/master/src/funcool/bootutils.clj#L72

niwinz avatar May 24 '15 09:05 niwinz

PRs for -s and a flag to turn on/off humane-test-output would be very welcome, these are great features.

alandipert avatar May 24 '15 20:05 alandipert

I'll prepare these PR's in my first free time! ;)

niwinz avatar May 24 '15 20:05 niwinz

Actually for running single tests one can do something like boot test -n foo.bar -f '(re-find #"my-test" (str %))'

Which although powerful is kind of ugly. Something like boot test -t foo.bar/my-test would be more than enough for practical purposes imo.

kul avatar Jul 23 '15 08:07 kul

Can we make it simpler to type in?

tiye avatar Apr 14 '16 10:04 tiye