Home » KIF

Tag: KIF

My Testing Tools

Mobile Testing Tools - Adventures in QAIn this post I want to give you some insights in my daily working life as a mobile tester especially which tools I use to test mobile apps. I got ask this question several times while attending conferences or I have been asked via eMail. Which tools are you using for mobile testing. In this post I want to give you the answer to this question.

One remark, the tools I am using in my current project are best for my current situation but this must not be the case for you and your project. Please keep this in mind and don’t just use the tools I am using. This might not be the best fit for your project and your software development environment. Read more

GTAC 2014 Day 1

On 10/28/2014, the first day of the 2014 Google Test Automation Conference took place in Kirkland. For those who can’t attend the conference, Google provided a live stream and has now published the talks in a youtube video.

The video includes very interesting talks from various companies such as Google, Mozilla, Adobe, HP, Dropbox, Netflix or Facebook. The complete schedule can be found here.

All talks from the first day are included in this video.

Read more

XCTest and OCUnit on real devices in the cloud

Yesterday, I read the latest blog post from AppThwack, that they now support real iOS devices on their test cloud. Developers and testers are now able to run their automated XCTest or OCUnit test suites against the provided cloud with more than 46 iOS devices, from iPhone to iPad.

iOS devices in the cloud

The big advantage of having the OCUnit support in the AppThwack cloud, is that a number of popular iOS testing frameworks are built on top of OCUnit. There are tools like KIF (Keep It Functional), Kiwi, Spectra or OCMock. If you already have an automated test suite with one of those tools, you can easily execute them now against the cloud. All you have to do is upload your bundle either with the provided UI or API.

See the short AppThwack tutorial, on how to upload and test your project against the cloud:
http://blog.appthwack.com/xctest-and-ocunit-on-real-devices/


At the end of the test run, a really nice report is generated. A sample report can be found here.

AppThwack Sample Report

If you want to try the cloud testing service, just register and get 100 free device minutes for testing.

What kind of cloud testing services are you using?

Have a nice friday and weekend.

Keep It Functional 2.0

Nearly 2 years ago I wrote the post “iPhone test automation using KIF (Keep It Functional)“. The fact that I am not working with KIF in one of my current projects, I missed the new KIF 2.0 release. The new version was released in september 2013 with a major rewrite of the framework.
KIF 2.0 is built on top of ocunit and is able to execute the tests sequentially as they appear in your code. In the old version the test execution based on steps and scenarios.

If you check the example on the KIF github page you will see the whole new structure of KIF. In the old version you had to create a KIFTestScenario object. Then you had to add several KIFTestSteps to that object to interact with your application. In the new version you have two main classes KIFTestCase and KIFUITestActor. The ocunit test runner is loading the test cases from KIFTestCase. Inside the tests the tester object is interacting with your application under test. The tester object offers several actions that can be used for testing. The most used ones are:

  • tap this view
  • enter text into this view
  • wait for this view

See a sample login test method with KIF 2.0

...
- (void)testLogin
{
    [tester enterText:@"testUser" intoViewWithAccessibilityLabel:@"Login User Name"];
    [tester enterText:@"testPassword" intoViewWithAccessibilityLabel:@"Login Password"];
    [tester tapViewWithAccessibilityLabel:@"Log In"];

    [tester waitForTappableViewWithAccessibilityLabel:@"Welcome to your account"];
}
...

Compared to the old version

...
- (id)scenarioLogin{
   KIFTestScenario *scenario = [KIFTestScenario  
      scenarioWithDescription:@"Login with credentials"];

   [scenario addStep:[KIFTestStep  
      stepToEnterText:@"testUser" intoViewWithAccessibilityLabel:@"Username"]];

   [scenario addStep:[KIFTestStep 
      stepToEnterText:@"testPassword" intoViewWithAccessibilityLabel:@"password"]];

   [scenario addStep:[KIFTestStep 
      stepToTapViewWithAccessibilityLabel:@"Log in"]];

   [scenario addStep:[KIFTestStep
      stepToWaitForViewWithAccessibilityLabel:LocalizedString (@"Welcome")]];

   return scenario;

}
...

Also the new version of KIF relies on accessibility labels, so be sure to provide a full accessible app. I really like the new version of KIF because it is much shorter and clearer.

Besides the new structure, KIF also offers some more functionality:

  • Use breakpoints between your test steps.
  • Test failures are shown in Xcode.
  • No need to create a duplicate target.
  • It is working with Xcode 5 command line tools, test navigator, and Bots.
  • And you can combine it BDD frameworks like Specta.

Have fun with new version of KIF!

Source: https://github.com/kif-framework/KIF

How Google tests mobile apps

Today I found a really interesting blog post by the Google+ team and how they test the Google+ app for iOS and Android. In this post Google describes their mobile testing strategy. The team created 5 general rules, which they follow during the development and testing the Google+ app.

The rules are:

  1. Understand the platform. Testing on Android is not the same as testing on iOS. […] Read more