An Empirical Investigation on the Readability of Manual and - - PowerPoint PPT Presentation

an empirical investigation on the readability of manual
SMART_READER_LITE
LIVE PREVIEW

An Empirical Investigation on the Readability of Manual and - - PowerPoint PPT Presentation

An Empirical Investigation on the Readability of Manual and Generated Test Cases G. Grano, S. Scalabrino, H. C. Gall, R. Oliveto ICPC ERA 2018, 27-28 May, Gothenburg (Sweden) grano@ifi.uzh.ch giograno90 Unit Test First defensive line


slide-1
SLIDE 1

An Empirical Investigation

  • n the Readability of Manual

and Generated Test Cases

  • G. Grano, S. Scalabrino, H. C. Gall, R. Oliveto

ICPC ERA 2018, 27-28 May, Gothenburg (Sweden)

grano@ifi.uzh.ch giograno90
slide-2
SLIDE 2

Unit Test

First defensive line against bug introduction

2 — Giovanni Grano @ s.e.a.l.
slide-3
SLIDE 3

Tests evolve with code

3 — Giovanni Grano @ s.e.a.l.
slide-4
SLIDE 4

Time spent with tests 1

> 416 software engineers for over 13 years of recorded working time in the IDE > Developers spend 25% of their time engineering tests in their IDE > They look at tests when errors occur

1 Beller et.al - When, How, and Why Developers (Do Not) Test in Their IDEs 4 — Giovanni Grano @ s.e.a.l.
slide-5
SLIDE 5

Same level of quality

Same effort in writing good quality tests and production code

> Changes are easier > Error comprehension

5 — Giovanni Grano @ s.e.a.l.
slide-6
SLIDE 6

Are tests first-class citizens?

6 — Giovanni Grano @ s.e.a.l.
slide-7
SLIDE 7

Quality ⊇ readability

7 — Giovanni Grano @ s.e.a.l.
slide-8
SLIDE 8

Study Design

> 3 Apache open-source projects > state-of-the-art readability model 2 > pairs of <test-production code> > Wilcoxon Test

2 Scalabrino et.al. - Improving Code Readability Models with Textual Features - ICPC 2016 8 — Giovanni Grano @ s.e.a.l.
slide-9
SLIDE 9

Features

> Structural Features (e.g. line length) > Visual Features (e.g. indentation) > Text-Based Code Readability Features (e.g. Comments and Identifiers Consistency)

9 — Giovanni Grano @ s.e.a.l.
slide-10
SLIDE 10

RQ1

Are test cases and classes equally readable?

10 — Giovanni Grano @ s.e.a.l.
slide-11
SLIDE 11

Test cases are less readable than the code they exercise

slide-12
SLIDE 12

Well... we have tools!

12 — Giovanni Grano @ s.e.a.l.
slide-13
SLIDE 13

RQ2

Are generated and manual tests equally readable?

13 — Giovanni Grano @ s.e.a.l.
slide-14
SLIDE 14

Manually written tests are more readable!

slide-15
SLIDE 15

Future work

Why readability of test is lower?

> good proxy for quality? > increase awareness > support test quality

Can we improve the tools?

15 — Giovanni Grano @ s.e.a.l.
slide-16
SLIDE 16