samedi 5 décembre 2015

IOS Model, Database, Networking testing without View & Controller

I think of my ios app as having three levels:

Top: View & Controller Middle: Model, Database, Networking Bottom: Infrastructure classes that don't depend on anything (e.g. a thread safe NSDictionary)

I unit test the top level with XCTest tests using XCUIApplication. I unit test the bottom level with XCTest tests that don't use XCUIApplication.

I can't figure out how a good way to test the middle level.

These tests need a XCUIApplication, but they can be triggered by taking action with the GUI. I can build these tests into the application and trigger them with notifications. However I don't want to ship these tests with the app and I think there must be better way.

I would appreciate any advice.

Thank you!

Aucun commentaire:

Enregistrer un commentaire