特徴は:
- テストケースをObjective-C で記述する
- アプリにコードを組み込むのでシミュレータと実機両方でテスト可能
- iOS の Accessibility を利用している
- “tap this view,” “turn on this switch,” or “type this text.”などをサポート
- CIツールに組み込み可能
サイトにあるデモ動画を見るとテストの様子がわかる(関係ないけれどアプリのデザインいいなー)。
テストコード例(シナリオ):
+ (id)scenarioToLogIn;
{
KIFTestScenario *scenario = [KIFTestScenario scenarioWithDescription:@"Test that a user can successfully log in."];
[scenario addStep:[KIFTestStep stepToEnterText:@"user@example.com" intoViewWithAccessibilityLabel:@"Login User Name"]];
[scenario addStep:[KIFTestStep stepToEnterText:@"thisismypassword" intoViewWithAccessibilityLabel:@"Login Password"]];
[scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Log In"]];
// Verify that the login succeeded
[scenario addStep:[KIFTestStep stepToWaitForTappableViewWithAccessibilityLabel:@"Welcome"]];
return scenario;
}GitHubでソースが提供されている。使い方も図入りでかなり詳しく書かれている。
KIF の Google Groups
ちなみにこの会社はあの Square を作っているところ。



