54
Shauvik Roy Choudhary, Husayn Versee, and Alessandro Orso Georgia Institute of Technology Partially supported by the NSF awards CCF-0916605 and CCF-0725202 to Georgia Tech

Automated Identification of Cross-browser Issues in Web Applications

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Automated Identification of Cross-browser Issues in Web Applications

Shauvik Roy Choudhary, Husayn Versee, and Alessandro OrsoGeorgia Institute of Technology

Partially supported by the NSF awards CCF-0916605 and CCF-0725202 to Georgia Tech

Page 2: Automated Identification of Cross-browser Issues in Web Applications

2

Page 3: Automated Identification of Cross-browser Issues in Web Applications

3

Page 4: Automated Identification of Cross-browser Issues in Web Applications

4

Page 5: Automated Identification of Cross-browser Issues in Web Applications

Server Side(Web Application Server)

HTTP Request

5

Page 6: Automated Identification of Cross-browser Issues in Web Applications

Server Side(Web Application Server)

HTTP Request

HTTP Response

6

Page 7: Automated Identification of Cross-browser Issues in Web Applications

Server Side(Web Application Server)

HTTP Request

HTTP Response

7

Page 8: Automated Identification of Cross-browser Issues in Web Applications

Server Side(Web Application Server)

HTTP Request

HTTP Response

<html><head><script src="script.js"></script><link href="style.css" rel="stylesheet" />

</head><body><h1>Ajax Search:</h1><input type="text" id="query" /><input type="button" onclick="search()"

value="Search" /><h2>Results:</h2><div id="stats"></div><ul id="results"></ul>

</body></html>

8

Page 9: Automated Identification of Cross-browser Issues in Web Applications

Server Side(Web Application Server)

HTTP Request

HTTP Response

<html><head><script src="script.js"></script><link href="style.css" rel="stylesheet" />

</head><body><h1>Ajax Search:</h1><input type="text" id="query" /><input type="button" onclick="search()"

value="Search" /><h2>Results:</h2><div id="stats"></div><ul id="results"></ul>

</body></html>

body

h1 input input h2 div ul

document

head

script link

9

Page 10: Automated Identification of Cross-browser Issues in Web Applications

Server Side(Web Application Server)

HTTP Request

HTTP Response

<html><head><script src="script.js"></script><link href="style.css" rel="stylesheet" />

</head><body><h1>Ajax Search:</h1><input type="text" id="query" /><input type="button" onclick="search()"

value="Search" /><h2>Results:</h2><div id="stats"></div><ul id="results"></ul>

</body></html>

body

h1 input input h2 div ul

document

head

script link

No shadow

Result count

Displaced border

10

Page 11: Automated Identification of Cross-browser Issues in Web Applications

11

Page 12: Automated Identification of Cross-browser Issues in Web Applications

Mozilla Firefox Internet Explorer12

Page 13: Automated Identification of Cross-browser Issues in Web Applications

13

Page 14: Automated Identification of Cross-browser Issues in Web Applications

14

Page 15: Automated Identification of Cross-browser Issues in Web Applications

15

Page 16: Automated Identification of Cross-browser Issues in Web Applications

16

Page 17: Automated Identification of Cross-browser Issues in Web Applications

17

Page 18: Automated Identification of Cross-browser Issues in Web Applications

18

Page 19: Automated Identification of Cross-browser Issues in Web Applications

Manual inspectionis expensive

Mimic end user’sperception

Locate broken element in code

DOM differs between browsers

Ignore variable elementson webpage

Even work with browser security controls

19

Page 20: Automated Identification of Cross-browser Issues in Web Applications

Goal:Compare behavior of web pages in different browsers

High level view of the approach:

Data collection Ignore variable elements

Structuralanalysis

Visualanalysis

Report

20

Page 21: Automated Identification of Cross-browser Issues in Web Applications

From each browser under consideration, the technique collects:

Visual Information (Screenshot)

( tagname, id, xpath, coord, clickable, visible, zindex, hash )

Structural Information (DOM)

body

div divdiv

h1 a ul div div

divul

div div div

div

21

Page 22: Automated Identification of Cross-browser Issues in Web Applications

Load page twice in reference browser:

body

div divdiv

h1 a ul div div

divul

div div div

div

body

div divdiv

h1 a ul div div

ul

div div div

divdiv

22

Page 23: Automated Identification of Cross-browser Issues in Web Applications

Load page twice in reference browser:

body

div divdiv

h1 a ul div div

divul

div div div

div

body

div divdiv

h1 a ul div div

ul

div div div

divdiv

23

Page 24: Automated Identification of Cross-browser Issues in Web Applications

Page in reference browser over two subsequent requests:

24

Page 25: Automated Identification of Cross-browser Issues in Web Applications

Page in reference browser over two subsequent requests:

25

Page 26: Automated Identification of Cross-browser Issues in Web Applications

Page in reference browser over two subsequent requests:

26

Page 27: Automated Identification of Cross-browser Issues in Web Applications

Page in reference browser over two subsequent requests:

27

Page 28: Automated Identification of Cross-browser Issues in Web Applications

Page in reference browser over two subsequent requests:

28

Page 29: Automated Identification of Cross-browser Issues in Web Applications

Page in reference browser over two subsequent requests:

29

Page 30: Automated Identification of Cross-browser Issues in Web Applications

Page in reference browser over two subsequent requests:

30

Page 31: Automated Identification of Cross-browser Issues in Web Applications

Match the nodes in the DOM tree of each browser to those in reference browser:

body

div divdiv

h1 a ul div div

divul

div div div

div

body

div divdiv

h1 a ul div

divdiv

div div div

div

div

ul

Page 32: Automated Identification of Cross-browser Issues in Web Applications

Match the nodes in the DOM tree of each browser to those in reference browser:

body

div divdiv

h1 a ul div div

divul

div div div

div

body

div divdiv

h1 a ul div

divdiv

div div div

div

div

ul

div div

id = “footer” id = “footer”

Page 33: Automated Identification of Cross-browser Issues in Web Applications

Match the nodes in the DOM tree of each browser to those in reference browser:

body

div divdiv

h1 a ul div div

divul

div div div

div

body

div divdiv

h1 a ul div

divdiv

div div div

div

div

ul

div

divid = null

id = null

Page 34: Automated Identification of Cross-browser Issues in Web Applications

Match the nodes in the DOM tree of each browser to those in reference browser:

body

div divdiv

h1 a ul div div

divul

div div div

div

body

div divdiv

h1 a ul div

divdiv

div div div

div

div

ul

div

divtagname = “div”

tagname = “div”

Page 35: Automated Identification of Cross-browser Issues in Web Applications

Match the nodes in the DOM tree of each browser to those in reference browser:

body

div divdiv

h1 a ul div div

divul

div div div

div

body

div divdiv

h1 a ul div

divdiv

div div div

div

div

ul

body

div

div

div

body

div

div

div

div

xPath1 = /html/body/div[1]/div[1]/div[1] xPath2 = /html/body/div[1]/div[1]/div/div[1]

35

Page 36: Automated Identification of Cross-browser Issues in Web Applications

Match the nodes in the DOM tree of each browser to those in reference browser:

body

div divdiv

h1 a ul div div

divul

div div div

div

body

div divdiv

h1 a ul div

divdiv

div div div

div

div

ul

body

div

div

div

body

div

div

div

div

36

Page 37: Automated Identification of Cross-browser Issues in Web Applications

Match the nodes in the DOM tree of each browser to those in reference browser:

body

div divdiv

h1 a ul div div

divul

div div div

div

body

div divdiv

h1 a ul div

divdiv

div div div

div

div

ul

h1 h1a a

Page 38: Automated Identification of Cross-browser Issues in Web Applications

Match the nodes in the DOM tree of each browser to those in reference browser:

body

div divdiv

h1 a ul div div

divul

div div div

div

body

div divdiv

h1 a ul div

divdiv

div div div

div

div

ul div

div

h1 h1a a

Page 39: Automated Identification of Cross-browser Issues in Web Applications

Match the nodes in the DOM tree of each browser to those in reference browser:

body

div divdiv

h1 a ul div div

divul

div div div

div

body

div divdiv

h1 a ul div

divdiv

div div div

div

div

ul div

div

h1 h1a a

div

ul

ul

div div

div

div

div div

div

body

div div

divdiv

div

ul div

div div

body

ul

Page 40: Automated Identification of Cross-browser Issues in Web Applications

40

Page 41: Automated Identification of Cross-browser Issues in Web Applications

41

Page 42: Automated Identification of Cross-browser Issues in Web Applications

42

Page 43: Automated Identification of Cross-browser Issues in Web Applications

43

Page 44: Automated Identification of Cross-browser Issues in Web Applications

44

Page 45: Automated Identification of Cross-browser Issues in Web Applications

45

Page 46: Automated Identification of Cross-browser Issues in Web Applications

46

Type of issues found:• Positional shifts• Size differences• Visibility differences• General appearance issues

Page 47: Automated Identification of Cross-browser Issues in Web Applications

47

Page 48: Automated Identification of Cross-browser Issues in Web Applications

48

Reference Browser screenshot Target Browser screenshot

Page 49: Automated Identification of Cross-browser Issues in Web Applications

RQ1 : Can identify cross-browser issues in web applications?

RQ2 : Can identify such issues without generating too many false positives?

49

Page 50: Automated Identification of Cross-browser Issues in Web Applications

For each page P and browser B considered1. Load P in B and in the reference browser2. Compare the page in the two browsers using our technique3. Store the produced reports4. Manually checked for false positives and false negatives

Subject Name URL Type

GATECH http://www.gatech.edu University

BECKER http://www.beckerelectric.com Company

CHESNUT http://www.chestnutridgecabin.com Lodge

CRSTI http://www.crsti.org Hospital

DUICTRL http://www.duicentral.com Lawyer

JTWED http://www.jtweddings.com Photography

ORTHO http://www.otorohanga.co.nz Informational

PROTOOLS http://www.protoolsexpress.com Company

SPEED http://www.speedsound.com E-Commerce

Test Subjects

50

Page 51: Automated Identification of Cross-browser Issues in Web Applications

Subject# Issues Reported False

PositivesFalse Negatives

GATECH 2 3 0 1 6 0 (0%) 0

BECKER 2 12 0 3 17 1 (6.25%) 0

CHESNUT 8 4 0 4 16 2 (14.3%) 0

CRSTI 4 4 0 2 9 0 (0%) 0

DUICTRL 9 8 0 6 23 4 (21%) 0

JTWED 3 9 0 1 14 0 (0%) 0

ORTHO 0 0 0 4 4 2 (100%) 0

PROTOOLS 4 5 0 11 20 9 (81%) 0

SPEED 23 5 0 5 33 3 (10%) 0

TOTAL 55 50 0 37 142 21 (17%) 0

51

Page 52: Automated Identification of Cross-browser Issues in Web Applications

Subject# Issues Reported False

PositivesFalse Negatives

GATECH 2 3 0 1 6 0 (0%) 0

BECKER 2 12 0 3 17 1 (6.25%) 0

CHESNUT 8 4 0 4 16 2 (14.3%) 0

CRSTI 4 4 0 2 9 0 (0%) 0

DUICTRL 9 8 0 6 23 4 (21%) 0

JTWED 3 9 0 1 14 0 (0%) 0

ORTHO 0 0 0 4 4 2 (100%) 0

PROTOOLS 4 5 0 11 20 9 (81%) 0

SPEED 23 5 0 5 33 3 (10%) 0

TOTAL 55 50 0 37 142 21 (17%) 0

52

Page 53: Automated Identification of Cross-browser Issues in Web Applications

Industrial Tools Adobe Browser Lab & MS Expression Web

▪ Require manual inspection

Browsera (launched Summer 2010)

▪ Simple DOM matching (from experience using the tool)

Research Tools Eaton & Memon [IJWET07]

▪ Requires manual classification. Limited to html tags only

Tamm [GTAC09]▪ Expensive and is focused on layout of text elements

54

Page 54: Automated Identification of Cross-browser Issues in Web Applications

Summary

55