|
Boost Users : |
Subject: Re: [Boost-users] [Boost.Test] Test Ordering?
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2012-11-06 01:26:38
On Mon, Nov 5, 2012 at 10:43 PM, Richard
<legalize+jeeves_at_[hidden]>wrote:
> [Please do not mail me a copy of your followup]
>
> boost-users_at_[hidden] spake the secret code
> <24214-1352044228-124888_at_[hidden]> thusly:
>
> >At link time, these appear in some undetermined order. How can I cause
> >them to be run in the desired order instead?
>
> Good test design says that the tests are all independent of each
> other and can run in any order.
>
> Why do you want/need the tests to run in a certain order?
mmmm.... Test might be independent in their order and you can run them even
randomly with Boost.Test by passing the random command line flag, but there
is a big BUT here (as it is always the case in software development). This
BUT is:
I find such a feature very useful. Sometimes you can save lot's of time if
using a dependency mechanism you can skip tests which would depend on
critical tests which fail anyway. In that case it might make no sense to
run smth that is obviously broken... Just mark it broken as well and don't
run it.
I really agree with you that otherwise putting the TCs in some special
order and make them depend on some global state is very fragile probably
not reproducible.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net