What's the story behind " using [Test(Order = n)] or
[DependsOn("othertest")] attributes."Seems like those would be very bad things to build into a framework, knowing you, I'm sure you put them there for a reason... Tim On Wed, Jun 24, 2009 at 4:15 PM, Jeff Brown <[email protected]> wrote: > Actually MbUnit runs tests in a deterministic order because I have found > that it is easier to skim incoming test results when they appear in order > than when they are completely randomized. Determinism improves the user > experience. > > Test developers are still encouraged to avoid depending on the test order > or at the least to be explicit about it by using [Test(Order = n)] or > [DependsOn("othertest")] attributes. > > We could add an assembly-level attribute to MbUnit to randomize test order > but I have no plans to do so at this time. > > Jeff. > > ------------------------------ > *From:* [email protected] [mailto:[email protected]] *On > Behalf Of *Tim Barcz > *Sent:* Wednesday, June 24, 2009 5:58 AM > *To:* [email protected] > *Subject:* MbUnit Re: Ordering tests > > I think this is a very very good thing. Your tests should never rely on > the order in which they run. In fact some frameworks will in fact jumble > all of the tests and randomize run order so that order will not matter > (MbUnit may be one of these...Jeff?) . > > It's not a C# thing at all but rather a "good unit test practice" > > Tim Barcz > > > On Wed, Jun 24, 2009 at 2:05 AM, Rob Langley <[email protected]>wrote: > >> >> Hi >> >> This is probably a basic question for someone who is more competent >> with c#. I have written a number of tests grouped in different >> classes. For instance: >> >> BasicTests.cs >> [test1] >> >> [test2] >> >> AdvancedTests.cs >> [Test1] >> >> Test2] >> >> When I run them in either TeamCity or Gallio I can't seem to predict >> the order they will run? >> >> Thanks in advance >> >> Rob >> >> > > > -- > Tim Barcz > ASPInsider > http://timbarcz.devlicio.us > http://www.twitter.com/timbarcz > > > > -- Tim Barcz ASPInsider http://timbarcz.devlicio.us http://www.twitter.com/timbarcz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MbUnit.User" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MbUnitUser?hl=en -~----------~----~----~----~------~----~------~--~---
