SlideShare una empresa de Scribd logo
1 de 33
Descargar para leer sin conexión
Session outline

   Introduction
   Simulator basics
   Mobile end-to-end testing (Moet)
   Building your mobile tests
   Demo
   Advantages and limitations
   Q&A
What are we solving for

 Diverse mobile platforms
 Low cost solution
 End-to-end mobile tests
 Leverage black box testers
Simulator Basics

   BlackBerry TM
     Starting simulator
        fledge.exe
           /app=jvm.dll
           /session=<model>
           /app-param=
               JvmAlxConfigFile:<model>.xml
           /handheld=<model>

     Communicating with simulator
        fledgecontroller.exe /session=<model>
Simulator commands
Actions           Steps
Start 9630 Tour   fledge.exe /app=jvm.dll
simulator            /session=9630 /handheld=9630
                     /app-
                     param=JvmAlxConfigFile:9630.xml
Install           1. Copy app.jar, app.jad, app.cod to
application          Javaloader directory
                  2. JavaLoader.exe –u load app.jad
                3. Delete app.jar, app.jad, app.cod
Save screenshot 1. JavaLoader.exe –u screenshot
as test.png in     test.png
$TEST_OUTPUT
                  2. mv test.png $TEST_OUTPUT
bblib.py
Actions           Steps                                  bblib.py
Start 9630 Tour   fledge.exe /app=jvm.dll                fledgeStart()
simulator            /session=9630 /handheld=9630
                     /app-
                     param=JvmAlxConfigFile:9630.xml
Install           1. Copy app.jar, app.jad, app.cod to   install()
application          Javaloader directory
                  2. JavaLoader.exe –u load app.jad
                3. Delete app.jar, app.jad, app.cod
Save screenshot 1. JavaLoader.exe –u screenshot          screenshot(‘test’)
as test.png in     test.png
$TEST_OUTPUT
                  2. mv test.png $TEST_OUTPUT
Simulator commands
Action         Steps
Enter 'Hello   StringInjection(Hello)
World'         KeyPress(SPACE)
               KeyRelease(SPACE)
                StringInjection(World)
Touch screen at TouchScreenPress(10, 100, 0)
(10, 100)       TouchScreenClick()
                TouchScreenUnclick()
                TouchScreenUnpress(0)
Thumbwheel up ThumbWheelRoll(-1)
twice          ThumbWheelRoll(-1)
bblib.py
Action         Steps                           bblib.py
Enter 'Hello   StringInjection(Hello)          enter(‘Hello World')
World'         KeyPress(SPACE)
               KeyRelease(SPACE)
                StringInjection(World)
Touch screen at TouchScreenPress(10, 100, 0)   touch(10, 100)
(10, 100)       TouchScreenClick()
                TouchScreenUnclick()
                TouchScreenUnpress(0)
Thumbwheel up ThumbWheelRoll(-1)               thumbwheel ('up',
twice          ThumbWheelRoll(-1)                           2)
Simulator Basics
              TM
   Android
     Create AVD
        $ANDROID_HOME/tools/android


     Starting emulator
        emulator –avd <avd>


     Communicating with emulator
        adb shell
Simulator command
Action         Steps
Enter 'Hello   adb shell
World'         "sendevent /dev/input/event0 1 42 1;
                 sendevent /dev/input/event0 1 42 0;
                 sendevent /dev/input/event0 1 35 1;
                 sendevent /dev/input/event0 1 35 0;
                 sendevent /dev/input/event0 1 18 1;
                 sendevent /dev/input/event0 1 18 0;
                 sendevent /dev/input/event0 1 38 1;
                 sendevent /dev/input/event0 1 38 0;
                 sendevent /dev/input/event0 1 38 1;
                 sendevent /dev/input/event0 1 38 0;
                 sendevent /dev/input/event0 1 24 1;
                 sendevent /dev/input/event0 1 24 0;
               …"
androidlib.py
Action         Steps                                   androidlib.py
Enter 'Hello   adb shell                               enter(‘Hello
World'                                                   World’)
               "sendevent /dev/input/event0 1 42 1;
                 sendevent /dev/input/event0 1 42 0;
                 sendevent /dev/input/event0 1 35 1;
                 sendevent /dev/input/event0 1 35 0;
                 sendevent /dev/input/event0 1 18 1;
                 sendevent /dev/input/event0 1 18 0;
                 sendevent /dev/input/event0 1 38 1;
                 sendevent /dev/input/event0 1 38 0;
                 sendevent /dev/input/event0 1 38 1;
                 sendevent /dev/input/event0 1 38 0;
                 sendevent /dev/input/event0 1 24 1;
                 sendevent /dev/input/event0 1 24 0;
               …"
MOET

   MObile End-to-End Test

     Simulator libraries
        androidlib.py
        bblib.py
     Image processing library
        imagelib.py
     Testing utilities library
        testlib.py
        logger.py
Moet Framework

            Mobile Application Interface


              Device Independent Tests
                      Runtime binding
Simulator libraries


    Android app library        BlackBerry app library

       androidlib.py                    bblib.py
Test Automation Overview

1.   Define application interface
     This interface is device-agnostic.


2.   Implement the interface
     Implement the interface in your supported devices e.g. Android.
     Utilize python mobile libraries e.g. androidlib.py.


3.   Write your tests
     Tests are device independent and reusable on all supported devices.


4.   Run
Step 1 : Define app interface

class AppInterface:
 """ Application interface for all
   devices to implement """

  def add(self, contact):
    """Add contact """

  def find(self, contact):
    """ Find contact"""

  def delete(self, contact):
    """Delete contact"""
Test Automation Overview

1.   Define application interface
     This interface is device-agnostic.


2.   Implement the interface
     Implement the interface in your supported devices.
     Utilize moet libraries.


3.   Write your tests
     Tests are device independent and reusable on all supported devices.


4.   Run
Step 2 (Pearl) :
Implement the interface

def add(self, contact):
   """ Add contact """

   # click add contact
   enter()

   # enter name
   enter(contact.getFirstname()
   thumbwheel('down', 1)
    …
   # save
   menu()
   enter()
Step 2 (Android) :
Implement the interface

def add(self, contact):
   """ Add contact """

   # click add contact
   menu()
   scroll(‘up’)
   scroll(‘right’)
   enter()

   # enter name
   enter(contact.getFirstname())
   scroll('down')
   …
   # save
   menu()
   scroll(‘down’)
    enter()
Step 2 (recap) :
Implement the interface

def PearlImpl(appbase.AppInterface):   def AndroidImpl(appbase.AppInterface):
    def add(self, contact):               def add(self, contact):
         """ Add contact """                   """ Add contact """
       enter()                                 menu()
       enter(contact.getFirstname()            scroll(‘up’)
       thumbwheel('down', 1)                   scroll(‘right’)
       …                                       enter()
       menu()                                  enter(contact.getFirstname())
       enter()                                 scroll(‘down’)
                                               …
                                              menu()
                                              scroll(‘down’)
                                              enter()
Test Automation Overview

1.   Define application interface
     This interface is device-agnostic.


2.   Implement the interface
     Implement the interface in your supported devices e.g. Android.
     Utilize python mobile libraries e.g. androidlib.py.


3.   Write your tests
     Tests are device independent and reusable on all supported devices.


4.   Run
Step 3 : Writing tests
class AddContactTest(unittest.TestCase):

   device = testenv.getDeviceClass()

   def addContactWithOnlyFirstnameTest(self):
     self.contact.setFirstname(firstname)
     self.device.add(self.contact)

   def addContactWithOnlyLastnameTest(self):
     self.contact.setLastname(lastname)
     self.device.add(self.contact)
Step 3 : Runtime binding
def getDeviceClass(self):
    """ Returns the device to test """

   mobileDevice = self.getMobileDevice()

   if mobileDevice == 'pearl':
         import pearl
         deviceClass = pearl.PearlImpl()

   elif mobileDevice == ‘android':
          import android
          deviceClass = android.AndroidImpl()

   return deviceClass
More device-independent tests

Additional tests are easy to write

    def addContactWithEmailTest(self):
    def addContactWithAddressesTest(self):
    def addContactWithAllDetailsTest(self):
    def addContactWithLongDetailsTest(self):
    def addContactAddressWithStateZip(self):
    def addContactAddressWithCityStateZip(self):
    def addContactAddressWithNoDataNegativeTest(self):
Step 4 : Run

   Basic run command
     python <test.py>


   Python test frameworks
     unittest
     PyUnit
     python-nose
Test Verification

   Server hosted apps
     API assertions
     Database assertions

   Image assertions
      self.assertTrue(
        imagelib.compare(
          self.device, testname, '100%x90%‘, tolerance))
            # Crop settings examples
            # 100%x80%+10%+20% (crop size + offset)
            # 320x90+0+0
            # +0+90
Test Logging

   Logs
    AddressTest.log :
    2010-06-10 15:19:46,773 - testCreateAddressMethod - INFO -
       [Address] 200 Villa St Mountain View CA 94040 BUSINESS ADDRESS


   Initialization
    self.log = self.device.initLogger(self._testMethodName,
                                      self.__class__.__name__)

   Usage
    self.log.info('Starting test: ' + self._testMethodName)
    self.log.debug(self.contact)
    self.log.error(‘Missing image to compare’)
Demo

   Simulators
     Android
     BlackBerry Pearl
 Moet
 Test automation
     Address book app
      ○ Add contact
      ○ Find contact
      ○ Delete contact
Advantages

   Low cost and ease of use
   Reusable end-to-end tests
   No device sharing/scheduling
   Bigger device pool
   Reduce manual testing time
   Run on developer machines
   Debugging capabilities
Limitations

   Requires ethernet or internet connectivity
   Does not simulate network performance
   Does not support hardware controls testing
   Dependent on simulator reliability
   Limited peer-to-peer applications testing
Resources
MOET http://github.com/eing/moet/
Android 

     Emulator http://developer.android.com/guide/developing/tools/emulator.html

     ADB http://android-dls.com/wiki/index.php?title=ADB

     Forum http://developer.android.com/resources/community-groups.html

BlackBerry 
     Downloads http://na.blackberry.com/eng/developers/javaappdev/javadevenv.jsp
     Fledge Controller
          http://docs.blackberry.com/en/developers/deliverables/6338/Testing_apps_using_the_
          BBSmrtphnSmltr_607559_11.jsp

     Forum http://supportforums.blackberry.com/
Q&A
Moet - Mobile End-to-End Test at Selenium Conf 2011

Más contenido relacionado

Último

Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
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, ...apidays
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
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, Adobeapidays
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
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...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
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 FMESafe Software
 

Último (20)

Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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, ...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
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
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
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...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
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
 

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Moet - Mobile End-to-End Test at Selenium Conf 2011

  • 1.
  • 2. Session outline  Introduction  Simulator basics  Mobile end-to-end testing (Moet)  Building your mobile tests  Demo  Advantages and limitations  Q&A
  • 3. What are we solving for  Diverse mobile platforms  Low cost solution  End-to-end mobile tests  Leverage black box testers
  • 4. Simulator Basics  BlackBerry TM  Starting simulator fledge.exe /app=jvm.dll /session=<model> /app-param= JvmAlxConfigFile:<model>.xml /handheld=<model>  Communicating with simulator fledgecontroller.exe /session=<model>
  • 5. Simulator commands Actions Steps Start 9630 Tour fledge.exe /app=jvm.dll simulator /session=9630 /handheld=9630 /app- param=JvmAlxConfigFile:9630.xml Install 1. Copy app.jar, app.jad, app.cod to application Javaloader directory 2. JavaLoader.exe –u load app.jad 3. Delete app.jar, app.jad, app.cod Save screenshot 1. JavaLoader.exe –u screenshot as test.png in test.png $TEST_OUTPUT 2. mv test.png $TEST_OUTPUT
  • 6. bblib.py Actions Steps bblib.py Start 9630 Tour fledge.exe /app=jvm.dll fledgeStart() simulator /session=9630 /handheld=9630 /app- param=JvmAlxConfigFile:9630.xml Install 1. Copy app.jar, app.jad, app.cod to install() application Javaloader directory 2. JavaLoader.exe –u load app.jad 3. Delete app.jar, app.jad, app.cod Save screenshot 1. JavaLoader.exe –u screenshot screenshot(‘test’) as test.png in test.png $TEST_OUTPUT 2. mv test.png $TEST_OUTPUT
  • 7. Simulator commands Action Steps Enter 'Hello StringInjection(Hello) World' KeyPress(SPACE) KeyRelease(SPACE) StringInjection(World) Touch screen at TouchScreenPress(10, 100, 0) (10, 100) TouchScreenClick() TouchScreenUnclick() TouchScreenUnpress(0) Thumbwheel up ThumbWheelRoll(-1) twice ThumbWheelRoll(-1)
  • 8. bblib.py Action Steps bblib.py Enter 'Hello StringInjection(Hello) enter(‘Hello World') World' KeyPress(SPACE) KeyRelease(SPACE) StringInjection(World) Touch screen at TouchScreenPress(10, 100, 0) touch(10, 100) (10, 100) TouchScreenClick() TouchScreenUnclick() TouchScreenUnpress(0) Thumbwheel up ThumbWheelRoll(-1) thumbwheel ('up', twice ThumbWheelRoll(-1) 2)
  • 9. Simulator Basics TM  Android  Create AVD $ANDROID_HOME/tools/android  Starting emulator emulator –avd <avd>  Communicating with emulator adb shell
  • 10. Simulator command Action Steps Enter 'Hello adb shell World' "sendevent /dev/input/event0 1 42 1; sendevent /dev/input/event0 1 42 0; sendevent /dev/input/event0 1 35 1; sendevent /dev/input/event0 1 35 0; sendevent /dev/input/event0 1 18 1; sendevent /dev/input/event0 1 18 0; sendevent /dev/input/event0 1 38 1; sendevent /dev/input/event0 1 38 0; sendevent /dev/input/event0 1 38 1; sendevent /dev/input/event0 1 38 0; sendevent /dev/input/event0 1 24 1; sendevent /dev/input/event0 1 24 0; …"
  • 11. androidlib.py Action Steps androidlib.py Enter 'Hello adb shell enter(‘Hello World' World’) "sendevent /dev/input/event0 1 42 1; sendevent /dev/input/event0 1 42 0; sendevent /dev/input/event0 1 35 1; sendevent /dev/input/event0 1 35 0; sendevent /dev/input/event0 1 18 1; sendevent /dev/input/event0 1 18 0; sendevent /dev/input/event0 1 38 1; sendevent /dev/input/event0 1 38 0; sendevent /dev/input/event0 1 38 1; sendevent /dev/input/event0 1 38 0; sendevent /dev/input/event0 1 24 1; sendevent /dev/input/event0 1 24 0; …"
  • 12. MOET  MObile End-to-End Test  Simulator libraries androidlib.py bblib.py  Image processing library imagelib.py  Testing utilities library testlib.py logger.py
  • 13. Moet Framework Mobile Application Interface Device Independent Tests Runtime binding Simulator libraries Android app library BlackBerry app library androidlib.py bblib.py
  • 14.
  • 15. Test Automation Overview 1. Define application interface This interface is device-agnostic. 2. Implement the interface Implement the interface in your supported devices e.g. Android. Utilize python mobile libraries e.g. androidlib.py. 3. Write your tests Tests are device independent and reusable on all supported devices. 4. Run
  • 16. Step 1 : Define app interface class AppInterface: """ Application interface for all devices to implement """ def add(self, contact): """Add contact """ def find(self, contact): """ Find contact""" def delete(self, contact): """Delete contact"""
  • 17. Test Automation Overview 1. Define application interface This interface is device-agnostic. 2. Implement the interface Implement the interface in your supported devices. Utilize moet libraries. 3. Write your tests Tests are device independent and reusable on all supported devices. 4. Run
  • 18. Step 2 (Pearl) : Implement the interface def add(self, contact): """ Add contact """ # click add contact enter() # enter name enter(contact.getFirstname() thumbwheel('down', 1) … # save menu() enter()
  • 19. Step 2 (Android) : Implement the interface def add(self, contact): """ Add contact """ # click add contact menu() scroll(‘up’) scroll(‘right’) enter() # enter name enter(contact.getFirstname()) scroll('down') … # save menu() scroll(‘down’) enter()
  • 20. Step 2 (recap) : Implement the interface def PearlImpl(appbase.AppInterface): def AndroidImpl(appbase.AppInterface): def add(self, contact): def add(self, contact): """ Add contact """ """ Add contact """ enter() menu() enter(contact.getFirstname() scroll(‘up’) thumbwheel('down', 1) scroll(‘right’) … enter() menu() enter(contact.getFirstname()) enter() scroll(‘down’) … menu() scroll(‘down’) enter()
  • 21. Test Automation Overview 1. Define application interface This interface is device-agnostic. 2. Implement the interface Implement the interface in your supported devices e.g. Android. Utilize python mobile libraries e.g. androidlib.py. 3. Write your tests Tests are device independent and reusable on all supported devices. 4. Run
  • 22. Step 3 : Writing tests class AddContactTest(unittest.TestCase): device = testenv.getDeviceClass() def addContactWithOnlyFirstnameTest(self): self.contact.setFirstname(firstname) self.device.add(self.contact) def addContactWithOnlyLastnameTest(self): self.contact.setLastname(lastname) self.device.add(self.contact)
  • 23. Step 3 : Runtime binding def getDeviceClass(self): """ Returns the device to test """ mobileDevice = self.getMobileDevice() if mobileDevice == 'pearl': import pearl deviceClass = pearl.PearlImpl() elif mobileDevice == ‘android': import android deviceClass = android.AndroidImpl() return deviceClass
  • 24. More device-independent tests Additional tests are easy to write def addContactWithEmailTest(self): def addContactWithAddressesTest(self): def addContactWithAllDetailsTest(self): def addContactWithLongDetailsTest(self): def addContactAddressWithStateZip(self): def addContactAddressWithCityStateZip(self): def addContactAddressWithNoDataNegativeTest(self):
  • 25. Step 4 : Run  Basic run command  python <test.py>  Python test frameworks  unittest  PyUnit  python-nose
  • 26. Test Verification  Server hosted apps  API assertions  Database assertions  Image assertions self.assertTrue( imagelib.compare( self.device, testname, '100%x90%‘, tolerance)) # Crop settings examples # 100%x80%+10%+20% (crop size + offset) # 320x90+0+0 # +0+90
  • 27. Test Logging  Logs AddressTest.log : 2010-06-10 15:19:46,773 - testCreateAddressMethod - INFO - [Address] 200 Villa St Mountain View CA 94040 BUSINESS ADDRESS  Initialization self.log = self.device.initLogger(self._testMethodName, self.__class__.__name__)  Usage self.log.info('Starting test: ' + self._testMethodName) self.log.debug(self.contact) self.log.error(‘Missing image to compare’)
  • 28. Demo  Simulators  Android  BlackBerry Pearl  Moet  Test automation  Address book app ○ Add contact ○ Find contact ○ Delete contact
  • 29. Advantages  Low cost and ease of use  Reusable end-to-end tests  No device sharing/scheduling  Bigger device pool  Reduce manual testing time  Run on developer machines  Debugging capabilities
  • 30. Limitations  Requires ethernet or internet connectivity  Does not simulate network performance  Does not support hardware controls testing  Dependent on simulator reliability  Limited peer-to-peer applications testing
  • 31. Resources MOET http://github.com/eing/moet/ Android  Emulator http://developer.android.com/guide/developing/tools/emulator.html ADB http://android-dls.com/wiki/index.php?title=ADB Forum http://developer.android.com/resources/community-groups.html BlackBerry  Downloads http://na.blackberry.com/eng/developers/javaappdev/javadevenv.jsp Fledge Controller http://docs.blackberry.com/en/developers/deliverables/6338/Testing_apps_using_the_ BBSmrtphnSmltr_607559_11.jsp Forum http://supportforums.blackberry.com/
  • 32. Q&A