2. 2
Testing Challenges
Coverage of range of devices and OS versions
Regression testing cycle is repetitive process due to which some
flows get skipped
Quicker Time to Market
3. Why Automation ?????
Fast: Runs tests significantly faster than human users.
Repeatable: Testers can test how the application reacts after repeated execution of the
same operation.
Reusable: Tests can be re-used on different versions of the software.
Reliable: Tests perform precisely the same operation each time they are run thereby
eliminating human error.
Comprehensive: Testers can build test suites of tests that covers every feature in
software software application
Programmable: Testers can program sophisticated tests that bring hidden information.
4. 4
Possible options for Automation
• Frank : It is a combination of Cucumber and Json Commands sender to the server within
native application.
Pros :
− Css Style syntax.
− Command Line support.
Cons :
− Driven by Cucumber based on ruby difficult to understand.
− Difficult to run on devices.
− Less Support for gestures.
5. 5
Possible options for Automation
• KIF : It is an Objective – C based relatively new framework.
Pros :
− Test are in Objective – C easier to pick.
− Command line support.
− Reasonable support for gestures.
Cons :
− Fair amount of changes in production code.
− Tricky to integrate with back end stubs because it’s all running in-process.
− Not stand alone.
6. Possible options for Automation
• UIAutomation : Apple's own solution for testing. It runs tests in Javascript using instruments.
Pros :
− Most closely linked to the device.
− Very good support for gestures.
Cons :
− Not so good integration with the command line.
− Can't integrate with 3rd
party testing tools.
− Less Support for gestures.
11. Writing the test in JavaScript in editor of your choice.
Few pre-requisites:
1) var target = UIATarget.localTarget() - a sort of proxy for the
user of the application.
2) var application = target.frontMostApp() - access to the top-
level structure of your application .
3) var window = app.mainWindow() - access to things like the
parent view, child views, pickers, sliders, etc.
18. var target = UIATarget.localTarget();
var app = target.frontMostApp();
var window = app.mainWindow();
..
..
..
UIALogger.logStart(“test”);
try{
// some code
if(true){
UIALogger.logPass(“test”);
} else{
UIALogger.logFail(“test);
target.captureScreenWithName(“test-failed”);
}
}
catch(e){
UIALogger.logError(e);
UIALogger.logFail(“test”);
}
Provision for taking application
screen shot
in case of test script failure
or application crash