Slide 1

Slide 1 text

Using Software Changes to Understand the Test Driven Development Process Michael Hilton @michaelhilton Nicholas Nelson Hugh McDonald Sean McDonald Ron Metoyer Danny Dig

Slide 2

Slide 2 text

My Journey to XP 2

Slide 3

Slide 3 text

My Journey to XP 3

Slide 4

Slide 4 text

My Journey to XP 4

Slide 5

Slide 5 text

My Journey to XP 5

Slide 6

Slide 6 text

My Journey to XP 6

Slide 7

Slide 7 text

My Journey to XP 7

Slide 8

Slide 8 text

My Journey to XP 8 Corvallis OR -> PDX -> IAD -> MAN -> LHR -> EDI

Slide 9

Slide 9 text

My Journey to XP 9 Corvallis OR -> PDX -> IAD -> MAN -> LHR -> EDI Was there turbulence?

Slide 10

Slide 10 text

There exists many tools to evaluate the of our work, But there are very few tools to evaluate the of our work. 10 product process

Slide 11

Slide 11 text

Process Improvement Matters Process improvement has led to: 11 85% defect reduction 50% development cycle time reduction 35% productivity improvement

Slide 12

Slide 12 text

TDD is a Software Development Process 12 Rules Of Test Driven Development (TDD): 1. Create a unit test that fails 2. Write production code that makes that test pass 3. refactor Photo: http://blog.cleancoder.com/uncle-bob/2014/12/17/TheCyclesOfTDD.html

Slide 13

Slide 13 text

Previous Work 13 Use static analysis at various points throughout the lifecycle of the code to determine characteristics of the process. For example: • Code Coverage • Cyclomatic Complexity • File size • etc.

Slide 14

Slide 14 text

Our New Approach 14 Examine the changes between points in time by using the Abstract Syntax Tree (AST) to gain deeper understanding • What type of changes is it? • What can we infer from this type of change?

Slide 15

Slide 15 text

Hive Plot 15

Slide 16

Slide 16 text

Visualization to Understand TDD 16

Slide 17

Slide 17 text

Visualization to Understand TDD 17 Kata Name Aggregate Hive Plot

Slide 18

Slide 18 text

Visualization to Understand TDD 18 TDD Heartbeat Cycle Plot

Slide 19

Slide 19 text

Visualization to Understand TDD 19 Snapshot Timeline

Slide 20

Slide 20 text

Visualization to Understand TDD 20 Single TDD Cycle

Slide 21

Slide 21 text

Visualization to Understand TDD 21 Single TDD Phase

Slide 22

Slide 22 text

Visualization to Understand TDD 22 Single Snapshot

Slide 23

Slide 23 text

Visualization to Understand TDD 23 Code Diffs

Slide 24

Slide 24 text

Visualization to Understand TDD 24

Slide 25

Slide 25 text

Inference Algorithm 25

Slide 26

Slide 26 text

Evaluation 26 RQ1:Identification- Can programmers using TDDViz identify whether the code was developed in conformance with TDD? RQ2:Comprehension- Can programmers using TDDViz identify the reason why code was changed or inserted? RQ3:Comparability- Can programmers using TDDViz determine how much time went into testing vs. development of production code? RQ4: Accuracy- Can an algorithm infer TDD phases accurately?

Slide 27

Slide 27 text

Results 27 RQ1: Identification Treatment Correct Not Correct Percent Correct Control (n=18) 37 34 52% Experimental (n=17) 55 13 80% RQ2: Comprehension Treatment Correct Not Correct Percent Correct Control (n=18) 24 48 33% Experimental (n=17) 55 13 62%

Slide 28

Slide 28 text

Results 28 RQ3: Comparability Treatment Correct Not Correct Percent Correct Control (n=18) 23 49 32% Experimental (n=17) 33 35 48%

Slide 29

Slide 29 text

RQ4: Accuracy 29 Total Corpus: 160 out of 2601 Sessions 2489 snapshots Manual markup of each snapshot in Gold Standard. Evaluate against the Gold Standard: Precision: 81% Recall: 95% Accuracy: 87%

Slide 30

Slide 30 text

Contributions 30 • Process Understanding • TDD Visualization Design and Analysis • TDD Inference Algorithm • Implementation and Empirical Evaluation • Demo: github.com/MichaelHilton/TDDViz

Slide 31

Slide 31 text

Where do we go from here? 31 Someone should develop a usable tool (spoiler: not me)

Slide 32

Slide 32 text

Where do we go from here? 32 • Incorporate process review into existing mechanisms: • Continuous Integration • Code/Process Review Ask me about CI Research!

Slide 33

Slide 33 text

There exists many tools to evaluate the of our work, But there are very few tools to evaluate the of our work. 33 product process