Named unittests

Shammah Chancellor via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 31 21:42:33 PDT 2015


On 2015-03-30 21:52:36 +0000, Andrei Alexandrescu said:

> We're having a strong need for named unittests at Facebook for multiple 
> reasons.
> 
> 1. We have sophisticated tooling that verifies whether unittests are 
> flaky. The automated monitor (for e.g. C++) figures whether a given 
> unittest fails several times across several commits. Unittests are 
> identified by name; relying on file/line is impossible because the line 
> of a failure is not stable across changes.
> 
> 2. Again for efficient automated testing and flakiness detection, one 
> should be able to run only a subset of unittests by mentioning them by 
> line in the command line. Note that this implies there's no 
> interdependency between distinct unittests, which is fine because the 
> new ability is opt-on; I'd say is pure style anyway.
> 
> 3. Mentioning unittest names in failure messages helps human 
> communication (e.g. "AddPeer is failing after your change"). This is 
> impossible with file and line numbers.
> 
> I'd like to make a DIP for named unittests. Who can help me with that?
> 
> 
> Andrei

This is a fantastic idea -- and something I was concerned about lately.  +1

I can possibly help with a DIP, but it seems like a very 
straightforward request?

-Shammah



More information about the Digitalmars-d mailing list