ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
[boost] Re: [boost.test] feature request - random order of testing
by Gennadiy Rozental other posts by this author
May 23 2004 1:16AM messages near this date
[boost] Re: [boost.test] feature request - random order of testing | [boost] any interest in a producer consumer template?
>  Would it be possible to add ability to execute tests in random order,
>  instead of as they are added into suite?
> 
>  Example:
> 
>  test_suite* init_unit_test_suite(int argc, char * argv[]) {
>      test_suite* tests = BOOST_TEST_SUITE("...");
>      tests->add(BOOST_TEST_CASE(&test1));
>      tests->add(BOOST_TEST_CASE(&test2));
>      return tests;
>  }
> 
>  Here test1() will be always executed before test2(). This behaviour may
hide
>  errors.

As a rule you shouldn't rely on order of test cases.
Why not write 2 assertions that tests both orders?

>  It would be nice to have:
>  - possibility to say: now execute test in random order,
>  - if error happens framework would print out seed for random,
>  - ability set seed manually is needed to be able to repeat problem.

I am plan in this release add an ability to run a test case by name. It may
help you a bit. As for random order I will think about it, but it fills a
bit incorrect (see above).

Gennadiy.



_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Pavel Vozenilek
Pavel Vozenilek
David Abrahams
Gennadiy Rozental
Gennadiy Rozental

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved