dzen wrote: >hi all, i have the following problem >i have a test1.rb placed in folder1 in test1.rb is the Test1 < >Test::Unit::TestCase class then i have test2.rb in folder2. there is the Test2 >class >i want to run the test2.rb and to have first Test1 performed and then Test2 >im tring to do it with require test1.rb but what happend is first to be >performed Test2 and then Test1 >why does this wors that way and how could that be solved >thanks in advice >--------------------------------------------------------------------- >Posted via Jive Forums >http://forums.openqa.org/thread.jspa?threadID=3666&messageID=10122#10122 >_______________________________________________ >Wtr-general mailing list >[email protected] >http://rubyforge.org/mailman/listinfo/wtr-general > > dzen ...
You can't specify order for good reason ... if your tests are dependant on eachother, they really aren't separate tests... Tests are normally defined as completely distinct scenarios ... that are performed beginning to end and do all of their own setup and teardown ... So, they don't have to care what order they are executed in ... ... You might want to re-think your testing strategy if you believe that you truely need two tests that depend on the order of execution ... So ... other than that ... you could create a single test that invokes all of the functionality of Test1 and Test2 in the order you want ... and let the system simply aggregate the total assertion/failure/error counts for you ... I hope this helps. jd _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
