Ralica Nacheva wrote: > Thank you, I.ve tried this and it works with test cases, but how about when > someone wants to use the test cases into a test suite and wants them to be > exequted sequentially?
If you run a Ruby program containing any classes derived from TestCase, they will automatically run all their test cases. You shouldn't need to run them in any order. Each test case should set up data, invoke a web browser, browse your site, assert, and shut down your browser. Google "Test Isolation" for lectures on why test cases should run in any order. Your cases should not, for example, drive your website into a given state, and then rely on that state in the next case. Doing this is a sign you have not characterized that state. I use Rails, which has a test fixtures system (which should be called "test resources"). It lets me declare records as text (YAML), and then load them into the database on command. So for a given website, I have a series of records in various conditions. One is a user who did not log in, the next one is logged in, the next one logged in and created one data record, etc. So my test cases can reach out to these records, each in their intermediate state, and push them to the next state. The tests can run in any order because the data refreshes between test cases. -- Phlip http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!! _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
