What CIOs Should Know: High Test Coverage and Still Bugs and Errors

4
The Big Data & Software Intelligence Company High Test Coverage and Still Bugs and Errors?

Transcript of What CIOs Should Know: High Test Coverage and Still Bugs and Errors

Page 1: What CIOs Should Know: High Test Coverage and Still Bugs and Errors

The Big Data & Software Intelligence Company

High Test Coverage and

Still Bugs and Errors?

Page 2: What CIOs Should Know: High Test Coverage and Still Bugs and Errors

www.softwarediagnostics.com

Initial Situation Frequently occurring bugs

2 High Test Coverage and still Bugs and Errors?

A company is experiencing difficulties with two business-critical applications.

The end-users are facing bugs frequently.

The IT manager decides to solve the problem by investing development time

into building up automated unit tests.

Over the next 6 months, an overall code-line-coverage of 80% is reached.

However, still many bugs slipped through the test net. The IT manager is

wondering why there is no improvement on the end-user side. How could

that be?

The IT manager is assuming that just looking at the overall test coverage is not

sufficient. She has to ensure that the tests particularly cover the most

complex parts of the code.

Page 3: What CIOs Should Know: High Test Coverage and Still Bugs and Errors

www.softwarediagnostics.com

Solution Approach Write tests for the most complex code first

3

To get an overview, the IT manager uses a tool to

analyze the code-landscape and visualize the results on

software maps.

The software map for the two applications reveals

complex code (high buildings) that is not tested at all or

tested only rudimentarily.

The critical and complex code is the most likely source

of errors and is at the same time more difficult to be

tested. Why is that?

1) Complex code is hard to understand for developers.

Bugs are much more likely to be introduced if the code

is not fully understood.

2) More test cases have to be written. Higher

complexity results in more control flow paths, which all

need to be tested.

For those reasons developers have been writing tests

mainly for the simple code so far. In order to change

this, coverage and complexity have to be considered

jointly.

Software Map Legend

Area: Lines-of-Code

Height: Complexity

In the example below, there is urgent need for action. Developers should concentrate on the code visualized as high and red “buildings” first and ensure that this code areas are tested well enough.

High Test Coverage and still Bugs and Errors?

Colors: % of lines covered by unit tests

- red: CRITCAL not tested at all

- yellow: DANGER rudimentary tested

- green: OK sufficiently tested

With the help of software maps, the IT manager starts to monitor test

coverage and complexity regularly and forces his teams to focus on

critical code first when writing unit tests.

Bugs – and with that complaints from users - are reduced to a

minimum.

Page 4: What CIOs Should Know: High Test Coverage and Still Bugs and Errors

Software Diagnostics GmbH Babelsberg Studios August-Bebel-Str. 26-53 14482 Potsdam, Germany

Phone E-Mail Web

+ 49 331 - 7062 340 [email protected] www.softwarediagnostics.com/en

Thank You for Your Attention

About Software Diagnostics

Software Diagnostics based in Potsdam, Germany is a spin-off of the Hasso Plattner Institute, the university centre of

excellence for software engineering. With Software Diagnostics, software development and software maintenance projects

become transparent and can be managed more effectively - based on the real systems’ implementations.

Contact Us