generating tests for mobile apps from natural …€¦ · this is fu*king annoying. fix it already!...

42
GENERATING TESTS FOR MOBILE APPS FROM NATURAL LANGUAGE BUG REPORTS AND APP REVIEWS Partially supported by: NSF, IBM, MSR, and Google Alessandro (Alex) Orso School of Computer Science – College of Computing Georgia Institute of Technology Joint work with Marcelo d’Amorim and Paola Spoletini SNEAK PREVIEW

Upload: others

Post on 30-Sep-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

GENERATING TESTS FOR MOBILE APPS FROM NATURAL LANGUAGE BUG

REPORTS AND APP REVIEWS

Partially supported by: NSF, IBM, MSR, and Google

Alessandro (Alex) OrsoSchool of Computer Science – College of Computing

Georgia Institute of Technology

Joint work with Marcelo d’Amorim and Paola Spoletini

SNEAK PREVIEW

Page 2: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

SNEAK PREVIEW

GENERATING TESTS FOR MOBILE APPS FROM NATURAL LANGUAGE BUG

REPORTS AND APP REVIEWS

Partially supported by: NSF, IBM, MSR, and Google

Alessandro (Alex) OrsoSchool of Computer Science – College of Computing

Georgia Institute of Technology

Joint work with Marcelo d’Amorim and Paola Spoletini

Page 3: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

SNEAK PREVIEW

GENERATING TESTS FOR MOBILE APPS FROM NATURAL LANGUAGE BUG

REPORTS AND APP REVIEWS

Partially supported by: NSF, IBM, MSR, and Google

Alessandro (Alex) OrsoSchool of Computer Science – College of Computing

Georgia Institute of Technology

Joint work with Marcelo d’Amorim and Paola Spoletini

Field failures are

unavoidable!

Page 4: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

SNEAK PREVIEW

GENERATING TESTS FOR MOBILE APPS FROM NATURAL LANGUAGE BUG

REPORTS AND APP REVIEWS

Partially supported by: NSF, IBM, MSR, and Google

Alessandro (Alex) OrsoSchool of Computer Science – College of Computing

Georgia Institute of Technology

Joint work with Marcelo d’Amorim and Paola Spoletini

Field failures are

unavoidable!

Page 5: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

TYPICAL DEBUGGING PROCESS

Very hard to(1) reproduce(2) debug

BugRepository

Page 6: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

TYPICAL DEBUGGING PROCESS

Very hard to(1) reproduce(2) debug

BugRepository

OVERARCHING GOAL: help developers (1) investigate field failures,

(2) understand their causes, and(3) eliminate such causes.

Recent survey of Apache, Eclipse, and Mozilla developers:

Information on how to reproduce field failures is the most valuable, and difficult to obtain, piece of information for investigating such failures.[Zimmermann10]

Page 7: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

OUR WORK SO FARRecording and replaying executions[icsm 2007, icse 2007]

Input anonymization [icse 2011]

Input minimization [woda 2006, icse 2007]

Mimicking field failures [icse 2012, ase 2013, icst 2014]

Locating and explaining field failures [issta 2012, issta 2013, ASE 2014, TOSEM 2015, TR]

Page 8: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

MIMICKING FIELD FAILURESUser run (R) Relevant events

(breadcrumbs)Mimicked run (R’)

Page 9: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

MIMICKING FIELD FAILURESUser run (R) Relevant events

(breadcrumbs)Mimicked run (R’)

Twitter crashes when I: 1) Open the app 2) Select a tweet with an image 3) Retweet the selected tweet

Page 10: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

MIMICKING FIELD FAILURESUser run (R) Relevant events

(breadcrumbs)Mimicked run (R’)

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

Page 11: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

OVERALL VISION

Page 12: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

Reviews Classifier

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

Bug Report Miner

App Test Generator

App Analyzer

Code Analyzer

GUI Analyzer

Bug Reports

Test Steps

App StoreReviews

App Code

App GUI

Domain Knowledge Actions

DictionaryTest Cases

Page 13: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

Reviews Classifier

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

Bug Report Miner

App Test Generator

App Analyzer

Code Analyzer

GUI Analyzer

Bug Reports

Test Steps

App StoreReviews

App Code

App GUI

Domain Knowledge Actions

DictionaryTest Cases

Page 14: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

Reviews Classifier

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

Bug Reports

App StoreReviews

Page 15: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

Bug Report Miner

Bug Reports

Test Steps

Page 16: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

Bug Report Miner

Bug Reports

Test Steps

IT FU*KING CRASHES!!! The app still crashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

Page 17: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

Bug Report Miner

Bug Reports

Test Steps

IT FU*KING CRASHES!!! The app still crashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

Page 18: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

Bug Report Miner

Bug Reports

Test Steps

IT FU*KING CRASHES!!! The app still crashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

Page 19: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

Bug Report Miner

Bug Reports

Test Steps

IT FU*KING CRASHES!!! The app still crashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

Page 20: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

IT FU*KING CRASHES!!! The app stillcrashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

Bug Report Miner

Bug Reports

Test Steps

IT FU*KING CRASHES!!! The app still crashes every single time I retweet atweet that contains an image.This is fu*king annoying. Fix it already!

BEEP

BEEP

1) Open twitter2) Select tweet with image3) Retweet➡ Crash

Page 21: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

App Analyzer

Code Analyzer

GUI AnalyzerTest Steps

App Code

App GUI

Domain Knowledge Actions

Dictionary

Page 22: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

App Analyzer

Code Analyzer

GUI AnalyzerTest Steps

App Code

App GUI

Domain Knowledge Actions

Dictionary

Page 23: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

App Analyzer

Code Analyzer

GUI AnalyzerTest Steps

App Code

App GUI

Domain Knowledge Actions

Dictionary

Page 24: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

App Analyzer

Code Analyzer

GUI AnalyzerTest Steps

App Code

App GUI

Domain Knowledge Actions

Dictionary

Page 25: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

App Analyzer

Code Analyzer

GUI AnalyzerTest Steps

App Code

App GUI

Domain Knowledge Actions

Dictionary

reply

Page 26: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

App Analyzer

Code Analyzer

GUI AnalyzerTest Steps

App Code

App GUI

Domain Knowledge Actions

Dictionary

reply

retweet

Page 27: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

App Analyzer

Code Analyzer

GUI AnalyzerTest Steps

App Code

App GUI

Domain Knowledge Actions

Dictionary

reply

retweet

like

Page 28: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

App Analyzer

Code Analyzer

GUI AnalyzerTest Steps

App Code

App GUI

Domain Knowledge Actions

Dictionary

reply

notifications

retweet

like

Page 29: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

App Analyzer

Code Analyzer

GUI AnalyzerTest Steps

App Code

App GUI

Domain Knowledge Actions

Dictionary

reply

notifications

retweet

like

image

Page 30: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

App Analyzer

Code Analyzer

GUI AnalyzerTest Steps

App Code

App GUI

Domain Knowledge Actions

Dictionary

reply

notifications

retweet

like

image

<action1> <parameter*> <trigger><action2> <parameter*> <trigger>…

Page 31: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

App Analyzer

Code Analyzer

GUI AnalyzerTest Steps

App Code

App GUI

Domain Knowledge Actions

Dictionary

reply

notifications

retweet

like

image

<action1> <parameter*> <trigger><action2> <parameter*> <trigger>…

<open twitter> <> <start com.twittwer. app.twitter><retweet> <current tweet> <click >…

Page 32: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

App Test Generator

Test Steps

ActionsDictionary

Test Cases

Page 33: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

App Test Generator

Test Steps

ActionsDictionary

Test Cases

1) Open twitter2) Select tweet with image3) Retweet➡ Crash

Page 34: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

App Test Generator

Test Steps

ActionsDictionary

Test Cases

1) Open twitter2) Select tweet with image3) Retweet➡ Crash

<open twitter> <> <start com…twitter><retweet> <current tweet> <click >…

Page 35: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

App Test Generator

Test Steps

ActionsDictionary

Test Cases

1) Open twitter2) Select tweet with image3) Retweet➡ Crash

<open twitter> <> <start com…twitter><retweet> <current tweet> <click >…

Page 36: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

App Test Generator

Test Steps

ActionsDictionary

Test Cases

1) Open twitter2) Select tweet with image3) Retweet➡ Crash

<open twitter> <> <start com…twitter><retweet> <current tweet> <click >…

Page 37: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

App Test Generator

Test Steps

ActionsDictionary

Test Cases

1) Open twitter2) Select tweet with image3) Retweet➡ Crash

<open twitter> <> <start com…twitter><retweet> <current tweet> <click >…

Page 38: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

App Test Generator

Test Steps

ActionsDictionary

Test Cases

1) Open twitter2) Select tweet with image3) Retweet➡ Crash

<open twitter> <> <start com…twitter><retweet> <current tweet> <click >…

Page 39: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

CURRENT AND FUTURE WORK

Page 40: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

CURRENT AND FUTURE WORKCURRENT AND FUTURE WORK

Page 41: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

CURRENT AND FUTURE WORKCURRENT AND FUTURE WORK

• Review Classifier : reuse• Bug Report Miner: very preliminary version• App Analyzer : previous work on feature identification and

cross-platform issues• App Test Generator: previous work on Android testing

Page 42: GENERATING TESTS FOR MOBILE APPS FROM NATURAL …€¦ · This is fu*king annoying. Fix it already! BEEP BEEP Reviews Classifier IT FU*KING CRASHES!!! The app still crashes every

• Is it feasible? What are the metrics of success?• What technologies are best suited for the tasks involved? Can

we use them in a black-box fashion?• Can we leverage multiple similar reviews/bug reports?• Can we do this interactively (as the users enter their reviews)?

OPEN QUESTIONS/CHALLENGES