9

I'm just starting to use Apple's new Xcode 5 unit testing framework. I have low-level classes that I would like to test before testing higher level classes that utilize these low-level classes. For instance I have to database control classes that use a special UUID class. It makes no sense to test the DB classes if I have a regression in the UUID system. I would like to run the suite of UUID tests first.

Has anyone found a technique or practice with the XCTest framework to allow this?

Bruce1q
  • 504
  • 4
  • 8

1 Answers1

11

I have tried with success to name the test methods using a numeric scheme, like:

  • -(void)test_1_myFirstTest
  • -(void)test_2_mySecondTest
  • ...
  • -(void)test_n_myNthTest

It seems it works in the desired order, however it is maybe not guaranteed.

Hope this helps.

Joe
  • 111
  • 3