SirRupertIII
SirRupertIII

Reputation: 12595

How can I change the order of iOS Kif tests?

As far as I can tell the tests in my KIFTestScenario+EXAdditions just go in alphabetical order. How can I get the tests to go in an order that I want. I would rather not simply name them like this scenarioToATestLogin.

Thanks!

Upvotes: 1

Views: 559

Answers (1)

HalR
HalR

Reputation: 11083

We used to have that problem, but now we subclass the KifTestController, and in that controller we add our KifTestScenario's like this:

- (void)initializeScenarios {
    [self addScenario:[KIFTestScenario scenarioTestMediaPlayer]];
    [self addScenario:[KIFTestScenario scenarioTestVideoPlayer]];
    [self addScenario:[KIFTestScenario scenarioTestSharing]];
    [self addScenario:[KIFTestScenario scenarioTestContentView]];
}

Then in our AppDelegate, we start up the KiffTest's in this method:

- (void)runIntegrationTests {
    [[OurTestController sharedInstance] startTestingWithCompletionBlock:^{
        exit([[OurTestController sharedInstance] failureCount]);
    }];
}

And our scenarios run in the order that we have added them above.

Upvotes: 4

Related Questions