12
+45 36772 762 [email protected] www.praqma.com Helping the Business to Win Unit Testing: Emily Bache May 2017 DevTribe

Unit testing: Helping the business to win | Emily Bache | LTG-43/DTG-7

Embed Size (px)

Citation preview

+45 36772 [email protected]

Helping the Business to WinUnit Testing:

Emily BacheMay 2017DevTribe

An Example Defect

This line made Apple products vulnerable to ‘man in the middle’ attacks over ssh

opensource.apple.com/source/Security/Security-55471/libsecurity_ssl/lib/sslKeyExchange.c

Make it Testable

Extract a function that can be tested in isolation

http://martinfowler.com/articles/testing-culture.html

Write Unit Tests…

… And a Testing Framework

Defect found!

20 line function 100 lines tests and fixture

The Defect in Context:

Development Culture

“The presence of six separate copies of the same algorithm clearly indicates that this bug was not due to a one-time programmer error: This was a pattern. This is evidence of a development culture that tolerates duplicated, untested code.”

http://martinfowler.com/articles/testing-culture.html

What is Development Culture?Version control & Branching Strategy

Code review Strategy

Testing Strategy

Hiring criteria

Development Tool choices

Architecture & Design process

Helping the Business to Win

“Firms with high-performing IT organisations were twice as likely to exceed their profitability, market share and productivity goals”

https://puppet.com/resources/white-paper/2014-state-of-devops-report

Analysis

“this research …suggests that version control, test automation, and continuous integration are the most important aspects to implement in the field”

+45 36772 [email protected]

Helping the Business to WinUnit Testing:

Emily BacheMay 2017DevTribe