Parallel execution of unittests
Atila Neves via Digitalmars-d
digitalmars-d at puremagic.com
Wed Apr 30 11:04:42 PDT 2014
On Wednesday, 30 April 2014 at 17:30:30 UTC, Dicebot wrote:
> I believe only missing step right now is propagation of UDA's
> to RTInfo when demanded. Everything else can be done as Phobos
> solution.
>
> And if requirement to have all modules transitively accessible
> from root one is acceptable it can be already done with
> http://dlang.org/traits.html#getUnitTests
>
> Simplicity of D unit tests is their best feature.
IMHO this best feature is only useful when writing a small
script-like program. The hassle of using anything more heavy-duty
is likely to make one not want to write tests. The unittest
blocks are simple, and that's good.
But for me I wouldn't (and haven't) use them for "real work".
When tests pass, it doesn't really matter if they were written
with only using assert or what the output was like or any of
those things. But when they fail, I want to:
. Run the failing test(s) in isolation, selecting them on the
command-line by name
. Have tests grouped in categories (I use packages) to run
similar tests together
. Be able to enable debug output that is normally supressed
. Know the name of the test to know which one is failing
. Have meaningful output from the failure without having to
construct said meaningful output myself (assertEquals vs assert)
I don't know about anyone else, but I make my tests fail a lot. I
also added threading, hidden tests, and tests expected to fail to
that list but they are nice-to-have features. I can't do without
the rest though.
Also, I like pretty colours in the output for failure and
success, but that might be just me :P
Atila
More information about the Digitalmars-d
mailing list