TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Jan 2020 |
Maintained by Glen Tregoning, Jan Jirout, Paul Zabelin.
Depends on: | |
Kiwi | ~> 3.0 |
KIF | ~> 3.0 |
KIF-Kiwi is a bridge between the Keep It Functional and Kiwi frameworks. It allows you to perform KIF actions using Kiwi syntax.
KIF-Kiwi is available through CocoaPods. To install KIF-Kiwi, simply add the following line to your Podfile:
pod 'KIF-Kiwi'
and run
pod install
Include KIF-Kiwi in your specs and start writing KIF tests using Kiwi describe/context and it blocks. See the TestableSpec.m example:
#import <KIF-Kiwi.h>
SPEC_BEGIN(MainViewAppSpec)
describe(@"Main view", ^{
it(@"should have tappable button", ^{
[tester tapViewWithAccessibilityLabel:@"Tap me"];
[tester waitForViewWithAccessibilityLabel:@"Button tapped!"];
});
});
SPEC_END
Please see the KIF and Kiwi documentation for more information on these frameworks.
To begin running the example project tests, clone the repo, and open xcode workspace in the Example
directory:
git clone https://github.com/IndieGoGo/KIF-Kiwi.git
cd KIF-Kiwi/Example/
open KIF-Kiwi.xcworkspace
Press ⌘-U
in Xcode or select Product->Test from the menu to run the tests.
You can also run the example tests from the command-line:
xcodebuild test -workspace KIF-Kiwi.xcworkspace -scheme KIF-Kiwi -sdk iphonesimulator -destination <device on your system>
e.g.
xcodebuild test -workspace KIF-Kiwi.xcworkspace -scheme KIF-Kiwi -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=10.1,name=iPhone 6s'
The test output will show a description of the test:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2014-08-01 02:28:15.661 KIF-Kiwi[14407:70b] + 'Testable, should have working button' [PASSED]
━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✓ -[SampleAppSpec Testable_ShouldHaveWorkingButton] (761 ms)
1 passed, 0 failed, 0 errored, 1 total (761 ms)
** TEST SUCCEEDED: 1 passed, 0 failed, 0 errored, 1 total ** (13862 ms)
Please report any issues. PRs are always welcome!
To submit a PR:
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)KIF-Kiwi is available under the MIT license. See the LICENSE file for more info.