SlideShare une entreprise Scribd logo
1  sur  17
Télécharger pour lire hors ligne
UI Testing
                              Taras Kalapun




                                    1
вторник, 26 апреля 2011 г.
Why Create Automated Tests?


                    • Find bugs while you sleep
                    • Repeatable regressions tests
                    • Quickly turn around updates to your
                             application



                                           2
вторник, 26 апреля 2011 г.
UI Automation



                                   3
вторник, 26 апреля 2011 г.
4
вторник, 26 апреля 2011 г.
5
вторник, 26 апреля 2011 г.
Logging

            var testName = "My first test";
            UIALogger.logStart(testName);
             // test code

            UIALogger.logPass(testName);




                                              6
вторник, 26 апреля 2011 г.
test("Food screen", function(target, app) {

                    var window = app.mainWindow();

                    window.tabBars()[0].buttons()["Food"].tap();

                    var e;

                    // Choose Provider
                    e = window.tableViews()[0].cells()[0];
                    waitVisible(e);
                    e.tap();

                    delay(1);

                    // Choose food
                    e = window.tableViews()[0].cells()[0];
                    waitVisible(e);
                    e.tap();

                    delay(1);

                    // Put in basket
                    e = window.tableViews()[0].cells()[0];
                    waitVisible(e);
                    e.tap();

                                                7
вторник, 26 апреля 2011 г.
8
вторник, 26 апреля 2011 г.
test("User Info screen", function(target, app) {

            var window = app.mainWindow();

            var tabBar = window.tabBars()[0];

            tabBar.buttons()["Info"].tap();

            var tableView = window.tableViews()[0];

            // Choose User Info
            waitVisible(tableView.cells()["User Info"]);
            tableView.cells()["User Info"].tap();

            //textFields()[0].setValue(name);

            tableView = window.tableViews()[0];

      tableView.cells()["name"].textFields()
 [0].setValue("Vasya");
      tableView.cells()["email"].textFields()
 [0].setValue("test@example.com");
      tableView.cells()["phone"].textFields()
 [0].setValue("+77777");

            });
                                              9
вторник, 26 апреля 2011 г.
Handling Alerts

       UIATarget.onAlert = function onAlert(alert) {
          var title = alert.name();
          UIALogger.logWarning("Alert with title '" +
  title + "' encountered!");

                    if (title == "Warning") {
                        alert.buttons()["OK"].tap();
                        return true; // bypass default handler
                    }

                    return false; // use default handler
             }




                                                10
вторник, 26 апреля 2011 г.
Multitasking
                    • Deactivate application for a given time
                    • Reactivating the application is handled
                             automatically

           UIALogger.logMessage("Deactivating app");
           UIATarget.localTarget().deactivateAppForDuration(10);
           UIALogger.logMessage("Resuming test after
           deactivation");




                                             11
вторник, 26 апреля 2011 г.
FoneMonkey



                                 12
вторник, 26 апреля 2011 г.
Record/playback functional testing tool
            • Records high-level user actions
            • Integrates with OCUnit
            • Generation of OCUnit test scripts
            • Generation of JavaScript UIAutomation scripts
            • Validation commands
 http://www.gorillalogic.com/fonemonkey
                                   13
вторник, 26 апреля 2011 г.
14
вторник, 26 апреля 2011 г.
Frank




                       iOS testing tool that uses UISpec's UIScript
                       to remotely drive an App

             https://github.com/moredip/Frank
                                            15
вторник, 26 апреля 2011 г.
Cucumber
      Feature: Drive our SampleApp using Cucumber

                     Scenario: Plus button adds timestamp
                       Given the app is launched
                       When I touch the Plus button




                                      16
вторник, 26 апреля 2011 г.
UIScript
   $(@"textField with placeholder:'Username'
   setText:'bkuser'");

   $(@"textField with placeholder:'Password'
   setText:'bkpassword'");

   $(@"navigationButton label with text:'Login' touch");




                                17
вторник, 26 апреля 2011 г.

Contenu connexe

Tendances

Quick Intro to Android Development
Quick Intro to Android DevelopmentQuick Intro to Android Development
Quick Intro to Android Development
Jussi Pohjolainen
 
Top 3 SWT Exceptions
Top 3 SWT ExceptionsTop 3 SWT Exceptions
Top 3 SWT Exceptions
Lakshmi Priya
 

Tendances (20)

iOS Automation: XCUITest + Gherkin
iOS Automation: XCUITest + GherkiniOS Automation: XCUITest + Gherkin
iOS Automation: XCUITest + Gherkin
 
Quick Intro to Android Development
Quick Intro to Android DevelopmentQuick Intro to Android Development
Quick Intro to Android Development
 
 xctest
 xctest xctest
 xctest
 
Android
AndroidAndroid
Android
 
JAVA GUI PART III
JAVA GUI PART IIIJAVA GUI PART III
JAVA GUI PART III
 
Android lifecycle
Android lifecycleAndroid lifecycle
Android lifecycle
 
Testing view controllers with Quick and Nimble
Testing view controllers with Quick and NimbleTesting view controllers with Quick and Nimble
Testing view controllers with Quick and Nimble
 
Everything You (N)ever Wanted to Know about Testing View Controllers
Everything You (N)ever Wanted to Know about Testing View ControllersEverything You (N)ever Wanted to Know about Testing View Controllers
Everything You (N)ever Wanted to Know about Testing View Controllers
 
Quick: Better Tests via Incremental Setup
Quick: Better Tests via Incremental SetupQuick: Better Tests via Incremental Setup
Quick: Better Tests via Incremental Setup
 
Android activity lifecycle
Android activity lifecycleAndroid activity lifecycle
Android activity lifecycle
 
Event handling
Event handlingEvent handling
Event handling
 
Event Handling in Java
Event Handling in JavaEvent Handling in Java
Event Handling in Java
 
iOS UI Automation
iOS UI AutomationiOS UI Automation
iOS UI Automation
 
XCUITest for iOS App Testing and how to test with Xcode
XCUITest for iOS App Testing and how to test with XcodeXCUITest for iOS App Testing and how to test with Xcode
XCUITest for iOS App Testing and how to test with Xcode
 
Android UI Testing with Espresso
Android UI Testing with EspressoAndroid UI Testing with Espresso
Android UI Testing with Espresso
 
Event Handling in java
Event Handling in javaEvent Handling in java
Event Handling in java
 
Java Virtual Keyboard Using Robot, Toolkit and JToggleButton Classes
Java Virtual Keyboard Using Robot, Toolkit and JToggleButton ClassesJava Virtual Keyboard Using Robot, Toolkit and JToggleButton Classes
Java Virtual Keyboard Using Robot, Toolkit and JToggleButton Classes
 
Event Handling in JAVA
Event Handling in JAVAEvent Handling in JAVA
Event Handling in JAVA
 
04 activities and activity life cycle
04 activities and activity life cycle04 activities and activity life cycle
04 activities and activity life cycle
 
Top 3 SWT Exceptions
Top 3 SWT ExceptionsTop 3 SWT Exceptions
Top 3 SWT Exceptions
 

En vedette

En vedette (8)

Pavel kravchenko obj c runtime
Pavel kravchenko obj c runtimePavel kravchenko obj c runtime
Pavel kravchenko obj c runtime
 
Dmitry pilipenko i os gamekit
Dmitry pilipenko i os gamekitDmitry pilipenko i os gamekit
Dmitry pilipenko i os gamekit
 
05 net saturday vasiliy borovyak ''.net performance nontrivial bottlenecks''
05 net saturday vasiliy borovyak ''.net performance nontrivial bottlenecks''05 net saturday vasiliy borovyak ''.net performance nontrivial bottlenecks''
05 net saturday vasiliy borovyak ''.net performance nontrivial bottlenecks''
 
Winactie kleurplaten
Winactie kleurplatenWinactie kleurplaten
Winactie kleurplaten
 
Kirill Zotin клиент серверное взаимодействие под android в деталях
Kirill Zotin клиент серверное взаимодействие под android в деталяхKirill Zotin клиент серверное взаимодействие под android в деталях
Kirill Zotin клиент серверное взаимодействие под android в деталях
 
Time management training (Vadim Tikanov Ciklum)
Time management training (Vadim Tikanov Ciklum)Time management training (Vadim Tikanov Ciklum)
Time management training (Vadim Tikanov Ciklum)
 
Segey Glebov tips and tricks for modern mobile project management
Segey Glebov tips and tricks for modern mobile project managementSegey Glebov tips and tricks for modern mobile project management
Segey Glebov tips and tricks for modern mobile project management
 
Alfa times 1
Alfa times 1Alfa times 1
Alfa times 1
 

Similaire à Taras Kalapun ui testing

Tutorial ranorex
Tutorial ranorexTutorial ranorex
Tutorial ranorex
radikalzen
 

Similaire à Taras Kalapun ui testing (20)

Java Swing Handson Session (1).ppt
Java Swing Handson Session (1).pptJava Swing Handson Session (1).ppt
Java Swing Handson Session (1).ppt
 
A fresh look at Java Enterprise Application testing with Arquillian
A fresh look at Java Enterprise Application testing with ArquillianA fresh look at Java Enterprise Application testing with Arquillian
A fresh look at Java Enterprise Application testing with Arquillian
 
Unit Testing on Android - Droidcon Berlin 2015
Unit Testing on Android - Droidcon Berlin 2015Unit Testing on Android - Droidcon Berlin 2015
Unit Testing on Android - Droidcon Berlin 2015
 
Junit With Eclipse
Junit With EclipseJunit With Eclipse
Junit With Eclipse
 
Testable Javascript
Testable JavascriptTestable Javascript
Testable Javascript
 
QTP 10.0_Kalyan Chakravarthy.ppt
QTP 10.0_Kalyan Chakravarthy.pptQTP 10.0_Kalyan Chakravarthy.ppt
QTP 10.0_Kalyan Chakravarthy.ppt
 
Testing Tools
Testing ToolsTesting Tools
Testing Tools
 
Solit 2013, Автоматизация тестирования сложных систем: mixed mode automated t...
Solit 2013, Автоматизация тестирования сложных систем: mixed mode automated t...Solit 2013, Автоматизация тестирования сложных систем: mixed mode automated t...
Solit 2013, Автоматизация тестирования сложных систем: mixed mode automated t...
 
QA your code: The new Unity Test Framework – Unite Copenhagen 2019
QA your code: The new Unity Test Framework – Unite Copenhagen 2019QA your code: The new Unity Test Framework – Unite Copenhagen 2019
QA your code: The new Unity Test Framework – Unite Copenhagen 2019
 
Node conf - building realtime webapps
Node conf - building realtime webappsNode conf - building realtime webapps
Node conf - building realtime webapps
 
iOS Unit test getting stared
iOS Unit test getting starediOS Unit test getting stared
iOS Unit test getting stared
 
iOS Development (Part 2)
iOS Development (Part 2)iOS Development (Part 2)
iOS Development (Part 2)
 
Advance UIAutomator : Documentaion
Advance UIAutomator : DocumentaionAdvance UIAutomator : Documentaion
Advance UIAutomator : Documentaion
 
Tutorial ranorex
Tutorial ranorexTutorial ranorex
Tutorial ranorex
 
Selenium interview questions and answers
Selenium interview questions and answersSelenium interview questions and answers
Selenium interview questions and answers
 
Junit4&testng presentation
Junit4&testng presentationJunit4&testng presentation
Junit4&testng presentation
 
Test like a pro with Ember.js
Test like a pro with Ember.jsTest like a pro with Ember.js
Test like a pro with Ember.js
 
Testing Options in Java
Testing Options in JavaTesting Options in Java
Testing Options in Java
 
Junit and cactus
Junit and cactusJunit and cactus
Junit and cactus
 
Testing iOS Apps
Testing iOS AppsTesting iOS Apps
Testing iOS Apps
 

Plus de DneprCiklumEvents

Convert estimates to plans (Maxym Mykhalchuk Ciklum)
Convert estimates to plans (Maxym Mykhalchuk Ciklum)Convert estimates to plans (Maxym Mykhalchuk Ciklum)
Convert estimates to plans (Maxym Mykhalchuk Ciklum)
DneprCiklumEvents
 
Vladimir kozhayev handmade isometry
Vladimir kozhayev handmade isometryVladimir kozhayev handmade isometry
Vladimir kozhayev handmade isometry
DneprCiklumEvents
 
Pavel yuriychuk svg in game development
Pavel yuriychuk svg in game developmentPavel yuriychuk svg in game development
Pavel yuriychuk svg in game development
DneprCiklumEvents
 
Vitaly hit' abc_of_game_development
Vitaly hit' abc_of_game_developmentVitaly hit' abc_of_game_development
Vitaly hit' abc_of_game_development
DneprCiklumEvents
 
04 net saturday eugene sukhikh ''the basic performance questions''
04 net saturday eugene sukhikh ''the basic performance questions''04 net saturday eugene sukhikh ''the basic performance questions''
04 net saturday eugene sukhikh ''the basic performance questions''
DneprCiklumEvents
 
04 net saturday eugene sukhikh ''the basic performance questions''
04 net saturday eugene sukhikh ''the basic performance questions''04 net saturday eugene sukhikh ''the basic performance questions''
04 net saturday eugene sukhikh ''the basic performance questions''
DneprCiklumEvents
 
06 net saturday eugene zharkov ''silverlight. to oob or not to oob''
06 net saturday eugene zharkov ''silverlight. to oob or not to oob''06 net saturday eugene zharkov ''silverlight. to oob or not to oob''
06 net saturday eugene zharkov ''silverlight. to oob or not to oob''
DneprCiklumEvents
 
03 net saturday anton samarskyy ''document oriented databases for the .net pl...
03 net saturday anton samarskyy ''document oriented databases for the .net pl...03 net saturday anton samarskyy ''document oriented databases for the .net pl...
03 net saturday anton samarskyy ''document oriented databases for the .net pl...
DneprCiklumEvents
 
02 net saturday roman gomolko ''mvvm in javascript using knockoutjs''
02 net saturday roman gomolko ''mvvm in javascript using knockoutjs''02 net saturday roman gomolko ''mvvm in javascript using knockoutjs''
02 net saturday roman gomolko ''mvvm in javascript using knockoutjs''
DneprCiklumEvents
 
01 net saturday alex krakovetskiy ''asp.net scaffolding''
01 net saturday alex  krakovetskiy ''asp.net scaffolding''01 net saturday alex  krakovetskiy ''asp.net scaffolding''
01 net saturday alex krakovetskiy ''asp.net scaffolding''
DneprCiklumEvents
 
Sergey Khlopenov tools for_development_cross_platform_mobile_ap
Sergey Khlopenov tools for_development_cross_platform_mobile_apSergey Khlopenov tools for_development_cross_platform_mobile_ap
Sergey Khlopenov tools for_development_cross_platform_mobile_ap
DneprCiklumEvents
 

Plus de DneprCiklumEvents (11)

Convert estimates to plans (Maxym Mykhalchuk Ciklum)
Convert estimates to plans (Maxym Mykhalchuk Ciklum)Convert estimates to plans (Maxym Mykhalchuk Ciklum)
Convert estimates to plans (Maxym Mykhalchuk Ciklum)
 
Vladimir kozhayev handmade isometry
Vladimir kozhayev handmade isometryVladimir kozhayev handmade isometry
Vladimir kozhayev handmade isometry
 
Pavel yuriychuk svg in game development
Pavel yuriychuk svg in game developmentPavel yuriychuk svg in game development
Pavel yuriychuk svg in game development
 
Vitaly hit' abc_of_game_development
Vitaly hit' abc_of_game_developmentVitaly hit' abc_of_game_development
Vitaly hit' abc_of_game_development
 
04 net saturday eugene sukhikh ''the basic performance questions''
04 net saturday eugene sukhikh ''the basic performance questions''04 net saturday eugene sukhikh ''the basic performance questions''
04 net saturday eugene sukhikh ''the basic performance questions''
 
04 net saturday eugene sukhikh ''the basic performance questions''
04 net saturday eugene sukhikh ''the basic performance questions''04 net saturday eugene sukhikh ''the basic performance questions''
04 net saturday eugene sukhikh ''the basic performance questions''
 
06 net saturday eugene zharkov ''silverlight. to oob or not to oob''
06 net saturday eugene zharkov ''silverlight. to oob or not to oob''06 net saturday eugene zharkov ''silverlight. to oob or not to oob''
06 net saturday eugene zharkov ''silverlight. to oob or not to oob''
 
03 net saturday anton samarskyy ''document oriented databases for the .net pl...
03 net saturday anton samarskyy ''document oriented databases for the .net pl...03 net saturday anton samarskyy ''document oriented databases for the .net pl...
03 net saturday anton samarskyy ''document oriented databases for the .net pl...
 
02 net saturday roman gomolko ''mvvm in javascript using knockoutjs''
02 net saturday roman gomolko ''mvvm in javascript using knockoutjs''02 net saturday roman gomolko ''mvvm in javascript using knockoutjs''
02 net saturday roman gomolko ''mvvm in javascript using knockoutjs''
 
01 net saturday alex krakovetskiy ''asp.net scaffolding''
01 net saturday alex  krakovetskiy ''asp.net scaffolding''01 net saturday alex  krakovetskiy ''asp.net scaffolding''
01 net saturday alex krakovetskiy ''asp.net scaffolding''
 
Sergey Khlopenov tools for_development_cross_platform_mobile_ap
Sergey Khlopenov tools for_development_cross_platform_mobile_apSergey Khlopenov tools for_development_cross_platform_mobile_ap
Sergey Khlopenov tools for_development_cross_platform_mobile_ap
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Taras Kalapun ui testing

  • 1. UI Testing Taras Kalapun 1 вторник, 26 апреля 2011 г.
  • 2. Why Create Automated Tests? • Find bugs while you sleep • Repeatable regressions tests • Quickly turn around updates to your application 2 вторник, 26 апреля 2011 г.
  • 3. UI Automation 3 вторник, 26 апреля 2011 г.
  • 6. Logging var testName = "My first test"; UIALogger.logStart(testName); // test code UIALogger.logPass(testName); 6 вторник, 26 апреля 2011 г.
  • 7. test("Food screen", function(target, app) { var window = app.mainWindow(); window.tabBars()[0].buttons()["Food"].tap(); var e; // Choose Provider e = window.tableViews()[0].cells()[0]; waitVisible(e); e.tap(); delay(1); // Choose food e = window.tableViews()[0].cells()[0]; waitVisible(e); e.tap(); delay(1); // Put in basket e = window.tableViews()[0].cells()[0]; waitVisible(e); e.tap(); 7 вторник, 26 апреля 2011 г.
  • 9. test("User Info screen", function(target, app) { var window = app.mainWindow(); var tabBar = window.tabBars()[0]; tabBar.buttons()["Info"].tap(); var tableView = window.tableViews()[0]; // Choose User Info waitVisible(tableView.cells()["User Info"]); tableView.cells()["User Info"].tap(); //textFields()[0].setValue(name); tableView = window.tableViews()[0]; tableView.cells()["name"].textFields() [0].setValue("Vasya"); tableView.cells()["email"].textFields() [0].setValue("test@example.com"); tableView.cells()["phone"].textFields() [0].setValue("+77777"); }); 9 вторник, 26 апреля 2011 г.
  • 10. Handling Alerts UIATarget.onAlert = function onAlert(alert) { var title = alert.name(); UIALogger.logWarning("Alert with title '" + title + "' encountered!"); if (title == "Warning") { alert.buttons()["OK"].tap(); return true; // bypass default handler } return false; // use default handler } 10 вторник, 26 апреля 2011 г.
  • 11. Multitasking • Deactivate application for a given time • Reactivating the application is handled automatically UIALogger.logMessage("Deactivating app"); UIATarget.localTarget().deactivateAppForDuration(10); UIALogger.logMessage("Resuming test after deactivation"); 11 вторник, 26 апреля 2011 г.
  • 12. FoneMonkey 12 вторник, 26 апреля 2011 г.
  • 13. Record/playback functional testing tool • Records high-level user actions • Integrates with OCUnit • Generation of OCUnit test scripts • Generation of JavaScript UIAutomation scripts • Validation commands http://www.gorillalogic.com/fonemonkey 13 вторник, 26 апреля 2011 г.
  • 15. Frank iOS testing tool that uses UISpec's UIScript to remotely drive an App https://github.com/moredip/Frank 15 вторник, 26 апреля 2011 г.
  • 16. Cucumber Feature: Drive our SampleApp using Cucumber Scenario: Plus button adds timestamp Given the app is launched When I touch the Plus button 16 вторник, 26 апреля 2011 г.
  • 17. UIScript $(@"textField with placeholder:'Username' setText:'bkuser'"); $(@"textField with placeholder:'Password' setText:'bkpassword'"); $(@"navigationButton label with text:'Login' touch"); 17 вторник, 26 апреля 2011 г.