Testcase order

I’m trying to run different testcases in a file:
require ‘testcases/dopTest’
require ‘testcases/bipTest’
require ‘testcases/canTest’

But when I run it the order is not as I wrote it. First it’s run bipTest
and the last one dopTest.

How can I sort the order I want?

Thanks.

On Wed, Apr 9, 2008 at 10:18 AM, Mario R. [email protected] wrote:

I’m trying to run different testcases in a file:
require ‘testcases/dopTest’
require ‘testcases/bipTest’
require ‘testcases/canTest’

But when I run it the order is not as I wrote it. First it’s run bipTest
and the last one dopTest.

How can I sort the order I want?

Name them in alphabetical order.

So it’s impossible to run the testcases in the ‘require’ order

Because I’m running testcases that need the result of another one so
must be run first.

On 09/04/2008, Mario R. [email protected] wrote:

So it’s impossible to run the testcases in the ‘require’ order

Each of your test should be independent from the other tests.
Why do you want to run them in a specific order?

-Thomas

On Apr 9, 2008, at 09:04 , Mario R. wrote:

Because I’m running testcases that need the result of another one so
must be run first.

Don’t do that. You don’t want your testcases coupled to each other.
really. Refactor your tests and decouple them from each other and
you’ll be much much happier in the long run.

Because I’m running testcases that need the result of another one so
must be run first.

Testcases should run in issolation. One testcase should not be
dependent on another.