Traversing the Test Pyramid for Android Development
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Traversing the Test Pyramid for Android Development

on

  • 589 views

Dubinsky and Jigish walk through the testing practices followed by an Agile Team while building Mobile Applications. ...

Dubinsky and Jigish walk through the testing practices followed by an Agile Team while building Mobile Applications.

In this talk they traverse the Testing pyramid focussing on the importance of the balance of Unit/Functional automated tests.
They go on to talk about how to integrate all of these tests with your CI server to deliver high quality applications.



Mobile Developer Summit 2013 Bangalore http://www.developermarch.com/mds/index.html

Statistics

Views

Total Views
589
Views on SlideShare
585
Embed Views
4

Actions

Likes
1
Downloads
4
Comments
0

3 Embeds 4

http://www.linkedin.com 2
http://in.linkedin.com 1
https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Ask opening questions.How many of you know about the Test Pyramid?How many of you practice TDD in normal software development?Explain pyramidWhat to test at each level?Tell them a story.- I joined a mobile development project one and a half years back, knowing nothing about Android development, nothing about TDD in Android development. We continued to write code without tests. Being a TDD fanatic, at some point in time, questions arose in our minds: Why are we not testing the code base? ; Why have we not thought of using TDD approach for the development?The overall answer to these questions came out to be MATURITY. Maturity of testing frameworks available out there. Maturity of Android to support testing during application development.From that point onward, we have started finding viable solutions for testing the Android mobile application.We think that our experience ought to be told to a larger audience.
  • Mobile apps were not the main stream business, when android was in its infancy. Hence not much attention was given to app development.The ubiquity of Android increased with pace greater than its maturity and tools for app development. At this time, it was a great opportunity for the small and big enterprise to reach to the larger audience and penetrate different markets. This became a serious money making business and suddenly there was a need for stable and better quality mobile apps in the market place. Think about a case when you have an app in the market store and people are cribbing about this bug or problem? TDD has always proved to churn out quality software. Since apps have become equally important as the website, testing your android code is not an option. It’s a priority.
  • Unit testing is being used for quite a while for android development, however over time the approach has changed and improved.Android SDK ships Android Instrumentation Framework, which provides ability to test your code.What to test and what not to ?Why more unit tests
  • Statistics: 100 tests run 23s in robolectric
  • We will show code sample here.
  • Points to be covered:Why and when functional testing in android?Story
  • You can develop powerful test cases, with minimal knowledge of the application under test.The framework handles multiple Android activities automatically.Minimal time needed to write solid test cases.Readability of test cases is greatly improved, compared to standard instrumentation tests.Test cases are more robust due to the run-time binding to GUI components.Fast test case execution.Integrates smoothly with Maven or Ant to run tests as part of continuous integration.
  • We will show a sample project here
  • USEcasesHoneyDew – ShamlessMsrketing
  • To put things in perspective, we run the entire pyramid

Traversing the Test Pyramid for Android Development Presentation Transcript

  • 1. Traversing Test Pyramid for Android development Dubinsky Dee Soares Jigish Chawda
  • 2. Agenda Test Pyramid Why 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
  • 3. Test Pyramid Functional Tests Integration Tests Unit Tests
  • 4. Why Testing for Android? Stable and better quality applications. Apps are as important as the websites. Ubiquitous.
  • 5. Overview of Unit Testing in Android Business logic View validations Behavior Unit Test
  • 6. Android Test Framework - Problems…. • • ACTIVITY • Low test coverage • UI interactions & data binding untested. POJO Framework runs on DVM Time consuming
  • 7. How can we solve these problems ? ACTIVITY POJO RED .class REFACTOR Virtual Machine GREEN JVM
  • 8. Let’s have a look at a few tests.
  • 9. Overview of Functional Testing Actual Application Business Use Case Visual Appearance Realistic Mobile Challenges Fragmentation Release
  • 10. Functional Testing Tool Expectation Business language Expressive Keep up with times Robust Realism CI Support
  • 11. Functional Test : Approaches Instrumented technique Non- Instrumented technique
  • 12. Functional Testing : Instrumented Approach • Android Testing Framework Flexible APIs WebView support. • Robotium • • Calabash DSL Support iOS & Android • Continuous Integration
  • 13. A Demo - Calabash-android
  • 14. Functional Testing : Non Instrumentation Not restricted to one App Custom Components External Interactions Hardware Drivers Tools UI Automator, HoneyDew, Appium
  • 15. Continuous Integration CI BOX Pass Fail
  • 16. References http://robolectric.org/ http://martinfowler.com/bliki/TestPyramid.html http://developer.android.com/tools/testing/testing_android.html https://github.com/androidbootcamp/RobolectricDemo/tree/mds _demo https://github.com/calabash/calabash-android https://github.com/amplify-education/honeydew
  • 17. You can reach us at Jigish Chawda: Twitter: @jigishchawda Github: https://github.com/jigishchawda Dubinsky Dee Soares: Twitter: @dubinskysoares Github: https://github.com/dubinskysoares