Code coverage analysis: see Coco in action

Are we testing enough? Are we testing the right things? Those are questions probably every software developer or test engineer has heard (or thought) at least once in their life. As applications and environments become more diverse, the more challenges it brings to software testing too. 

The good news? Our coverage tool, Coco, is here to answer just those challenges. 

It analyzes the coverage of your source code when tests are executed, regardless of their type. Coco helps you see and determine if there are redundant tests – or testing gaps for any parts of your code. 

Code coverage analysis – why is it important?

Before introducing Coco further, let’s take a step back and spend a minute discussing code coverage analysis and why it is important. 

Obviously, any developer wants their code to be as flawless as possible. However, the more complicated the environments get, the trickier testing gets. And when you reach the point where it’s difficult to decide if all the code is already tested, it starts to be really difficult.

Basic code coverage analysis is a critical part of code quality assurance. It gives the developer a clear indication that code is tested and thus brings a feeling of security to the work. And vice versa: knowing that the code is untested, will encourage extra caution and prompt the development teams to think about what new tests to write to increase that coverage. 

But there’s more to the analysis than just the feeling of security.

Think about safety critical systems, such as medical devices, automotive software or even aerospace, where the smallest parts of non-tested code can have severe consequences. 

Or heavily regulated areas of business dealing with ISO standards or EU regulations, like financial services: there the compliance requirements mandate certain levels of code coverage.

You wouldn’t want to risk missing a thing, and that’s when Coco comes into play. 

Your faithful assistant for heavy-duty testing

Coco is your faithful assistant in finding out if every expression is tested thoroughly. 

Coco helps developers dodge the most common pitfalls in code coverage analysis as it’s cross-platform, cross-compiler, and supports a wide range of coverage levels – so it also provides detailed information on whether certain expressions are tested in each possible combination.

Coco supports several programming languages, including C, C++, C#, and QML. It isn’t tied to a specific testing tool and it can be integrated into any testing framework, including the Qt Test Library, GoogleTest, CppUnit and Catch.

On top of these top-notch basic features, Coco offers also advanced analysis. Coco can intuitively calculate the optimal order in which tests should be run. This means that the first tests that run will add the most coverage, and the latter, less. This way, you can be sure that even if you’re not able to run 100% of your tests, you can be sure you’ve added the most coverage.

In other words, Coco operates by running as few tests as possible, while achieving the greatest coverage in the shortest amount of time 

Coco also offers patch analysis, which can analyze a patch's impact and reveals the tests to run based on historical data. It integrates into various CI and ALM systems. In addition to its many features, the tool qualification is another vital aspect of this beautiful tool. 

Code coverage analysis tool in action: meet Coco

I’d say that Coco isn’t just your usual code coverage tool – but you don’t need to take just our word for it.

In the video below we’ll give you a comprehensive look into how Coco actually works. 

We’ll walk through some basic modes, like line and function coverage. Also, you’ll see how Coco operates on higher levels, like MC/DC or multiple condition coverage. 

You’ll see a run of unit tests, and we’ll show how to generate a report on the findings. We’ll also cover the calculation of an optimized execution order. 

So just push play on the video below and sit back – and get to know Coco in more detail by starting your free trial!