How do I determine the order of the tests in DUnitX?

How do I determine the order of the tests in DUnitX?

I've got a few tests and I created separate units for each Test case. Then, I have another unit where I have moved all the TDUnitX.RegisterTextFixtures(xxx) in one procedure.

In the main project file, I call the registration method before the runners.

But what I get is a kind of random order of the execution of the testcases.

Does anyone know how this determined?

TIA for any help.

Comments

  1. Jeroen Wiert Pluimers I knew there was a DSharp or Spring4D mocking framework, and I had a quick look but couldnt find it, so didnt mention it.

    I currently use Delphi Mocks along with DUnitX, and I am planning to start using Spring4D in the next year so I will check out the mocks and your article for consideration. Thanks

    ReplyDelete
  2. DUnitX order is not fixed (something to do with RTTI). I think DUnit/DUnit2 are. I've been adjusting some tests I've moved from DUnit2 to DUnitX because of this. I used to rely on the order to set up data for db tests and am now making them independent.

    ReplyDelete
  3. Sue King That's exactly what I was doing as well

    ReplyDelete

Post a Comment