SlideShare uma empresa Scribd logo
1 de 33
Baixar para ler offline
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

Mais conteúdo relacionado

Último

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
[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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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...Miguel Araújo
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
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 Scriptwesley chun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Último (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
[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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - 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...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Destaque

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
 

Destaque (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