Variability vs. Repeatability An Experience Report Jonathan Li On - - PowerPoint PPT Presentation

variability vs repeatability an experience report
SMART_READER_LITE
LIVE PREVIEW

Variability vs. Repeatability An Experience Report Jonathan Li On - - PowerPoint PPT Presentation

Variability vs. Repeatability An Experience Report Jonathan Li On Wing Introduction This talk is about my experience in adding some variability to automated testing and what I learned about it 2 My Historical Approach To Testing Manual


slide-1
SLIDE 1

Variability vs. Repeatability

An Experience Report

Jonathan Li On Wing

slide-2
SLIDE 2

Introduction

This talk is about my experience in adding some variability to

automated testing and what I learned about it

2

slide-3
SLIDE 3

My Historical Approach To Testing

Manual Testing

known inputs and expected outputs

Automated Testing

automating the manual tests

Exploratory

no fixed inputs and adapt tests

Automated Testing with variability

3

slide-4
SLIDE 4

EXAMPLES EXAMPLES

slide-5
SLIDE 5

Example 1

Get all the hotels in a given city

slide-6
SLIDE 6

Example 1

Get all the hotels in a given city

slide-7
SLIDE 7

Example 1

Get all the hotels in a given city

slide-8
SLIDE 8

Example 2

Get the details of a given hotel

slide-9
SLIDE 9

METHODOLOGY METHODOLOGY

slide-10
SLIDE 10

Previous Methodology

Data driven testing

expected inputs matched with expected outputs

10

DB Web Service Test Client Input/Output

slide-11
SLIDE 11

Implemented Methodology

01 testGetHotelDetails() { 02 //Get 10 random hotels 03 List<Hotel> hotels = DBWrapper.getRandomHotel(10); 04 foreach (Hotel hotel in hotels) { 05 Response response = HttpClient.getHotels(hotel); 06 Hotel hotelReturned = new Hotel(response); 07 Oracle.assertEquals(hotel, hotelReturned); 08 } 09 }

11

DB Web Service Test Controller HTTP Client Oracle

slide-12
SLIDE 12

Implemented Methodology

01 testAllHotelsBelongInRegion() { 02 //Get 10 random regions 03 List<Region> regionsToTestWith = DBWrapper.getRandomRegion(10); 04 foreach (Region region in regionsToTestWith) { 05 Response response = HttpClient.getHotelsInRegion(region); 06 Oracle.assertVerifyHotelsBelongInRegion(response, region); 07 } 08 }

12

DB Web Service Test Controller HTTP Client Oracle

slide-13
SLIDE 13

OBSER OBSERVATIONS TIONS

slide-14
SLIDE 14

Time

Initial construction took longer Creating test cases could be

faster and up to 3 times slower

Maintenance of tests is generally

easier and faster

14

slide-15
SLIDE 15

Bugs

About 10% more bugs found Majority of these bugs were

low priority

Majority of the these were also real data issues

15

A B D ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡C ¡ E

slide-16
SLIDE 16

Confidence

Hard to measure Test team felt more confident

not testing the same data

  • ver and over again

tested more permutations than I can in a lifetime

16

slide-17
SLIDE 17

Comparison

17

Variability ariability Uncover more bugs Easier to maintain Generates more confidence Tests more variations Good for large data sets Repeatability Repeatability Faster to develop initially Lower coding bar Predictable

slide-18
SLIDE 18

Criticisms

Lack of repeatability and predictability Duplicating feature work Testing the tests

18

slide-19
SLIDE 19

Future work

Add ease of r Add ease of repeatability epeatability

Replay based on logs or test session id with a seed

Adaptable tests Adaptable tests

Use machine learning and statistical analysis to allow tests to explore areas on its own

19 ¡

slide-20
SLIDE 20

Thank you.

Jonathan Li On Wing Software Development Engineer in Test Groupon | Getaways jwing@groupon.com | jonathan.lionwing@mail.mcgill.ca