Automating android
-
Upload
melvin-laguren -
Category
Technology
-
view
829 -
download
1
description
Transcript of Automating android
Automating Android!!
By Melvin Laguren
Traditional Testing Triangle
Unit Testing
• Checks A Single Use Case
• No Dependencies
• Fast
• Repeatable
Integration Tests
• Combining Units Together
• Data Dependency
• Test Multiple Things
• Slower
Functional Test
• Black Box Testing
• Describes What The System Does
5 Steps To Functional Testing
• Determination of the functionality
• Creation of test data
• Output based on test data
• Writing of test scenarios
• Comparison of actual and expected results
Automation Key
Mobile Testing Approach
Mobile Automation Approach
App AndroidManifest.xml res/ … src/ … tests/ AndroidManifest.xml res/ … src/ …
Unit Testing
Resources & Source For Main Application
Resources and Source For Tests
Automating Acceptance
Frameworks For Functional Tests
App AndroidManifest.xml res/ … src/ … tests/ AndroidManifest.xml res/ … src/ … features step_definitions/ support/
Acceptance Testing
App Android/ iOS/ features/ step_definitions/ support/
Feature: One Time Password
Scenario: User Sends OTP
Given I launch the OTP App Then I see the One Time Password And I see the time left And I see the Credential ID And I see the Send Code Button When I touch the Send Code Button Then I see the progress bar
Feature File
Feature: One Time Password
Scenario: User Sends OTP
Given I launch the OTP App Then I see the One Time Password And I see the time left And I see the Credential ID And I see the Send Code ButtonWhen I touch the Send Code Button Then I see the progress bar
Feature File
Feature: One Time Password
Scenario: User Sends OTP
Given I launch the OTP App When I touch the Send Code Button Then I see the progress bar
Feature File
Feature: One Time Password
Scenario: User Sends OTP
Given I launch the OTP App When I send the OTP Code Then the OTP Code is sent
Feature File
Given(/^I launch the OTP App$/) do app.launchend
When(/^I send the OTP Code$/) do OTPscreen.send_code end
Then(/^the OTP Code is sent$/) do OTPscreen.code_sent end
Step Definitions
Mobile Abstraction Layer
• Cross Platform, Open Source
• Supported By Xamarin
• Interact with native and hybrid apps
• Gestures
• Assertions
• Screenshots
• Requires Instrumented Build
Calabash
How It Works
• Cross Platform, Open Source
• Supported By Sauce Labs
• Interact with web, native and hybrid apps
• Gestures
• Assertions
• Screenshots
• Does Not Require Instrumented Build
Appium
How It Works
• Commercial Option by SOASTA
• Records gestures (Record and Playback)
• Image validation
• Visual Test Creation
TouchTest
• Commercial Option by SOASTA
• Records gestures (Record and Playback)
• Image validation
• Visual Test Creation
TouchTest
Common Issue
Emulator or Device
• Cost is a factor
• Functionality not dependent on device profile
• Latency
!
Use Emulator
• Test Dependent On Profile
• Functionality not dependent on device profile
• Latency
!
Use Device
Continuous Integration
Stage 1 Testing - Emulators
Stage 2 Testing - Devices
Another Approach
• www.sqaessentials.com
• www.calaba.sh => www.xamarin.com
• www.appium.io => www.saucelabs.com
• www.soasta.com
Links To Automation Tools
• www.junit.org
• www.rspec.info
• www.jbehave.org
• www.cukes.info
• http://jasmine.github.io
Links To Frameworks
• www.sqaessentials.com
• Twitter: @mlaguren
• github.com/mlaguren
Contacting Melvin