SlideShare a Scribd company logo
1 of 44
UI Testing
 Taras Kalapun


       1
“It seems to
be working”
“Nothing is
obviously broken”
Why Create Automated Tests?


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



                    3
4
Potential Testing Tools

                 hmmm...




           5
Potential Testing Tools

• Frank and UISpec       hmmm...




                     5
Potential Testing Tools

• Frank and UISpec       hmmm...
• Sikuli



                     5
Potential Testing Tools

• Frank and UISpec       hmmm...
• Sikuli
• FoneMonkey


                     5
Potential Testing Tools

• Frank and UISpec       hmmm...
• Sikuli
• FoneMonkey
• iCuke

                     5
Potential Testing Tools

• Frank and UISpec       hmmm...
• Sikuli
• FoneMonkey
• iCuke
• UIAutomation
                     5
UI Automation

      6
7
8
Logging

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

UIALogger.logPass(testName);




                                  9
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();

                                 10
11
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");

     });
                                       12
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
     }




                                     13
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");




                                14
+                                  ?
    describe("Jasmine", function() {
     it("makes testing JavaScript awesome!", function() {
       expect(yourCode).toBeLotsBetter();
     });
    });



•    http://pivotal.github.com/jasmine/

•    https://github.com/dexterous/iOS-Acceptance-Testing

                                 15
16
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
                           17
18
Zucchini




       19
Frank and
     Cucumber


20
Tests

             iPhone
               App


        21
Tests
                               UISpec
   Cucumber / Ruby
                          ?
                              iPhone
                                App


                     21
Tests                     Frank
                          Server



                               UISpec
   Cucumber / Ruby

                          iPhone
                            App


                     21
Tests                Frank
                     Driver
                                   Frank
                                   Server



                                        UISpec
   Cucumber / Ruby

                                   iPhone
                                     App


                              21
Tests                Frank
                     Driver
                                               Frank
                                               Server
                                   “frankly”

                                                    UISpec
   Cucumber / Ruby

                                               iPhone
                                                 App


                              21
UISpec

UISpec is a Behavior Driven Development framework
for the iPhone that provides a full automated testing
solution that drives the actual iPhone UI




            http://code.google.com/p/uispec/
                           22
UIScript
$(@"textField with placeholder:'Username'
setText:'bkuser'");

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

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




                            23
Scenario: [name of the scenario]
   Given [some statement]
   When [some action]
   Then [some expected result]
   And [another expectation]

                   24
Feature: Browsing catalog
 In order to test catalog browsing
 As a user
 I want be able to browse
through catalog entries




                           25
Cucumber
Feature: Buying shoes

 Background: The app is running
  Given I launch the app

 Scenario: Placing an order on shoes
  When I open catalog
  And I switch to "Categories" view
  And I pick "Женская обувь" category
  And I pick "Босоножки" subcategory
  And I pick "Босоножки женские Lloyd" item
  And I buy the item
  Then I should see "1049.4" price badge
                        26
When /^I wait ([d.]+) second(?:s)?$/ do |seconds|
 seconds = seconds.to_f
 sleep( seconds )
end

Then /^I should see several entires in the table$/ do
 section = 0
 expected_num_rows = 2
 num_rows_array = frankly_map( "tableView first",
"numberOfRowsInSection:", section )
 raise "no table found" if num_rows_array.empty?
 num_rows_array.first.should > expected_num_rows
end
                          27
When /^I pick "([^"]*)" item$/ do |item|
 steps %Q{
   When I wait to see "#{item}"
   And I touch the 3rd table cell
 }
end

When /^I buy the item$/ do
 frankly_map("scrollView first scrollDown:220", "")
 touch "view marked:'Buy'"
end


                          28
29
30
robotium

31
32
Refs
•   http://github.com/moredip/frank

•   http://cuke4ninja.com

•   http://cukes.info

•   http://www.slideshare.net/sgleadow/frank-ios-testing

•   http://www.slideshare.net/sgleadow/agile-ios

•   http://stackoverflow.com/questions/4114083/ios-tests-specs-
    tdd-bdd-and-integration-acceptance-testing


•   kiwi - BDD Logick test


                                33

More Related Content

What's hot

Lightning Talk - iOS UI Automated Testing
Lightning Talk - iOS UI Automated TestingLightning Talk - iOS UI Automated Testing
Lightning Talk - iOS UI Automated TestingRafael Sperling
 
java Unit4 chapter1 applets
java Unit4 chapter1 appletsjava Unit4 chapter1 applets
java Unit4 chapter1 appletsraksharao
 
Advance UIAutomator : Documentaion
Advance UIAutomator : DocumentaionAdvance UIAutomator : Documentaion
Advance UIAutomator : DocumentaionRaman Gowda Hullur
 
A guide to Android automated testing
A guide to Android automated testingA guide to Android automated testing
A guide to Android automated testingjotaemepereira
 
New to native? Getting Started With iOS Development
New to native?   Getting Started With iOS DevelopmentNew to native?   Getting Started With iOS Development
New to native? Getting Started With iOS DevelopmentGeoffrey Goetz
 
UI Testing with Spec
 UI Testing with Spec UI Testing with Spec
UI Testing with SpecESUG
 
Applet Architecture - Introducing Java Applets
Applet Architecture - Introducing Java AppletsApplet Architecture - Introducing Java Applets
Applet Architecture - Introducing Java Appletsamitksaha
 
Automating the Gaps of Unit Testing Mobile Apps
Automating the Gaps of Unit Testing Mobile AppsAutomating the Gaps of Unit Testing Mobile Apps
Automating the Gaps of Unit Testing Mobile AppsGeoffrey Goetz
 
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 ControllersBrian Gesiak
 
Openframworks x Mobile
Openframworks x MobileOpenframworks x Mobile
Openframworks x MobileJanet Huang
 
Java: Java Applets
Java: Java AppletsJava: Java Applets
Java: Java AppletsTareq Hasan
 

What's hot (15)

Of class3
Of class3Of class3
Of class3
 
Lightning Talk - iOS UI Automated Testing
Lightning Talk - iOS UI Automated TestingLightning Talk - iOS UI Automated Testing
Lightning Talk - iOS UI Automated Testing
 
java Unit4 chapter1 applets
java Unit4 chapter1 appletsjava Unit4 chapter1 applets
java Unit4 chapter1 applets
 
Advance UIAutomator : Documentaion
Advance UIAutomator : DocumentaionAdvance UIAutomator : Documentaion
Advance UIAutomator : Documentaion
 
A guide to Android automated testing
A guide to Android automated testingA guide to Android automated testing
A guide to Android automated testing
 
New to native? Getting Started With iOS Development
New to native?   Getting Started With iOS DevelopmentNew to native?   Getting Started With iOS Development
New to native? Getting Started With iOS Development
 
UIAutomator
UIAutomatorUIAutomator
UIAutomator
 
UI Testing with Spec
 UI Testing with Spec UI Testing with Spec
UI Testing with Spec
 
Applet Architecture - Introducing Java Applets
Applet Architecture - Introducing Java AppletsApplet Architecture - Introducing Java Applets
Applet Architecture - Introducing Java Applets
 
Automating the Gaps of Unit Testing Mobile Apps
Automating the Gaps of Unit Testing Mobile AppsAutomating the Gaps of Unit Testing Mobile Apps
Automating the Gaps of Unit Testing Mobile Apps
 
Java Applet and Graphics
Java Applet and GraphicsJava Applet and Graphics
Java Applet and Graphics
 
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
 
Openframworks x Mobile
Openframworks x MobileOpenframworks x Mobile
Openframworks x Mobile
 
Eclipse meets e4
Eclipse meets e4Eclipse meets e4
Eclipse meets e4
 
Java: Java Applets
Java: Java AppletsJava: Java Applets
Java: Java Applets
 

Viewers also liked

UX Design Testing Battle School - ISL
UX Design Testing Battle School - ISLUX Design Testing Battle School - ISL
UX Design Testing Battle School - ISLEric Shutt
 
UI Testing with Earl Grey
UI Testing with Earl GreyUI Testing with Earl Grey
UI Testing with Earl GreyShyam Bhat
 
Responsive Web Design testing using Galen Framework
Responsive Web Design testing using Galen FrameworkResponsive Web Design testing using Galen Framework
Responsive Web Design testing using Galen FrameworkBirudugadda Pranathi
 
Bdd and-testing
Bdd and-testingBdd and-testing
Bdd and-testingmalcolmt
 
Serenity BDD Workshop - 9th March 2016
Serenity BDD Workshop - 9th March 2016Serenity BDD Workshop - 9th March 2016
Serenity BDD Workshop - 9th March 2016vodqasg
 
Automated Tests in Agile based on Serenity BDD - Michał Szybalski
Automated Tests in Agile based on Serenity BDD - Michał SzybalskiAutomated Tests in Agile based on Serenity BDD - Michał Szybalski
Automated Tests in Agile based on Serenity BDD - Michał SzybalskiŁódQA
 
Test Automation Frameworks: Assumptions, Concepts & Tools
Test Automation Frameworks: Assumptions, Concepts & ToolsTest Automation Frameworks: Assumptions, Concepts & Tools
Test Automation Frameworks: Assumptions, Concepts & ToolsAmit Rawat
 
Serenity BDD - from executable specifications to living documentation
Serenity BDD - from executable specifications to living documentationSerenity BDD - from executable specifications to living documentation
Serenity BDD - from executable specifications to living documentationAlex Soto
 
Behavior Driven Development - Live Webinar
Behavior Driven Development - Live WebinarBehavior Driven Development - Live Webinar
Behavior Driven Development - Live WebinarBelatrix Software
 
UI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected JourneyUI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected JourneyOren Farhi
 
Smarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationSmarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationRIA RUI Society
 

Viewers also liked (20)

Behavior Driven GUI Testing
Behavior Driven GUI TestingBehavior Driven GUI Testing
Behavior Driven GUI Testing
 
UX Design Testing Battle School - ISL
UX Design Testing Battle School - ISLUX Design Testing Battle School - ISL
UX Design Testing Battle School - ISL
 
UI Testing with Earl Grey
UI Testing with Earl GreyUI Testing with Earl Grey
UI Testing with Earl Grey
 
Responsive Web Design testing using Galen Framework
Responsive Web Design testing using Galen FrameworkResponsive Web Design testing using Galen Framework
Responsive Web Design testing using Galen Framework
 
Selenium basic
Selenium basicSelenium basic
Selenium basic
 
Bdd and-testing
Bdd and-testingBdd and-testing
Bdd and-testing
 
Selenium topic 1- Selenium Basic
Selenium topic 1-  Selenium BasicSelenium topic 1-  Selenium Basic
Selenium topic 1- Selenium Basic
 
BDD in Automation Testing
BDD in Automation TestingBDD in Automation Testing
BDD in Automation Testing
 
Serenity BDD Workshop - 9th March 2016
Serenity BDD Workshop - 9th March 2016Serenity BDD Workshop - 9th March 2016
Serenity BDD Workshop - 9th March 2016
 
Automated Tests in Agile based on Serenity BDD - Michał Szybalski
Automated Tests in Agile based on Serenity BDD - Michał SzybalskiAutomated Tests in Agile based on Serenity BDD - Michał Szybalski
Automated Tests in Agile based on Serenity BDD - Michał Szybalski
 
Test Automation Frameworks: Assumptions, Concepts & Tools
Test Automation Frameworks: Assumptions, Concepts & ToolsTest Automation Frameworks: Assumptions, Concepts & Tools
Test Automation Frameworks: Assumptions, Concepts & Tools
 
Serenity BDD - from executable specifications to living documentation
Serenity BDD - from executable specifications to living documentationSerenity BDD - from executable specifications to living documentation
Serenity BDD - from executable specifications to living documentation
 
Selenium
SeleniumSelenium
Selenium
 
Selenium web driver
Selenium web driverSelenium web driver
Selenium web driver
 
Behavior Driven Development - Live Webinar
Behavior Driven Development - Live WebinarBehavior Driven Development - Live Webinar
Behavior Driven Development - Live Webinar
 
Serenity-BDD training
Serenity-BDD trainingSerenity-BDD training
Serenity-BDD training
 
Selenium topic 3 -Web Driver Basics
Selenium topic 3 -Web Driver BasicsSelenium topic 3 -Web Driver Basics
Selenium topic 3 -Web Driver Basics
 
UI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected JourneyUI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected Journey
 
Basic Selenium Training
Basic Selenium TrainingBasic Selenium Training
Basic Selenium Training
 
Smarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationSmarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automation
 

Similar to Ui BDD Testing

Frank iOS Testing
Frank iOS TestingFrank iOS Testing
Frank iOS Testingsgleadow
 
Automated ui testing
Automated ui testingAutomated ui testing
Automated ui testingDavidReidy
 
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with AppiumSrijan Technologies
 
Cucumber meets iPhone
Cucumber meets iPhoneCucumber meets iPhone
Cucumber meets iPhoneErin Dees
 
2012 java one-con3648
2012 java one-con36482012 java one-con3648
2012 java one-con3648Eing Ong
 
Android testing calabash
Android testing calabashAndroid testing calabash
Android testing calabashkellinreaver
 
MOET: Mobile End-to-End Testing
MOET: Mobile End-to-End TestingMOET: Mobile End-to-End Testing
MOET: Mobile End-to-End Testingmobiletestsummit
 
Continuous delivery for native apps
Continuous delivery for native appsContinuous delivery for native apps
Continuous delivery for native appsNiels Frydenholm
 
ユニバーサル Windows アプリ開発
ユニバーサル Windows アプリ開発ユニバーサル Windows アプリ開発
ユニバーサル Windows アプリ開発Akira Onishi
 
Ruby motion勉強会 2012年7月
Ruby motion勉強会 2012年7月Ruby motion勉強会 2012年7月
Ruby motion勉強会 2012年7月Eihiro Saishu
 
Getting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App TestingGetting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App TestingBitbar
 
Selenium, Appium, and Robots!
Selenium, Appium, and Robots!Selenium, Appium, and Robots!
Selenium, Appium, and Robots!hugs
 
Automated UI Testing for Web and Native Apps on iOS and Android
Automated UI Testing for  Web and Native Apps on iOS and AndroidAutomated UI Testing for  Web and Native Apps on iOS and Android
Automated UI Testing for Web and Native Apps on iOS and AndroidOperation Mobile
 
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 NimbleMarcio Klepacz
 
2012 mobile testingsummit-moet
2012 mobile testingsummit-moet2012 mobile testingsummit-moet
2012 mobile testingsummit-moetEing Ong
 
Setting UIAutomation free with Appium
Setting UIAutomation free with AppiumSetting UIAutomation free with Appium
Setting UIAutomation free with AppiumDan Cuellar
 
Android Unit Test
Android Unit TestAndroid Unit Test
Android Unit TestPhuoc Bui
 

Similar to Ui BDD Testing (20)

Frank iOS Testing
Frank iOS TestingFrank iOS Testing
Frank iOS Testing
 
Automated ui testing
Automated ui testingAutomated ui testing
Automated ui testing
 
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
 
Cucumber meets iPhone
Cucumber meets iPhoneCucumber meets iPhone
Cucumber meets iPhone
 
2012 java one-con3648
2012 java one-con36482012 java one-con3648
2012 java one-con3648
 
Android testing calabash
Android testing calabashAndroid testing calabash
Android testing calabash
 
MOET: Mobile End-to-End Testing
MOET: Mobile End-to-End TestingMOET: Mobile End-to-End Testing
MOET: Mobile End-to-End Testing
 
Continuous delivery for native apps
Continuous delivery for native appsContinuous delivery for native apps
Continuous delivery for native apps
 
ユニバーサル Windows アプリ開発
ユニバーサル Windows アプリ開発ユニバーサル Windows アプリ開発
ユニバーサル Windows アプリ開発
 
Ruby motion勉強会 2012年7月
Ruby motion勉強会 2012年7月Ruby motion勉強会 2012年7月
Ruby motion勉強会 2012年7月
 
Getting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App TestingGetting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App Testing
 
Xam expertday
Xam expertdayXam expertday
Xam expertday
 
Automating android
Automating androidAutomating android
Automating android
 
Selenium, Appium, and Robots!
Selenium, Appium, and Robots!Selenium, Appium, and Robots!
Selenium, Appium, and Robots!
 
Automated UI Testing for Web and Native Apps on iOS and Android
Automated UI Testing for  Web and Native Apps on iOS and AndroidAutomated UI Testing for  Web and Native Apps on iOS and Android
Automated UI Testing for Web and Native Apps on iOS and Android
 
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
 
2012 mobile testingsummit-moet
2012 mobile testingsummit-moet2012 mobile testingsummit-moet
2012 mobile testingsummit-moet
 
Setting UIAutomation free with Appium
Setting UIAutomation free with AppiumSetting UIAutomation free with Appium
Setting UIAutomation free with Appium
 
Android Unit Test
Android Unit TestAndroid Unit Test
Android Unit Test
 
Calabash for iPhone apps
Calabash for iPhone appsCalabash for iPhone apps
Calabash for iPhone apps
 

Recently uploaded

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
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 WorkerThousandEyes
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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 RobisonAnna Loughnan Colquhoun
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Ui BDD Testing

  • 1. UI Testing Taras Kalapun 1
  • 2.
  • 3. “It seems to be working”
  • 5. Why Create Automated Tests? • Find bugs while you sleep • Repeatable regressions tests • Quickly turn around updates to your application 3
  • 6. 4
  • 8. Potential Testing Tools • Frank and UISpec hmmm... 5
  • 9. Potential Testing Tools • Frank and UISpec hmmm... • Sikuli 5
  • 10. Potential Testing Tools • Frank and UISpec hmmm... • Sikuli • FoneMonkey 5
  • 11. Potential Testing Tools • Frank and UISpec hmmm... • Sikuli • FoneMonkey • iCuke 5
  • 12. Potential Testing Tools • Frank and UISpec hmmm... • Sikuli • FoneMonkey • iCuke • UIAutomation 5
  • 14. 7
  • 15. 8
  • 16. Logging var testName = "My first test"; UIALogger.logStart(testName); // test code UIALogger.logPass(testName); 9
  • 17. 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(); 10
  • 18. 11
  • 19. 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"); }); 12
  • 20. 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 } 13
  • 21. 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"); 14
  • 22. + ? describe("Jasmine", function() { it("makes testing JavaScript awesome!", function() { expect(yourCode).toBeLotsBetter(); }); }); • http://pivotal.github.com/jasmine/ • https://github.com/dexterous/iOS-Acceptance-Testing 15
  • 23. 16
  • 24. 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 17
  • 25. 18
  • 26. Zucchini 19
  • 27. Frank and Cucumber 20
  • 28. Tests iPhone App 21
  • 29. Tests UISpec Cucumber / Ruby ? iPhone App 21
  • 30. Tests Frank Server UISpec Cucumber / Ruby iPhone App 21
  • 31. Tests Frank Driver Frank Server UISpec Cucumber / Ruby iPhone App 21
  • 32. Tests Frank Driver Frank Server “frankly” UISpec Cucumber / Ruby iPhone App 21
  • 33. UISpec UISpec is a Behavior Driven Development framework for the iPhone that provides a full automated testing solution that drives the actual iPhone UI http://code.google.com/p/uispec/ 22
  • 34. UIScript $(@"textField with placeholder:'Username' setText:'bkuser'"); $(@"textField with placeholder:'Password' setText:'bkpassword'"); $(@"navigationButton label with text:'Login' touch"); 23
  • 35. Scenario: [name of the scenario] Given [some statement] When [some action] Then [some expected result] And [another expectation] 24
  • 36. Feature: Browsing catalog In order to test catalog browsing As a user I want be able to browse through catalog entries 25
  • 37. Cucumber Feature: Buying shoes Background: The app is running Given I launch the app Scenario: Placing an order on shoes When I open catalog And I switch to "Categories" view And I pick "Женская обувь" category And I pick "Босоножки" subcategory And I pick "Босоножки женские Lloyd" item And I buy the item Then I should see "1049.4" price badge 26
  • 38. When /^I wait ([d.]+) second(?:s)?$/ do |seconds| seconds = seconds.to_f sleep( seconds ) end Then /^I should see several entires in the table$/ do section = 0 expected_num_rows = 2 num_rows_array = frankly_map( "tableView first", "numberOfRowsInSection:", section ) raise "no table found" if num_rows_array.empty? num_rows_array.first.should > expected_num_rows end 27
  • 39. When /^I pick "([^"]*)" item$/ do |item| steps %Q{ When I wait to see "#{item}" And I touch the 3rd table cell } end When /^I buy the item$/ do frankly_map("scrollView first scrollDown:220", "") touch "view marked:'Buy'" end 28
  • 40. 29
  • 41. 30
  • 43. 32
  • 44. Refs • http://github.com/moredip/frank • http://cuke4ninja.com • http://cukes.info • http://www.slideshare.net/sgleadow/frank-ios-testing • http://www.slideshare.net/sgleadow/agile-ios • http://stackoverflow.com/questions/4114083/ios-tests-specs- tdd-bdd-and-integration-acceptance-testing • kiwi - BDD Logick test 33

Editor's Notes

  1. Модульное тестирование — процесс в программировании, позволяющий проверить на корректность отдельные модули исходного кода программы.\nИдея состоит в том, чтобы писать тесты для каждой нетривиальной функции или метода. Это позволяет достаточно быстро проверить, не привело ли очередное изменение кода к регрессии, то есть к появлению ошибок в уже оттестированных местах программы, а также облегчает обнаружение и устранение таких ошибок.\n
  2. - try it out, press a few buttons (perhaps even mail it to the user)\n- it seems to be working => nothing is obviously broken\n* not as strong a statement (try sending that to a client)\n- manual testing takes too long\n
  3. - try it out, press a few buttons (perhaps even mail it to the user)\n- it seems to be working => nothing is obviously broken\n* not as strong a statement (try sending that to a client)\n- manual testing takes too long\n
  4. - try it out, press a few buttons (perhaps even mail it to the user)\n- it seems to be working => nothing is obviously broken\n* not as strong a statement (try sending that to a client)\n- manual testing takes too long\n
  5. \n
  6. \n
  7. TOOLS FOR - actually remote controlling your app (like Selenium or WebDriver)\nSikuli - uses image analysis (fragile?)\n- simulator only unless you jailbreak your phone and run a VNC server on it\nFoneMonkey - comes from a record/playback model (does have scripting now)\niCuke - very similar to Frank but uses XML/xpath\n- pushes more work to the Ruby side, very little Objective C logic\n- potentially lead to brittle tests as XML structure more likely to change?\n- more “touch at X Y” kind of tests\nUIAutomation - Instruments + javascript + jasmine-iphone\n- could not consistently run and automate in the build, no applescript\n
  8. TOOLS FOR - actually remote controlling your app (like Selenium or WebDriver)\nSikuli - uses image analysis (fragile?)\n- simulator only unless you jailbreak your phone and run a VNC server on it\nFoneMonkey - comes from a record/playback model (does have scripting now)\niCuke - very similar to Frank but uses XML/xpath\n- pushes more work to the Ruby side, very little Objective C logic\n- potentially lead to brittle tests as XML structure more likely to change?\n- more “touch at X Y” kind of tests\nUIAutomation - Instruments + javascript + jasmine-iphone\n- could not consistently run and automate in the build, no applescript\n
  9. TOOLS FOR - actually remote controlling your app (like Selenium or WebDriver)\nSikuli - uses image analysis (fragile?)\n- simulator only unless you jailbreak your phone and run a VNC server on it\nFoneMonkey - comes from a record/playback model (does have scripting now)\niCuke - very similar to Frank but uses XML/xpath\n- pushes more work to the Ruby side, very little Objective C logic\n- potentially lead to brittle tests as XML structure more likely to change?\n- more “touch at X Y” kind of tests\nUIAutomation - Instruments + javascript + jasmine-iphone\n- could not consistently run and automate in the build, no applescript\n
  10. TOOLS FOR - actually remote controlling your app (like Selenium or WebDriver)\nSikuli - uses image analysis (fragile?)\n- simulator only unless you jailbreak your phone and run a VNC server on it\nFoneMonkey - comes from a record/playback model (does have scripting now)\niCuke - very similar to Frank but uses XML/xpath\n- pushes more work to the Ruby side, very little Objective C logic\n- potentially lead to brittle tests as XML structure more likely to change?\n- more “touch at X Y” kind of tests\nUIAutomation - Instruments + javascript + jasmine-iphone\n- could not consistently run and automate in the build, no applescript\n
  11. TOOLS FOR - actually remote controlling your app (like Selenium or WebDriver)\nSikuli - uses image analysis (fragile?)\n- simulator only unless you jailbreak your phone and run a VNC server on it\nFoneMonkey - comes from a record/playback model (does have scripting now)\niCuke - very similar to Frank but uses XML/xpath\n- pushes more work to the Ruby side, very little Objective C logic\n- potentially lead to brittle tests as XML structure more likely to change?\n- more “touch at X Y” kind of tests\nUIAutomation - Instruments + javascript + jasmine-iphone\n- could not consistently run and automate in the build, no applescript\n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. - linking up a handful of open source tools to create a monster\n\n
  27. iOS testing tool that uses UISpec's UIScript to remotely drive an App\n
  28. iOS testing tool that uses UISpec's UIScript to remotely drive an App\n
  29. iOS testing tool that uses UISpec's UIScript to remotely drive an App\n
  30. iOS testing tool that uses UISpec's UIScript to remotely drive an App\n
  31. iOS testing tool that uses UISpec's UIScript to remotely drive an App\n
  32. iOS testing tool that uses UISpec's UIScript to remotely drive an App\n
  33. iOS testing tool that uses UISpec's UIScript to remotely drive an App\n
  34. iOS testing tool that uses UISpec's UIScript to remotely drive an App\n
  35. iOS testing tool that uses UISpec's UIScript to remotely drive an App\n
  36. iOS testing tool that uses UISpec's UIScript to remotely drive an App\n
  37. iOS testing tool that uses UISpec's UIScript to remotely drive an App\n
  38. iOS testing tool that uses UISpec's UIScript to remotely drive an App\n
  39. - BDD tool modelled on RSpec\n- useful tool, not a huge community about it\n- uses a query language called UIQuery\n- difficult to run as part of a CI build (Perryn)\n- output hard to read\n- not business readable\n
  40. \n
  41. - describe the behavior of the app in plain English\n- business readable\n-> think at a higher level\n
  42. \n
  43. \n
  44. \n
  45. \n
  46. - symbiote: talk to a running app interactively\n- view DOM & accessibility label\n- flash element\n- write the most general selector possible (less brittle tests)\n
  47. \n
  48. \n
  49. \n
  50. \n