from desktop to wearable to testing belgium testing days 2015 alfonso nocella, maveryx

30
From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

Upload: godwin-gilbert

Post on 23-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

From Desktop to Wearable to Testing

Belgium Testing Days 2015

Alfonso Nocella, Maveryx

Page 2: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

2

Summary

From Desktop to Mobile to Wearable

Testing : Diversity leads to Complexity

“SHE” : Shrink, Hide, Eliminate

All trademarks referenced herein are the properties of their respective owners.

Page 3: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

3

SummaryFrom Desktop to Mobile to Wearable

Testing : Diversity leads to Complexity

“SHE” : Shrink, Hide, Eliminate

All trademarks referenced herein are the properties of their respective owners.

Page 4: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

4

From Desktop to Mobile to Wearable

UNIVAC I – 1951

Apple II – 1977

IPhone – 2007

Glass – 2012

Page 5: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

5

Different devices, architectures …

5.8’’ – … – 10’.7’

2.8’’ – … – 6’’

Page 6: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

6

Different operating systems …

Page 7: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

7

Different frameworks …

Page 8: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

8

And now… (?!?)

Devices…

Applications…

Page 9: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

9

Cross-Platform App Development

Companies are requested to deliver their software products

not only for PC but also, and sometimes primarily, for mobile

devices

And Testing?(automation)

Page 10: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

10

SummaryFrom Desktop to Mobile to Wearable

Testing : Diversity leads to Complexity

“SHE” : Shrink, Hide, Eliminate

All trademarks referenced herein are the properties of their respective owners.

Page 11: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

11

Diversity is often synonym of Complexity

Problem: proliferation of test artifacts (tools, scripts, data,

UI maps …) to be developed, captured, & maintained upon

passing from one environment to another, with a significant

impact on time, effort and costs.

Page 12: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

12

SummaryFrom Desktop to Mobile to Wearable

Testing : Diversity leads to Complexity

“SHE” : Shrink, Hide, Eliminate

All trademarks referenced herein are the properties of their respective owners.

Page 13: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

13

“SHE” : handle diversity

“SHE” : Shrink, Hide, Embody (design principle)

[J. Maeda : The Laws of Simplicity]

“SHE” : Shrink, Hide, Eliminate (software testing)

Shrink : test design

Hide : complexity

Eliminate: unnecessary artifacts (UI Maps et al.)

Page 14: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

14

An Example

Test Tool : Maveryx

Test Data : Excel

Test IDE : Eclipse (Juno)

JDK / JRE : v1.8

Android : v5.0

Page 15: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

15

Shrink. Test Design.

Write once, run many. Design tests that can be run without

modification on different devices.

Pros: reduced number of scripts to be developed and

maintained

Cons: could add a little bit complexity into the tests

Page 16: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

16

Shrink. Method.

1. Identify common features

2. Create the tests (common features)

3. Identify differences

4. Manage differences

5. Create new tests (for unmanageable differences)

(*) Use a Data-driven approach (both for UI and test data)

(**) Could use a Keyword-driven approach

Page 17: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

17

Shrink. Method.

1. Identify common features

2. Create the tests

3. Identify differences

4. Manage differences

5. Create new tests

Common features are all characteristics

(functional, UI…) that can be tested “as is”,

without any modification.

Page 18: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

18

Shrink. Method.

1. Identify common features

2. Create the tests

3. Identify differences

4. Manage differences

5. Create new tests

… and much more …

Page 19: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

19

Shrink. Method.

1. Identify common features

2. Create the tests

3. Identify differences

4. Manage differences

5. Create new tests

Differences occur in:

• Labels (in yellow)

• Paths (e.g. menus, screens…)

• …

And are:

• Manageable (in the same script)

• Un-manageable

Page 20: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

20

Shrink. Method.

1. Identify common features

2. Create the tests

3. Identify differences

4. Manage differences

5. Create new tests

Use a data driven approach to store data

for each platform.

Page 21: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

21

Shrink. Method.

1. Identify common features

2. Create the tests

3. Identify differences

4. Manage differences

5. Create new tests

Page 22: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

22

Hide. Complexity.

Supporting, device-dependent functions should be “hidden” to

the testers and managed into the framework or in high-level

libraries.

Pros: more readable and maintainable tests.

Testers stay focused on writing tests rather than on supporting

functions.

Page 23: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

23

Hide. Complexity.

Supporting / device-dependent functions concern:

• Launching the application-under-test

• Switch between “views” (click, swipe, …)

• Select the device / platform to run the test on

• Using Navigation buttons ( )

• …

Page 24: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

24

Hide. Complexity. Example

• Select the device / platform to run the test on

In general you can use

JUnit’s @Rule feature

or custom annotations

Page 25: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

25

Eliminate. The Unnecessary.

Automating GUI-based applications on multiple devices and

platforms require many sets of GUI Maps (aka Test Object

Maps) to be captured and maintained.

It is a huge set of data to handle and a time consuming task.

Pro: …work on the important: write more tests.

Cons: you have to learn or develop a “new”

Test Engine.

Page 26: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

26

Eliminate. GUI Maps.

• A GUI Map describes the test objects in the application-under-test

• It is used by the automation tool to recognize the UI objects to test

• Each script is associated with a GUI Map

Our Approach

• A test automation engine in continuous development at

Maveryx together with the Engineering dept. of Napoli

University

• to which contributed also people from Nokia and Intel

Page 27: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

27

Eliminate. GUI Maps.

At runtime during test execution

takes “snapshots” of the current user interface

… and turn them into a XML documents

Information about UI elements includes: Name / Identifier {caption, tooltip …}Role / Type {button, text, checkbox …}Status {enabled, editable …}…

GUI MAPor

Image

Page 28: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

28

Eliminate. GUI Maps.

• “Classical” to Fuzzy matching algorithms to unambiguously

recognize and locate objects during test execution

• “Geolocation” of objects in the User Interface (TOP, BOTTOM, LEFT,

RIGHT …)

• Automatically accommodate UI changes without modifying the tests

TOP

BOTTOM

LEFT

RIGHT

CENTER

TOP

BOTTOM

LEFT

RIGHT

CENTER

Page 29: From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx

29

Conclusions

• Nowadays SW applications are designed to run on different devices,

from desktop to mobile to wearable

• The issue: proliferation of test artifacts (tools, scripts, data, UI maps…)

to be developed, captured, and maintained

impact on time, effort & costs

• A viable solution “SHE”:

• Shrink Test Design

• Hide Complexity

• Eliminate Unnecessary