Download - BDT goes mobile

Transcript
Page 1: BDT goes mobile

Raman Kansal & Kriti Mehta

BDT goes Mobile!!!

Page 2: BDT goes mobile

Evolution of test frameworks

Core Frameworks

Record & Playback

Optimized scripts

Behavior Driven Testing(BDT)

Page 3: BDT goes mobile

Lets start with an example

USER ATM MONEY

Page 4: BDT goes mobile

Test cases:Valid card,Invalid card,Valid amount, Invalid amount etc

Methods:validate_card()verify_cash()debit_cash()

*Validating card*Verifying the account*Debit cash*Ensure correct balance in account

4

User

QA

BA

Developer

BUT I wanted to withdraw cash

from atm !!!

Page 5: BDT goes mobile

Let's do it BDT way!

5

UserQA BA Dev

Functionality

Test Cases

BehaviorImplementation

Page 6: BDT goes mobile

Why is BDT an advantage?

Usable domain language for team as well as domain experts/clients

Never have to rewrite specs, since the behavior does not change.

Fixing context implementations , less painful than to rewrite tests

Supports multiple languagesExample: Cucumber supports 30 different languages.

Page 7: BDT goes mobile

So the future is mobile!!

Page 8: BDT goes mobile

BDT mobile testing tools

Calabash-iOSCalabash-Android

Frank(iOS)

Robotium(Android)

FoneMonkey(iOS)

Appium

SikuliEggPlant

Page 9: BDT goes mobile

Calabash- iOS

Automated testing technology

For iOS native and hybrid applications

Cucumber based

Page 10: BDT goes mobile

How it works?

Page 11: BDT goes mobile

DEMOPre-Requisite – MacOS with xcode and Ruby

DEMO

Setup

Features

Execution

Steps

Query

Page 12: BDT goes mobile

Useful calabash commandscd path-to-my-ios-project (i.e. directory containing .xcodeproj file)

gem install calabash-cucumber

calabash-ios gen

calabash-ios setup

Cucumber /NO_LAUNCH=1 DEVICE=iphone OS=ios5 DEVICE_ENDPOINT=http://192.168.1.37:37265 cucumber

calabash-ios console

Page 13: BDT goes mobile

Custom steps(.feature and .rb file)

Page 14: BDT goes mobile

Pros

➢ Uniform interface across platforms

➢ Supports complex gestures

➢ Authenticity

➢ Cucumber

➢ Extensibility and community

Page 15: BDT goes mobile

Useful links➢ Calabash ios setup: https://github.com/calabash/calabash-ios

➢ Calabash android setup:https://github.com/calabash/calabash-android

➢ IOS - Application used in Demo:https://github.com/Frahaan/2012-Olympics-iOS--iPad-and-iPhone--source-code

➢ Calabash cucumber doc:https://github.com/calabash/calabash-ios/blob/0.9.x/calabash-cucumber/doc/x-platform-testing.md

➢ Calabash tests execution:https://github.com/calabash/calabash-ios/wiki/07-Testing-on-physical-iDevices

➢ Calabash landing page:http://calaba.sh/

➢ Less-Painful -Automated App testing:https://www.lesspainful.com/

➢ Pre-defined steps:https://github.com/calabash/calabash-ios/wiki/02-Predefined-steps

➢ Calabash iOS ruby API:https://github.com/calabash/calabash-ios/wiki/03.5-Calabash-iOS-Ruby-API

Page 16: BDT goes mobile

Questions ??