Chris George Website: Easing the pain of legacy tests.

18
Chris George Website: www.mostly-testing.co.uk @ChrisG0911 Easing the pain of legacy tests

description

O nce upon a time…

Transcript of Chris George Website: Easing the pain of legacy tests.

Page 1: Chris George Website: Easing the pain of legacy tests.

Chris GeorgeWebsite: www.mostly-testing.co.uk

@ChrisG0911

Easing the pain of legacy tests

Page 2: Chris George Website: Easing the pain of legacy tests.
Page 3: Chris George Website: Easing the pain of legacy tests.

Once upon a time…

Page 4: Chris George Website: Easing the pain of legacy tests.

Flagship product

Over 250,000 lines of code

Over 10,000 automated tests

Tests run in virtual machines

Multiple SQL Server versions

Continuous Integration

Page 5: Chris George Website: Easing the pain of legacy tests.

The real story…

Page 6: Chris George Website: Easing the pain of legacy tests.

Many attempts to fix over the years

== rising complexity== increasing instability

Page 7: Chris George Website: Easing the pain of legacy tests.

Myths, Preconceptions and Folklore

Page 8: Chris George Website: Easing the pain of legacy tests.

Don’t jump into the code…

Page 9: Chris George Website: Easing the pain of legacy tests.

Start with quick wins

Page 10: Chris George Website: Easing the pain of legacy tests.

Tests should clear up after themselves…

Page 11: Chris George Website: Easing the pain of legacy tests.

Exponential comparison…

# objects # Comparisons Approx time10 100 1 second100 10,000 1.7 mins1000 1,000,000 2.7 hours!

Page 12: Chris George Website: Easing the pain of legacy tests.

By the end of the week -

By the end of week 2 - only 1 failure!

95% passing

Page 13: Chris George Website: Easing the pain of legacy tests.

Discuss the problem/failure

Pattern #1

Page 14: Chris George Website: Easing the pain of legacy tests.

Pair & Review

Pattern #2

Page 15: Chris George Website: Easing the pain of legacy tests.

Pattern #3

Find and fix the quick wins

Page 16: Chris George Website: Easing the pain of legacy tests.

Pattern #4

De-mystify

Page 17: Chris George Website: Easing the pain of legacy tests.

Make best use of the skills on your team

Treat test code the same as product code

Don’t believe everything you hear

Most problems are not hard

Lessons learnt

Page 18: Chris George Website: Easing the pain of legacy tests.

</talk>Any Questions?

Chris GeorgeWebsite: www.mostly-testing.co.uk

@ChrisG0911