Run the unit Test case on a computer without parasoft C ++ Test installed.

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.