Code coverage: Objective measurement of code executed by your tests
The Cantata code coverage check capabilities can be integrated with Cantata tests or any external test driver. This feature provides an objective measurement of test execution completeness, making it an ideal supplement to requirements-based and robustness tests. Cantata code coverage makes it easy to:
What is Code Coverage and why is important?
Code coverage check is a crucial dynamic analysis technique that measures the extent to which code has been executed by tests. Individual constructs, also known as syntax elements, can be used to identify the logic structure within the code. Measuring the coverage of these constructs helps to determine the effectiveness of testing, and identify gaps in requirements-driven and robustness-driven testing approaches.
In order to comply with international software safety standards, coverage analysis is required. Higher safety levels require more rigorous coverage metrics to be achieved. By using structural code coverage tools, organizations can ensure that their code meets safety standards and minimize the risk of software-related incidents.
A code coverage tool is a software program that analyzes the extent to which a codebase has been exercised during testing. It determines the percentage of code statements, branches, functions, or lines that have been executed by the test suite. Code coverage tools are essential for measuring the quality and thoroughness of software testing. They can help identify areas of code that require additional testing, and assist developers in ensuring that their codebase is well-tested and free of defects.
Code coverage tools can be integrated with development environments such as Eclipse and Visual Studio. Using a code coverage tool is essential for ensuring that software meets safety and quality standards. In industries such as aerospace, automotive, and medical devices, compliance with safety standards such as DO-178C, ISO 26262, and IEC 62304 requires code coverage analysis. By using a code coverage tool, organizations can ensure that their software meets safety standards, minimize the risk of software-related incidents, and improve the overall quality and reliability of their software products.
Cantata Code Coverage Capabilities
UNDERSTAND BUILD VARIANT COVERAGE
“Build Variant Coverage is a powerful tool that analyzes source code executed across multiple build variants. Using pre-compiled defines (#defines), Cantata can easily differentiate between different build variants. With Cantata Coverage Viewer, you can view aggregated data for multiple build variants of the same source code.
DIAGNOSE COVERAGE RESULTS
Cantata Diagnostics offers complete project code-tree coverage, enabling you to drill down to individual code constructs within each line of code. This helps you pinpoint gaps and direct your test efforts more efficiently.
Our automatic test case coverage optimization tool helps with test case vector selection from large data sets and reduces regression testing overhead. With Cantata Diagnostics, you can optimize your testing process and achieve more accurate results.
GENERATE REPORTS
In addition to the powerful diagnostics of code coverage check results within the Eclipse® GUI, Cantata generates flexible user configurable reports in XML, HTML and safety standards certification ready ASCII and HTML text reports.
Build Variant Coverage reports aggregate coverage data across all defines, which is suitable as certification evidence for all build variants of the source code.
Reports and certification evidence embed the integrated checks on the achievement of the required coverage metric targets.
How does Cantata Code Coverage Work
Cantata Coverage enables code coverage analysis using instrumentation through its GUI or CLI.
This generates coverage data that can be used for graphical diagnosis and certification purposes. The tool seamlessly integrates with Cantata tests and other test frameworks, allowing you to measure execution from multiple sources.
The coverage analysis is further simplified with customizable Rule Sets that automate code instrumentation, data reporting, and coverage checking, making it compliant with various software safety standards.