Order of Unit Test Execution is Alphabetical

I just found this post as I was also wondering why my tests don’t seem to run in the order I expect them.

As that guy pointed out, I looked in my log and looked at the order in which the tests were executed. Alphabetically!

So, I guess from now on, I’m writing my methods as:

- (void)test001_whatThisTestShouldVerify;

I hate underscores in method names, but you know, it’s important to first know the rules before you break them.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s