What is Kif?
Kif is an automation framework that integrates directly with XCTests. The framework can be found here: https://github.com/kif-framework/KIF.
Why use Kif?
- – Setup is very easy. If your project is already set up with XCTests, it’s as simple as adding the Kif pod to your project and adding the framework to your test target.
- – It integrates seamlessly with XCTests. Kif comes with an ‘KIFTestCase’ which you use in place of ‘XCTestCase’. This won’t affect your regular Unit Tests, but will give you access to the Kif Automation tools.
- – Kif Automation tests can be written completely in Objective C.
- – Kif accesses UI elements by their accessibility labels. This is good as our other testing frameworks are already required, so projects should have this in place.
Downsides to Kif
- – Because Kif is integrated with XCTests, your unit tests will be coupled with your automation tests. By default when you run your tests, you will have to run both your unit tests and your automation tests. This will require some additional set up if you want to run your unit tests separately from your automation testing.
- – KIF uses undocumented Apple APIs. It’s important that KIF does not make it into production code, as it will get your app submission denied by Apple. This is true of most testing frameworks however.