Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
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
• W...
Automation Key
Mobile Testing Approach
Mobile Automation Approach
App

AndroidManifest.xml

res/

…

src/

…

tests/

AndroidManifest.xml

res/

…

src/

…
Unit Testing
Resources & Source ...
Automating Acceptance
Frameworks For Functional Tests
App

AndroidManifest.xml

res/

…

src/

…

tests/

AndroidManifest.xml

res/

…

src/

…

features

step_definitions/

sup...
Feature: One Time Password
Scenario: User Sends OTP
Given I launch the OTP App

Then I see the One Time Password

And I se...
Feature: One Time Password
Scenario: User Sends OTP
Given I launch the OTP App

Then I see the One Time Password

And I se...
Feature: One Time Password
Scenario: User Sends OTP
Given I launch the OTP App

When I touch the Send Code Button

Then I ...
Feature: One Time Password
Scenario: User Sends OTP
Given I launch the OTP App

When I send the OTP Code

Then the OTP Cod...
Given(/^I launch the OTP App$/) do

app.launch

end
When(/^I send the OTP Code$/) do

OTPscreen.send_code

end
Then(/^the ...
Mobile Abstraction Layer
• Cross Platform, Open Source
• Supported By Xamarin
• Interact with native and hybrid apps
• Gestures
• Assertions
• Scre...
How It Works
• Cross Platform, Open Source
• Supported By Sauce Labs
• Interact with web, native and hybrid apps
• Gestures
• Assertion...
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 ...
• www.junit.org
• www.rspec.info
• www.jbehave.org
• www.cukes.info
• http://jasmine.github.io
Links To Frameworks
• www.sqaessentials.com
• melvin@sqaessentials.com
• Twitter: @mlaguren
• github.com/mlaguren
Contacting Melvin
Upcoming SlideShare
Loading in …5
×

Automating android

2,128 views

Published on

Presentation on Automation and CI for Bay Area Android Developer Group MeetUp on March 25, 2014. Details here: http://bit.ly/NZjkMh

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Automating android

  1. 1. Automating Android! ! By Melvin Laguren
  2. 2. Traditional Testing Triangle
  3. 3. Unit Testing • Checks A Single Use Case • No Dependencies • Fast • Repeatable
  4. 4. Integration Tests • Combining Units Together • Data Dependency • Test Multiple Things • Slower
  5. 5. Functional Test • Black Box Testing • Describes What The System Does
  6. 6. 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
  7. 7. Automation Key
  8. 8. Mobile Testing Approach
  9. 9. Mobile Automation Approach
  10. 10. App
 AndroidManifest.xml
 res/
 …
 src/
 …
 tests/
 AndroidManifest.xml
 res/
 …
 src/
 … Unit Testing Resources & Source For Main Application Resources and Source For Tests
  11. 11. Automating Acceptance
  12. 12. Frameworks For Functional Tests
  13. 13. App
 AndroidManifest.xml
 res/
 …
 src/
 …
 tests/
 AndroidManifest.xml
 res/
 …
 src/
 …
 features
 step_definitions/
 support/ Acceptance Testing App
 Android/
 iOS/
 features/
 step_definitions/
 support/
  14. 14. 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
  15. 15. 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
  16. 16. 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
  17. 17. 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
  18. 18. Given(/^I launch the OTP App$/) do
 app.launch
 end When(/^I send the OTP Code$/) do
 OTPscreen.send_code
 end Then(/^the OTP Code is sent$/) do
 OTPscreen.code_sent
 end Step Definitions
  19. 19. Mobile Abstraction Layer
  20. 20. • Cross Platform, Open Source • Supported By Xamarin • Interact with native and hybrid apps • Gestures • Assertions • Screenshots • Requires Instrumented Build Calabash
  21. 21. How It Works
  22. 22. • Cross Platform, Open Source • Supported By Sauce Labs • Interact with web, native and hybrid apps • Gestures • Assertions • Screenshots • Does Not Require Instrumented Build Appium
  23. 23. How It Works
  24. 24. • Commercial Option by SOASTA • Records gestures (Record and Playback) • Image validation • Visual Test Creation TouchTest
  25. 25. • Commercial Option by SOASTA • Records gestures (Record and Playback) • Image validation • Visual Test Creation TouchTest
  26. 26. Common Issue
  27. 27. Emulator or Device
  28. 28. • Cost is a factor • Functionality not dependent on device profile • Latency ! Use Emulator
  29. 29. • Test Dependent On Profile • Functionality not dependent on device profile • Latency ! Use Device
  30. 30. Continuous Integration
  31. 31. Stage 1 Testing - Emulators
  32. 32. Stage 2 Testing - Devices
  33. 33. Another Approach
  34. 34. • www.sqaessentials.com • www.calaba.sh => www.xamarin.com • www.appium.io => www.saucelabs.com • www.soasta.com Links To Automation Tools
  35. 35. • www.junit.org • www.rspec.info • www.jbehave.org • www.cukes.info • http://jasmine.github.io Links To Frameworks
  36. 36. • www.sqaessentials.com • melvin@sqaessentials.com • Twitter: @mlaguren • github.com/mlaguren Contacting Melvin

×