Root Cause Analysis for HTML Presentation Failures using Search-Based Techniques

Similar documents
Finding Presentation Failures Using Image Comparison Techniques

Using Visual Symptoms for Debugging Presentation Failures in Web Applications

Finding HTML Presentation Failures Using Image Comparison Techniques


CSS for Page Layout Robert K. Moniot 1

Page Layout Using Tables

Frontend guide. Everything you need to know about HTML, CSS, JavaScript and DOM. Dejan V Čančarević

Session 3.1 Objectives Review the history and concepts of CSS Explore inline styles, embedded styles, and external style sheets Understand style

Getting Started with CSS Sculptor 3

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development

Styles, Style Sheets, the Box Model and Liquid Layout

IBM Forms V8.0 Custom Themes IBM Corporation

BA. (Hons) Graphics Design

Exploring Computer Science Web Final - Website

ITSE 1401 Web Design Tools Lab Project 4 (Expression Web 4 - Units M, N, O, P) Last revised: 1/9/14

Introduction to Computer Science Web Development

Web Development. With PHP. Web Development With PHP

The Importance of the CSS Box Model

The Benefits of CSS. Less work: Change look of the whole site with one edit

CSS.

Introduction to WEB PROGRAMMING

McMaster Brand Standard for Websites

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student

Stamp Builder. Documentation. v1.0.0

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

Creating Accessible Web Sites with EPiServer

1 of 7 11/12/2009 9:29 AM

Introducing Cascading Style Sheets. Cascading Style Sheet Basics Creating Styles Using Styles Manipulating Styles Text Formatting with CSS

Creating Layouts Using CSS. Lesson 9

Chapter 16: PAGE LAYOUT WITH CSS

Lesson 5 Introduction to Cascading Style Sheets

Positioning in CSS: There are 5 different ways we can set our position:

Mark Scheme. Edexcel Level 2 Certificate in Digital Applications. Unit 5: Coding for the Web

Chapter 1 Introduction to Dreamweaver CS3 1. About Dreamweaver CS3 Interface...4. Creating New Webpages...10

Using CSS for page layout

Certified CSS Designer VS-1028

Additional catalogs display. Customize text size and colors.

How to lay out a web page with CSS


Deccansoft Software Services

Basic CSS Lecture 17

ADOBE 9A Adobe Dreamweaver CS4 ACE.

WEBSITE PROJECT 2 PURPOSE: INSTRUCTIONS: REQUIREMENTS:

Lecture 10. CSS Properties. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

Create a Web Page with Spry Navigation Bar. March 30, 2010

3.1 Introduction. 3.2 Levels of Style Sheets. - HTML is primarily concerned with content, rather than style. - There are three levels of style sheets

What is the Box Model?

Software. Full Stack Web Development Intensive, Fall Lecture Topics. Class Sessions. Grading

Universal CSS Navigation Menu: Advanced Styling Patrick Julicher Universal CSS Navigation Menu: Advanced Styling

Wanted! Introduction. Step 1: Styling your poster. Activity Checklist. In this project, you ll learn how to make your own poster.

CSc 337 LECTURE 15: REVIEW

How to lay out a web page with CSS

CS193X: Web Programming Fundamentals

- HTML is primarily concerned with content, rather than style. - However, tags have presentation properties, for which browsers have default values

HTML + CSS. ScottyLabs WDW. Overview HTML Tags CSS Properties Resources

Virto SharePoint Forms Designer for Office 365. Installation and User Guide

KillTest *KIJGT 3WCNKV[ $GVVGT 5GTXKEG Q&A NZZV ]]] QORRZKYZ IUS =K ULLKX LXKK [VJGZK YKX\OIK LUX UTK _KGX

epromo Guidelines DUE DATES NOT ALLOWED PLAIN TEXT VERSION

Zen Garden. CSS Zen Garden

CSS مفاهیم ساختار و اصول استفاده و به کارگیری

Block & Inline Elements

Cascading Style Sheets (CSS)

BEFORE CLASS. If you haven t already installed the Firebug extension for Firefox, download it now from

Fundamentals of Web Technologies. Agenda: CSS Layout (Box Model) CSS Layout: Box Model. All HTML elements can be considered as a box or a container

CSCB20 Week 7. Introduction to Database and Web Application Programming. Anna Bretscher Winter 2017

Web Development IB PRECISION EXAMS

Data Visualization on the Web with D3

Session 4. Style Sheets (CSS) Reading & References. A reference containing tables of CSS properties

COMS 359: Interactive Media

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh

Nebraska - eforms. Tips and Tricks

COMSC-031 Web Site Development- Part 2

Help Documentation. Copyright 2007 WebAssist.com Corporation All rights reserved.

WHAT YOU WILL LEARN IN THIS PHOTOSHOP TRAINING PROGRAM

Note: The screenshots in this document were taken on Windows in Firefox, which may differ from your system.

Project 1: Creating a Web Site from Scratch. Skills and Tools: Use Expression Web tools to create a Web site

CSS: The Basics CISC 282 September 20, 2014

Southern College Kolej Selatan 南方学院. Final Examination Semester 1 / Year 2011

CSS: Lists, Tables and the Box Model

Flexible and LEAN Ads

Computing Science: National 5 and Higher skills, knowledge and understanding

ICT IGCSE Practical Revision Presentation Web Authoring

INFORMATION AND COMMUNICATION TECHNOLOGY 0417/03. Paper 3 Data Analysis and Website Authoring For examination from 2020

CSS: Cascading Style Sheets

Advanced Dreamweaver CS6

This is a repository copy of XFix: An Automated Tool for the Repair of Layout Cross Browser Issues.

CSS Cascading Style Sheets

Introduction to Web Design CSS Reference

Appendix D CSS Properties and Values

Assignments (4) Assessment as per Schedule (2)

CSS: formatting webpages

Introduction to Web Design CSS Reference

IDM 221. Web Design I. IDM 221: Web Authoring I 1

Table of contents. Ajax AutoComplete Manual DMXzone.com

Tutorial 5 Working with Tables and Columns. HTML and CSS 6 TH EDITION

HTML and CSS a further introduction

Chapter 3 Style Sheets: CSS

JSN Sun Framework User's Guide

Transcription:

Root Cause Analysis for HTML Presentation Failures using Search-Based Techniques Sonal Mahajan, Bailan Li, William G.J. Halfond Department of Computer Science University of Southern California

What is a Presentation Failure? Web page rendering expected appearance Expected appearance (oracle) Web page rendering 2

Difference 1: Alignment problem Expected appearance (oracle) Web page rendering 3

Difference 2: Color problem Expected appearance (oracle) Web page rendering 4

Difference 3: Text style problem Expected appearance (oracle) Web page rendering 5

Impact of Presentation Failures 1. Reduces usability of the web page 2. Gives a negative impression of service offered or product quality 3. Affects image and branding efforts For the end user there is a low penalty for just moving on to the next web page 6

Presentation Failures Occur easily in modern web applications Highly complex Dynamic nature of HTML, CSS, JavaScript Difficult to debug Each page has hundreds of HTML elements Each HTML element may contain dozens of styling properties 7

Debugging Presentation Failures 1. Detection: determine whether a presentation failure has occurred 2. Localization: identify the faulty HTML element and visual property (CSS property or HTML attribute) 8

Related Approaches Manual debugging Browser developer tools (e.g., Firebug) Labor-intensive and error-prone Selenium, Sikuli, Cucumber, Crawljax Require exhaustive specification of correctness invariants Cross-browser testing Cannot report exact root cause faulty visual property Cannot be used if DOM has changed significantly Fighting Layout Bugs Cannot report a root cause and application independent 9

Debugging Presentation Failures 1. Detection: determine whether a presentation failure has occurred Prior Work (WebSee) 2. Localization: identify the faulty HTML element and visual property (CSS property or HTML attribute) This Paper 10

Detection: WebSee Input: Test web page and its oracle Output: Prioritized list of potentially faulty HTML elements Phases: 1. Detection: image processing techniques to find visual differences 2. Analysis: rendering-based analysis to identify potentially faulty elements. 3. Prioritization: rank HTML elements based on heuristics 11

Localization: Key Insight Image processing techniques allow us to define this as a search problem 1. Correcting faulty element will cause rendering of page under test and oracle to match 2. Guide search by using a fitness function based on image processing (e.g., minimize number of difference pixels) 12

Our Approach Input: Test web page, oracle, and ranked potentially faulty HTML elements Output: Faulty HTML element and faulty property Mechanism: Perform genetic algorithm based search over the visual properties of potentially faulty HTML elements 13

Genetic Algorithm Population domain: Possible values for a visual property Initial population: Generated randomly Selection: Linear ranking Mutation: Uniform mutation Fitness function: Minimize visual differences Stopping criteria: web page = oracle 15

Categorization of Visual Properties 1. Size and Position 2. Color 3. Predefined values 16

Category 1: Size and Position E.g., margin, padding, height, width Key commonality: numeric values over a continuous range Population: all integers Fitness function: minimize the number of difference pixels 17

Category 2: Color E.g., text color, background-color, border-color Color values: 140 color names 16 million colors (#000000 to #FFFFFF) Population: Lookup expected color in oracle -> generally fails Fitness function Minimize number of difference pixels -> useless Use average color distance of difference pixels 18

Category 3: Predefined values E.g., font-style, display, font-family, border-style Set of discrete predefined values font-style = {italic, oblique, normal} Exploration method No notion of closeness to guide search Use exhaustive exploration Not very expensive Max: 21 elements, Avg: 5 elements 19

Example Oracle Test web page Candidate root cause: <div, padding> Population domain: all integers Initial population: {20, 50, 100,, 0, 5} 20

Example 21

Example 22

Example 23

Example 24

Example 25

Example 26

Example Match found! 27

Experiment Evaluate accuracy Compare results with random search Evaluated for Category 1 and 2 only Subject application: GMail homepage Oracle: GMail homepage screenshot Test cases: Seeded faults 28

Experiment Procedure Total 37 test cases Run random search and our approach five times on each test case Limit search space for experiment to run within 24 hours Terminate random approach once it exceeds time of genetic algorithm 29

Experimental Results Category GA Random Test # 1. Numeric 100% 59% 30 2. Color 100% 37% 7 Total 100% 55% 37 Conclusions Validates feasibility of our search-based approach Outperforms random search Threats to validity Restriction on the search space Small sample of web applications and faults 30

Future Work Improve performance Improve search space initialization Prioritize visual properties Create a comprehensive search framework Handle multiple failures Improve fitness functions Evaluate larger set of web applications 31

Summary 1. Technique for automatic identification of faulty elements and properties 2. Analysis expressed as a search problem 3. Helpful in debugging presentation failures 4. No HTML/CSS expertise required 5. Better performance than random search 32

The End Thank you 33

Usage Scenarios 1. Presentation Development Testing 2. Regression Debugging 34

Presentation Development Testing Front-end developers Expected to convert image-based mockups to pixel perfect template pages Back-end developers Change templates by adding dynamic content Both continuously test if the implemented page is consistent with the mockup Oracle is the mockup 35

Regression Debugging Changes to code after initial implementation E.g.: Refactoring page from <table> based layout to <div> based layout Changes not intended to change appearance Test for presentation failures and debug to find responsible HTML elements Oracle is the previous correct version 36

Mockup Driven Development Mockups generated by graphic designers Front-end developers must create pixelperfect template pages Cursory search for front-end developer job postings shows this is very common 37

38

39

40

41

42

43

44

45

46

47

48

49