good metrics for tdd

8
Copyright © 2011, Industrial Logic, Inc. All Rights Reserved. Good Metrics for a TDD Program “Less is More” Naresh Jain [email protected] 1

Upload: naresh-jain

Post on 06-May-2015

3.067 views

Category:

Technology


0 download

DESCRIPTION

Often companies who are new to TDD ask us, what should we measure to know if we are headed in the right direction with regards to TDD. Here are some things you might consider. My take is, less is more. Don't measure 100 things, focus on a few at a time and move on.

TRANSCRIPT

Page 1: Good Metrics for TDD

Copyright © 2011, Industrial Logic, Inc. All Rights Reserved.

Good Metrics for a TDD Program

“Less is More”

Naresh [email protected]

1

Page 2: Good Metrics for TDD

Copyright © 2011, Industrial Logic, Inc. All Rights Reserved.

C3 - TreeMap

• Coverage

• Complexity

• Churn

2

Page 3: Good Metrics for TDD

Copyright © 2011, Industrial Logic, Inc. All Rights Reserved.

Test vs. Production Code

0

15,000

30,000

45,000

60,000

15 Feb 2 Mar 17 Mar 1 Apr 18 Apr 1 May 16 May 31 May 15 Jun 30 Jun

Src LOC Test LOC

Usually Test Driven code has more Test Code than Production Code3

Page 4: Good Metrics for TDD

Copyright © 2011, Industrial Logic, Inc. All Rights Reserved.

Test Run Trend with every CI Build

0

75

150

225

300

B1 B2 B3 B4 B5 B6 B7 B8

# of Failing Test # of Passing

Each Build

4

Page 5: Good Metrics for TDD

Copyright © 2011, Industrial Logic, Inc. All Rights Reserved.

Test Balance• # of commits that include Tests over time (weekly)

0

37.5

75.0

112.5

150.0

W1 W2 W3 W4 W5 W6 W7

Commits With Tests Commits Without Tests

5

Page 6: Good Metrics for TDD

Copyright © 2011, Industrial Logic, Inc. All Rights Reserved.

Test Churn• # of tests added/removed over time (weekly)

0

15

30

45

60

W1 W2 W3 W4 W5 W6

Tests Added Tests Removed

6

Page 7: Good Metrics for TDD

Copyright © 2011, Industrial Logic, Inc. All Rights Reserved.

Satisfaction Rating from Developers and Testers

0

17.5

35.0

52.5

70.0

June 6th June 13th June 20th June 27th July 4th July 11th July 18th

Devs Testers

Weekly

%

7

Page 8: Good Metrics for TDD

Copyright © 2011, Industrial Logic, Inc. All Rights Reserved.

Thank You!More Interesting Material at : http://industriallogic.com/shop

8