Marko Zadravec
Marko Zadravec

Reputation: 8730

Xcode XCTestCase not run at all

I have some strange problem in xcode.

I haved project and I decided to add some Unit tests.

I create new Test bundle and add my app as test target. Only think that I change to auto generated code is :

Build Settings / Arhitectures / Build Active Arhitecture Only  : NO

and I add new test :

- (void)testExample {
    XCTAssertTrue(YES, @"OK");
}

When I run tests it builds ok and it says that running test, but test failed enter image description here

But as you can see no test is actually running.

Do any one have any idea why?

EDIT :

I have add test bundle into schema.

enter image description here

Marko

Upvotes: 1

Views: 4370

Answers (1)

Rob
Rob

Reputation: 437632

A couple of observations:

  • The test that is failing is inside the "BIView Mobile New VersionTests", not the test inside the "ModelUnitTest".

  • In terms of whether the "ModelUnitTest" is included in the test, you have to edit the scheme and review the "Test" settings:

    tests settings in scheme

    Make sure your "ModelUnitTest" target is included in that list.

Upvotes: 1

Related Questions