Traversing the Test Pyramid for Android Development

17
Traversing Test Pyramid for Android development Dubinsky Dee Soares Jigish Chawda

description

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

Transcript of Traversing the Test Pyramid for Android Development

Page 1: Traversing the Test Pyramid for Android Development

Traversing Test Pyramid for Android development

Dubinsky Dee SoaresJigish Chawda

Page 2: Traversing the Test Pyramid for Android Development

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

Page 3: Traversing the Test Pyramid for Android Development

Test Pyramid

Functional Tests

Integration Tests

Unit Tests

Page 4: Traversing the Test Pyramid for Android Development

Why Testing for Android?

Stable and better quality applications.

Apps are as important as the websites.

Ubiquitous.

Page 5: Traversing the Test Pyramid for Android Development

Overview of Unit Testing in Android

Unit Test

Business logic

View validations

Behavior

Page 6: Traversing the Test Pyramid for Android Development

Android Test Framework - Problems….

Application

ACTIVITY

POJO

• Low test coverage

• UI interactions & data

binding untested.

• Framework runs on DVM

• Time consuming

Page 7: Traversing the Test Pyramid for Android Development

How can we solve these problems ?

ACTIVITY POJO

Virtual Machine

JVM

.class

RED

GREEN

REFACTOR

Page 8: Traversing the Test Pyramid for Android Development

Let’s have a look at a few tests.

Page 9: Traversing the Test Pyramid for Android Development

Overview of Functional Testing

Actual ApplicationBusiness Use CaseVisual AppearanceRealistic

Mobile ChallengesFragmentationRelease

Page 10: Traversing the Test Pyramid for Android Development

Functional Testing Tool Expectation

Business languageExpressiveKeep up with timesRobustRealismCI Support

Page 11: Traversing the Test Pyramid for Android Development

Functional Test : Approaches

Instrumented technique

Non- Instrumented technique

Page 12: Traversing the Test Pyramid for Android Development

Calabash

Robotium

Functional Testing : Instrumented Approach

Android Testing Framework

• DSL

• Flexible APIs

• WebView support.

• Support iOS & Android

• Continuous Integration

Page 13: Traversing the Test Pyramid for Android Development

A Demo - Calabash-android

Page 14: Traversing the Test Pyramid for Android Development

Functional Testing : Non Instrumentation

Not restricted to one AppCustom ComponentsExternal Interactions Hardware Drivers

ToolsUI Automator, HoneyDew, Appium

Page 15: Traversing the Test Pyramid for Android Development

Continuous Integration

CI BOX Pass

Fail

Page 17: Traversing the Test Pyramid for Android Development

You can reach us at

Jigish Chawda:Twitter: @jigishchawdaGithub: https://github.com/jigishchawda

Dubinsky Dee Soares:Twitter: @dubinskysoaresGithub: https://github.com/dubinskysoares