Create a test execution Program
Open the test configuration window and create a custom configuration. For example, cancel static analysis:
I do not understand why C ++ Test uses static analysis as the default option.
Enable test execution,And select: Buildtest excutable.
Click"Test Execution Process"EditButton to edit the generated Log Path.
In the Configuration:
TestLogFile = "$ {cpptest: testware_loc}/cpptest_results.tlog"
CovLogFile = "$ {cpptest: testware_loc}/cpptest_results.clog"
Changed:
TestLogFile = "cpptest_results.tlog"
CovLogFile = "cpptest_results.clog"
After this step is completed, the test execution process is automatically changed"Custom Process(License required)".
After completing the preceding steps, you can use the custom configuration to generate an executable program with a unit test (in the Project directory \. cpptest \ TApi \ unit-data \ current_tubfxxxxx \). however, if you run the program directly, "xxx cannot be loaded. dll "error.
Cpptestruntime in the Parasoft \ C ++ test for VisualStudio \ 9.2 \ engine \ bin \ directory. dll and cpptestsupplement. dll files can run normally only in the same directory as the test program.
The cpptest_reults.clog and cpptest_results.tlog files are generated under the same directory of the test program. These two files are the results of the unit test.
View unit test results:
Open the test configuration option. Create a new test configuration and cancel the static test.
In the test execution process, select Collect test results from log files.
Put the two Log files generated by the test program in the "Project directory \. cpptest \ TApi \ unit-data \ current_tubfxxxxx \" directory to run the test and obtain the test result.
From Zhao wenwu's blog