A Data Driven Automated Test

fanaticalpumaΜηχανική

5 Νοε 2013 (πριν από 3 χρόνια και 5 μήνες)

94 εμφανίσεις

A Data Driven Automated Test
Framework for Android

Ahmed Misbah

Ahmed Aswani

Agenda

Testing ??!!!!

Types of Testing

How People Test Software

The Manual Way

It is Bad!

The Solution (The Automated Way)

How to Implement Automation

The Wonderful TDD

Automation Steps

Words on Automation

Our Solution and Experience



Testing??!!!!

UNIT TESTING

INTEGRATION TESTING

ACCEPTANCE /functional TESTING

Performance TESTING

UI TESTING


HOW WE TEST

HOW

Wonderful TDD

Write Clean Testable Code

Integration Test

Data Driven

LOAD TEST

PERFORMANCE TEST

The most Useful tool for JAVA

reliable [ri
-
lahy
-
uh
-
buhl]

that may be relied on;

dependable in Achievement,


accuracy,

Trust In Your Machine

Don't Wast your Effort

How Far automation should I go ?!

MANUAL IS IMPORTANT

Change Is Hard.... In the beginning Only

Our Solution and Experience


DDT Library for Android

The story behind

IM Application

XMPP Server

Registration

Presence

Edit Profile

Messaging

Manual Testing Scenario

Quality Engineer would have to register users
manually (
6 mandatory fields
)


QE would enter each user’s Roster (
must
exceed 22 to test paginatio
n)


QE should take care of user names for sorting

Manual Testing Scenario

Verify User Login


Verify that Roster was loaded correctly


Verify that Roster is sorted correctly


Verify that pagination is working


Do the same when bugs are fixed and during
regression

Test Results

Quality Engineer
of course

Conclusions

Needed to apply Automated Testing


Some cases had to be handled using DDT


Why a new library?

None exists !!!


Time was tight to learn anything new


Leverage benefits of Automated Testing



The Library

Test Data

Expected Output

Automated Test Framework

Test Results

JSON file

JUnit

for Android

DDT Library

Test
Results

Your Code

How it works?

How it works?

How it works?

Under the hood

Java


Google
Gson

library
(
http://code.google.com/p/google
-
gson/
)

Benefits of the library

Its free!! Its Open Source!!


Works on anything that is Java, even Android


Almost no learning curve (i.e. Its easy!!)

Drawbacks

Needs more work


All drawbacks of Automated Testing and DDT



Future work

Eclipse
plugin



Construct JSON files,


Auto generate Data objects,


Map data to code that will be tested,


Generate
junit

test cases,


Generate better test results (Expected Output and
Actual Output)

Questions ???

Thank you