Traversing the Test Pyramid for Android Development
-
Upload
dubinsky-soares -
Category
Education
-
view
349 -
download
4
description
Transcript of Traversing the Test Pyramid for Android Development
Traversing Test Pyramid for Android development
Dubinsky Dee SoaresJigish Chawda
Agenda
Test PyramidWhy TDD?Approaches of unit testing.Problems and solutions for unit testing.Sample tests.Functional Testing – overview.Various frameworks and approaches followed.Functional Test - demo.Continuous Integration
Test Pyramid
Functional Tests
Integration Tests
Unit Tests
Why Testing for Android?
Stable and better quality applications.
Apps are as important as the websites.
Ubiquitous.
Overview of Unit Testing in Android
Unit Test
Business logic
View validations
Behavior
Android Test Framework - Problems….
Application
ACTIVITY
POJO
• Low test coverage
• UI interactions & data
binding untested.
• Framework runs on DVM
• Time consuming
How can we solve these problems ?
ACTIVITY POJO
Virtual Machine
JVM
.class
RED
GREEN
REFACTOR
Let’s have a look at a few tests.
Overview of Functional Testing
Actual ApplicationBusiness Use CaseVisual AppearanceRealistic
Mobile ChallengesFragmentationRelease
Functional Testing Tool Expectation
Business languageExpressiveKeep up with timesRobustRealismCI Support
Functional Test : Approaches
Instrumented technique
Non- Instrumented technique
Calabash
Robotium
Functional Testing : Instrumented Approach
Android Testing Framework
• DSL
• Flexible APIs
• WebView support.
• Support iOS & Android
• Continuous Integration
A Demo - Calabash-android
Functional Testing : Non Instrumentation
Not restricted to one AppCustom ComponentsExternal Interactions Hardware Drivers
ToolsUI Automator, HoneyDew, Appium
Continuous Integration
CI BOX Pass
Fail
References
http://robolectric.org/http://martinfowler.com/bliki/TestPyramid.htmlhttp://developer.android.com/tools/testing/testing_android.htmlhttps://github.com/androidbootcamp/RobolectricDemo/tree/mds_demohttps://github.com/calabash/calabash-androidhttps://github.com/amplify-education/honeydew
You can reach us at
Jigish Chawda:Twitter: @jigishchawdaGithub: https://github.com/jigishchawda
Dubinsky Dee Soares:Twitter: @dubinskysoaresGithub: https://github.com/dubinskysoares