The IDE provides support for generating and executing unit tests based on its own simple test framework, the CUnit framework, and the CppUnit framework. The CUnit and CppUnit frameworks are open source products that support development of tests for C and C++ and provide harnesses for running the tests.
The IDE supports CUnit and CppUnit unit testing if the frameworks are separately installed on your system.
For more information about downloading and using CUnit, see:
For more information about downloading and using CppUnit, see:
The Simple tests use the IDE's own simple framework for running tests.
You can use the IDE to create the following:
You can generate tests by right-clicking a source file in the Projects window and selecting Create Test.
The IDE stores unit tests as subfolders of the test folder, by default. You can specify a different name if you want as you create the tests.
Each managed project has a default test logical folder that is used to store the unit tests. This folder is displayed as the Test File node in the Projects window. You can add any number of test folders to your project.
See also | |
---|---|
Overview of C/C++ Unit Tests C/C++ Unit Test Tasks: Quick Reference |
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.