Parasoft C/C++test
{{Short description|Integrated set of tools}}
{{COI|date=April 2013}}
{{Infobox software
| name = Parasoft C/C++test
| logo = Parasoft Logo 2017.png
| screenshot = Cpptest red-featured-eclipse-430.png
| caption = code coverage annotation in Parasoft C/C++test
| collapsible =
| developer = Parasoft
| released = {{Start date and age|1996}}
| latest_release_version = 2024.2
| latest_release_date = {{start date|2024|12|03}}
| operating_system = Cross-platform, Linux, Solaris, Windows
| platform = Windows, Linux, Solaris, Embedded, Cross-platform
| language = English, Chinese, Japanese
| genre = Testing
| license = Proprietary commercial software
| website = {{URL|https://www.parasoft.com/products/parasoft-c-ctest/}}
}}
Parasoft C/C++test is an integrated set of tools for testing C and C++ source code that software developers use to analyze, test, find defects, and measure the quality and security of their applications. It supports software development practices that are part of development testing, including static code analysis, dynamic code analysis, unit test case generation and execution, code coverage analysis, regression testing, runtime error detection, requirements traceability, and code review.{{cite journal|last=Yoon|first=JunHo|title=Code Quality Improvement|journal=Dr. Dobb's Journal|date=2006-06-16|url=http://www.drdobbs.com/tools/code-quality-improvement/189401916|accessdate=16 June 2006|archive-url=https://web.archive.org/web/20221005231915/https://www.drdobbs.com/tools/code-quality-improvement/189401916 |archive-date=2022-10-05}} It's a commercial tool that supports operation on Linux, Windows, and Solaris platforms as well as support for on-target embedded testing and cross compilers.
Overview
Parasoft C/C++test is a combined set of tools that helps developers test their software. It's delivered as a standalone application that runs from the command line, or as a plug-in to Eclipse or Microsoft Visual studio. Various modules in the set assist software developers in performing static and dynamic analysis, creating, executing and maintaining unit tests, measuring code coverage and other software metrics, and executing regression tests.
The errors that C/C++test discovers include uninitialized or invalid memory, null pointer dereferencing, array and buffer overflow, division by zero, memory and resource leaks, duplicate code, and various types of dead or unreachable code.
C/C++test customers include Samsung Electronics, Wipro,{{cite web|url=https://www.parasoft.com/wp-content/uploads/pdf/Wipro_Case_Study.pdf|title=Wipro Meets Exacting Software Quality Standards and Fuels Global Growth through Parasoft's Development Testing Platform|access-date=2017-04-25}} NEC,{{cite web|url=https://www.parasoft.com/wp-content/uploads/pdf/NEC_Telecom_Software_Philippines_Case_Study.pdf|title=NEC Telecom Software Philippines Streamlines Internal Quality Initiatives with Parasoft C++test |access-date=2017-04-25}} and SELEX Sistemi Integrati.{{cite web|url=https://www.parasoft.com/wp-content/uploads/pdf/SELEX_Case_Study.pdf|title=SELEX Increases Efficiency with Automated Defect Prevention|access-date=2017-04-25}} It is also used by Lockheed Martin for the F-35 Joint Strike Fighter program (JSF) [http://www.militaryaerospace.com/articles/2013/10/software-code-f-35.html F-35 Joint Strike Fighter benefits from modern software testing, quality assurance] Inomed uses it to achieve IEC 62304 certification for their medical device software.{{cite web|url=https://www.parasoft.com/wp-content/uploads/pdf/Inomed_Parasoft_Medical_Device.pdf|title=Inomed Streamlines IEC 62304 Medical Device Software Certification|access-date=2017-04-25}}
Basic functionality
=Code coverage=
File:Parasoft cc++test screenshot 47.png
When testing software code coverage is a measure of which parts of the code have been executed during a test, and which have not. There are many different methods for measuring coverage that have different criteria on how it's calculated. Depending on your needs you can choose which is the best fit for your application.
C/C++test includes options for line coverage, meaning has the line been executed, block coverage, statement coverage, path coverage, decision coverage, branch coverage, and simple condition coverage. It also supports modified condition/decision coverage or MCDC because projects that require safe reliable software such as aircraft and cars, tend to required this form of coverage as it's believed to be a better measure of whether or not the code has been thoroughly exercised.
=Regression testing=
Regression testing verifies that software continues to operate correctly, even as changes are made and new versions are released. C/C++test automatically generates tests that capture the current state of an applications behavior by recording what happens while the application is running. Later test runs are compared against stored results from earlier runs that help determine what problems changes in the code may have introduced. Having a robust regression test suite is especially critical in areas where there are short release cycles and high degrees of test automation such as agile software development or extreme programming, to help insure that changes aren't introducing bugs into the software.{{cn|date=June 2024}}
=Runtime error detection=
C/C++test includes a lightweight form of runtime error detection that is suitable for use in embedded systems, including running on a target board or host. It helps find serious runtime defects such as memory leaks, null pointers, uninitialized memory, and buffer overflows.
=Software metrics=
Software metrics are used to help assess and improve software quality. Some metrics are used to help determine where bug-prone code might be, while others help understand maintainability and proper construction. C/C++test provides a variety of software metrics including traditional counting metrics of lines, files, comments, methods, etc. as well as industry standards like fan out, cyclomatic complexity, cohesion, and various Halstead metrics.
Users can configure which metrics they want to run and where applicable can set thresholds for what's an acceptable value for a particular metric. This allows users to flag code that is outside the expected range as an error to be reviewed or fixed. Graphic reports are provided to show values and trends in the metrics.
=Static analysis=
Static code analysis is the process of analyzing source code without executing the software. It helps developers to find bugs early, as well as code according to best practices.{{cite web|url=http://www.stroustrup.com/JSF-AV-rules.pdf |title=JOINT STRIKE FIGHTER AIR VEHICLE C++ CODING STANDARDS FOR THE SYSTEM DEVELOPMENT AND DEMONSTRATION PROGRAM |date=2005-12-01 |access-date=2017-04-25 |quote=employ good programming style and proven programming practices leading to safe, reliable, testable, and maintainable code }} This helps create code that is less susceptible to bugs by avoiding potentially dangerous code styles and constructs.{{cite book|title=MISRA C:2012 - Guidelines for the use of C language in critical systems|publisher=MIRA Limited on behalf of the MISRA consortium|date=2013-03-01|isbn=978-1-906400-10-1|quote=The MISRA C Guidelines define a subset of the C language in which the opportunity to make mistakes is either removed or reduced. Many standards for the development of safety-related software require, or recommend, the use of a language subset}} In industries where software performance is critical there are often requirements to run static analysis tools or even particular static analysis rules.
Static analysis in C/C++test includes different types of analysis including pattern-based, abstract interpretation, flow analysis, and metrics. This helps detect code responsible for memory leaks, erratic behavior, crashes, deadlocks, and security vulnerabilities.
C/C++test comes with pre-configured templates to assist enforcing static analysis rules for a variety of industry standards such as:{{cite journal|last=Ramel|first=David|title=New Agile Project Management Tools Announced|journal=Application Development Trends|date=2010-05-28|url=http://adtmag.com/articles/2010/05/28/new-agile-project-management-software.aspx|accessdate=7 September 2010}}
- ANSI IEC 62304 for medical devices
- DO-178B for airborne systems
- IEC 61508 & Safety Integrity Level for functional safety of electronic systems
- U.S. FDA general principles of software validation for medical software
- ISO 26262 & ASIL for automotive software
- Joint Strike Fighter Program for fighter aircraft
- Safety-critical software development
- Motor Industry Software Reliability Association (MISRA) for automotive software
- PCI DSS Payment Card Industry data security standard
- DISA STIG for defense industry systems and software
=Traceability=
When working in industries where there are strict coding requirements or regulatory standards, it is necessary to be able to prove that an application was developed according to the required steps. traceability is having all the information necessary to prove in a software audit that you've done the proper process. Commonly this means being able to prove what code belongs to a particular requirement as well as who reviewed it and what the outcome of such a review was. It also encompasses any tests and analysis performed on the code and what was done for any tests that failed. C/C++test keeps track of your testing and links it back to the requirement system, source control system, and bug tracking systems. This provides full traceability into each step of the software development process.
=Unit testing=
The purpose of unit testing is to make sure that all of the individual pieces of a software application work properly by themselves before integration. In programming languages like C and C++ this usually consists of a single file, or a small number of files that all perform a related function. Unit testing encompasses the creation of tests, execution of tests to see the results, and maintenance of tests for long term use. Because unit testing is often associated with code coverage which shows exactly what lines of code were executed by a test, both functionalities are included in C/C++test.
C++test helps you create unit tests that are compatible with xUnit testing frameworks. It also provides tracing functionality that lets you monitor a system under test and generate test cases based on actual paths and data used during the execution. It also provides functionality to handle isolating the code necessary to allow it to function without the rest of the application, also called stubbing, as well as an object repository to store, share, and reuse software objects initialized with the necessary test data. Stubs allow you to remove dependent parts of the full application such as a database or API but still run the application as if the component were still there. C/C++test allows you to create the necessary stubs to run your code in isolation.
The capability to alter and extend test data is provided through a variety of means such as a data source interface that allows you to read test inputs from files, spreadsheets, and databases. Tests can also be run simultaneously with runtime error detection turned on so as to find serious programming flaws that won't necessarily cause assertion failures during testing but are likely to cause software instability when deployed. Execution on embedded systems is supported, whether it's a host, target, or simulator, including cross-compilation, loading tests to the target, and loading results from a remote execution back in the GUI.
History
Parasoft C/C++test was originally introduced in 1995 as a static analysis tool based on guidelines found in the book Effective C++ by Scott Meyers.{{cite web|url=https://www.parasoft.com/press/new-static-code-analysis-tool|title=New Static Code Analysis tool by Parasoft|date=1996-05-05|website=Parasoft |access-date=2017-04-25|quote=CodeWizard is essentially a software rendition of this book that enforces Meyers' list of ways to achieve effective C++ programming}} Later when unit test creation and execution was added the product was renamed to C++test.{{cite web|url=https://www.parasoft.com/press/parasoft-releases-new-upgrade-of-ctest/|title=Parasoft Releases New Upgrade of C++test|date=2001-04-30|website=Parasoft|access-date=2017-04-25}} Eventually the product name was modified to include both C and C++ to reflect what languages are actually covered.{{cite web|url=https://www.parasoft.com/press/parasoft-cpptest-wins-testers-choice-award-2008/|title=Parasoft C/C++test Wins Testers Choice Award 2008|date=2008-11-04|access-date=2017-04-25}}
Parasoft C/C++test won Software Test and Performances’ 2008 Testers Choice Award in the best embedded/mobile test/performance category.[http://www.embeddedtechnology.com/doc.mvc/Parasoft-Embedded-Wins-2008-Testers-Choice-0001 Parasoft Embedded Wins 2008 Testers Choice Award] It was selected as VDC's Software Embeddy "Best in Show" award winner in 2012.[http://blog.vdcresearch.com/embedded_sw/2012/09/announcing-the-winner-of-vdcs-software-embeddy-for-the-2012-design-east-show.html Announcing the winner of VDC’s Software Embeddy for the 2012 DESIGN East show!]
Parasoft received TUV certification as an automotive functional safety tool in 2011 according to IEC 61508 and ISO 26262 standards.{{cite web|url=https://www.parasoft.com/press/cctest-certified-by-tuv-sud/|title=Parasoft TUV SUD Certified|date=2011-02-24|access-date=2017-04-25|quote=TÜV SÜD certified the latest version of Parasoft C/C++test to be qualified for safety-related software development according to IEC 61508 and ISO 26262 standards.}}
Supported systems
=Supported compilers=
class="wikitable collapsible" |
Compiler type (OS)
! Compiler name / target |
---|
Windows
|Microsoft Visual C++ |
Windows
|GNU and MingW gcc/g++ |
Windows
|GNU gcc/g++ |
Windows
|Green Hills MULTI for Windows |
Linux
|GNU gcc/g++ |
Linux
|Green Hills MULTI for Linux |
Solaris
|Sun ONE Studio |
Solaris
|GNU gcc/g++ |
Solaris
|Green Hills MULTI for SPARC Solaris |
Target/Cross
| Altera NIOS GCC |
Target/Cross
| ADS (ARM Development Suite) |
Target/Cross
| ARM for Keil μVision |
Target/Cross
| ARM RVCT |
Target/Cross
| ARM DS-5 GNU Compilation Tools |
Target/Cross
| Cosmic Software 68HC08 |
Target/Cross
| eCosCentric GCC |
Target/Cross
| Freescale CodeWarrior C/C++ for HC12 |
Target/Cross
| Fujitsu FR Family SOFTUNE |
Target/Cross
| GCC (GNU Compiler Collection) |
Target/Cross
| Green Hills MULTI for V800 |
Target/Cross
| IAR C/C++ for ARM |
Target/Cross
| IAR C/C++ for MSP430 |
Target/Cross
| Keil C51 |
Target/Cross
| Microsoft Visual C++ for Windows Mobile |
Target/Cross
| Microsoft Embedded Visual C++ |
Target/Cross
| National Instruments LavWindows/CVI 2015 Clang C/C++ Compiler |
Target/Cross
| QCC (QNX GCC) |
Target/Cross
| Renesas RX C/C++ |
Target/Cross
| Renesas SH SERIES C/C++ |
Target/Cross
| STMicroelectronics ST20 |
Target/Cross
| STMicroelectronics ST40 |
Target/Cross
| TASKING 80C196 C |
Target/Cross
| TASKING TriCore VX-toolset C/C++ |
Target/Cross
| TI TMS320C2x/C2xx/C5x |
Target/Cross
| TI TMS320C2000 C/C++ |
Target/Cross
| TI TMS320C54x C/C++ |
Target/Cross
| TI TMS320C55x C/C++ |
Target/Cross
| TI TMS320C6x C/C++ |
Target/Cross
| TI MSP430 C/C++ |
Target/Cross
| Wind River GCC |
Target/Cross
| Wind River DIAB |
=Supported IDEs=
- ARM Development Studio
- ARM Workbench IDE for RVDS
- Eclipse IDE for Developers
- Green Hills MULTI
- IAR Embedded Workbench
- Keil μVision IDE
- Keil RealView
- Microsoft eMbedded Visual C++
- Microsoft Visual Studio
- Microsoft Visual Studio Code
- QNX Momentics IDE
- Texas Instruments Code Composer Studio
- Wind River Tornado
- Wind River Workbench
See also
References
{{Reflist|colwidth=30em}}
External links
- [https://www.parasoft.com/products/parasoft-c-ctest/ Parasoft C/C++test page]
{{Eclipse plugins}}
{{DEFAULTSORT:Parasoft C C++test}}
Category:Abstract interpretation
Category:Computer security software
Category:Security testing tools
Category:Software testing tools