Running a C/C++ Unit Test
See Also
Once you have created a test or test suite, you can use the Test command
to initiate execution of the test. The Test command is available from the context
menu of the project node, the Test Files node, and test suite nodes.
After you run a test, you can choose to rerun individual tests that were
executed during the test and displayed in the Test Results window.
To run all tests for a project:
- Select any node in the project in the Projects window.
- From the main menu, choose Run > Test project_name (Alt-F6).
The IDE executes all of the project's tests.
- You can also right-click the project node or the project's Test Files folder
and select Test from the popup menu to execute
all the project's tests.
To run a single test suite:
- Right-click the test suite subfolder under the Test Files node of project in the Projects
window and select Test.
To run a single test:
- First, run the test suite containing the test.
- In the Test Results window, right-click the test and choose Run Again.
A test cannot be run by itself without first running the test suite.
- See Also
- Creating a C/C++ Unit Test
- Unit Tests Results Window
- Debugging C/C++ Unit Tests
Legal Notices