Hi there,

I've written a new test runner for clojure.test. It does 2 main new things: 
parallelization, and *much* better output, error reporting, and some 
surrounding formatting/running features.

All the features were extracted from stuff I've accumulated in my app's 
user namespace over the last year or so in an effort to improve my own 
development experience.

1. Much improved output

bolth uses the same output format as humane-test-output: it diff's data 
structures passed to = and reports the difference when reporting failing 
tests. This is a huge win for testing things in larger data structures 
(especially maps), it just tells you "yo, this key is different", not "yo 
this 30 line data structure isn't equal to the other one".

It uses aviso/pretty to pretty print exception stacktraces, removing a 
bunch of the noise, making them the right way up (i.e. latest frame at the 
bottom so you don't have to scroll up all the time to find the error 
message/causing frame). There's also a tiny tools.namespace wrapper that 
lets you invoke tools.namespace and get pretty exceptions printed out 
rather than the usual garbage from the compiler.

It can report the slowest N tests in the test suite, so you can debug why 
your test suite is slow easily (suites I've tried it on usually have test 
runtime dominated by a few tests, that can often be improved without too 
much effort).

It reports the number of tests run, and the runtime per test, which can 
give you a goal (I typically get about 0.25ms or so per test in my app).

It can clear the screen, which is useful for outputting to a repl, because 
you remove the noise from other test failures (see the gifs in the post for 
what that looks like).

It can call `System/exit` with an good exit code based on if the tests 
passed or not (this is off by default, because you'll only really want it 
in CI, definitely not in a repl). This stops you writing that wrapper once 
again.

2. Parallelization of test runs

Bolth parallelizes test runs. This means it's only suitable for test suites 
where each test is completely isolated from the others (the easiest way to 
achieve this is having a test suite that's purely in memory, but it's 
possible to isolate databases as well, just not a thing I've done).

You can read more about it 
here: http://yellerapp.com/posts/2015-04-23-bolth.html

Enjoy!

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to