0

Note: Answers to similar, existing questions are unfortunately hopelessly outdated and based on older versions of XCode. I created this question because I could not find an answer that was later than 2016.

As of XCode 12, the default test scheme is to execute tests in lexical order, but you can also decide to check the option to randomize tests.
Tests

I understand that within a test case:

  • If "Randomize execution order" is not checked, the tests methods are run in lexical order.
  • If "Randomize execution order" is checked, the tests methods are run in random order.

However, what about the test cases themselves? What order are they run in? Is this order affected by "Randomize execution order"?

Winston Du
  • 340
  • 2
  • 9
  • What did experimentation suggest about this? – matt Dec 01 '20 at 00:40
  • Experimentation suggests both the test cases and the test methods are randomized. But as a technical writer @matt, I imagine you may be able supply a definitive answer. – Winston Du Dec 14 '20 at 09:30

0 Answers0