Introduction to functions automatically generated by C ++ Test

Source: Internet
Author: User

The following describes C ++ Test in detail. In fact, C ++ Test will scan the code in detail to verify whether the code conflicts with these specifications, discover some simple or low-level errors as soon as possible to avoid the proliferation of integration.

In addition, if the method to be tested needs to call a function that does not exist or cannot be accessed at the time, C ++ Test can automatically generate a pile function; this allows you to test the interaction with external resource operations and does not contain any hidden vulnerabilities. C ++ Test does not actually call these functions, but calls the pile function and returns the value provided by the pile function.

If you need to control the returned values, you can create a pile call table to define the relationship between input and output. You can also add user-defined functions. For example, if you want to use the original function and the function is defined in different files, or you want to simulate the behavior of the original function, instead of using a simple function, it automatically generates a C/C ++ class Test driver and a pile function, which is unique to C ++ Test;

Only C ++ Test can automatically Test C/C ++ Class 1 when it can be compiled) without any user intervention. This allows you to automatically detect code errors as soon as possible and locate and correct them in the easiest, most economical, and fastest way. Without such automated tools, a large amount of time and resource consumption will lose the potential benefits and practical significance of unit testing.

Static Test
C ++ Test is embedded with the industry's most famous elastic C ++ (epcc), More efficient C ++ (mepcc), meyer-klaus (mk), and Universal Code Standard (ucs) more than 700 C/C ++ specifications can be customized by the user.

At the same time, it also integrates some specifications accumulated by parasoft. In a static Test, C ++ Test performs a detailed scan of the Code to verify whether there is any conflict with these specifications in the Code and detect some simple or low-level errors as soon as possible, avoid the proliferation of integration brought by them.

White box testing
C ++ Test provides an effective and efficient way to perform white-box tests. C ++ Test automatically executes all white-box testing processes and automatically generates and executes well-designed Test cases. Automatically mark any running failure and display it in a simple graphical structure. These test cases are automatically saved for future regression testing.

Because C ++ Test can automatically generate a pile function or allow you to add your own pile function, it can Test the class that references external objects. In other words, C ++ Test can run any one or more classes and automatically generate and execute a set of Test cases, which are designed to discover as many errors as possible. C ++ Test allows you to customize the generation of white-box Test cases, and at what level projects, files, classes, or methods) to execute tests.

Black box testing
C ++ Test reduces the burden of such tests by automating most of the Black Box tests. In particular, there are two ways to automate the first phase of the black box test-create a test case: to help you set the results of each test case.

You can simply enter the Test case input, and then let C ++ Test run the Test case and automatically determine the actual output result. If the result is correct, no other action is required. If the result is incorrect, you can enter the expected output. This is faster and easier than manually entering the results of each test case. Automatically generate the core set of test cases.

C ++ Test automatically designs a set of white-box Test cases with broad spectrum. When using these test cases in a black box test, you simply need to observe the actual output results and then enter the expected values for any incorrect results.
When you need to enter or modify a test case.

  • This section describes C ++ classes and C # classes.
  • How to Write C ++ code
  • Main application fields of C ++ Language
  • Managed extension C ++ migrate to C ++/CLI
  • How beginners learn C ++

You can simply enter the value in the framework of the Test case automatically generated by C ++ Test. This will significantly accelerate the process of creating test cases. C ++ Test fully automates the remaining black box Test steps in addition to most of the steps for automated setup of black box Test cases. Press a key to run one or more groups of projects, files, classes, or methods. C ++ Test then automatically executes all Test cases, reports all input/output relationships, and marks any Test cases whose actual output is inconsistent with expectations or causes program crash.

Regression testing
C ++ Test fully automates all the steps related to regression testing. When C ++ Test tests a class for the first time, its Test and Test parameters are automatically saved. When you need to perform a regression test, you can open appropriate projects and files to run all the original white box and black box test cases; C ++ Test automatically runs identical Test cases and Test parameters, and reports any problems found. This means that you can immediately know whether the modification has introduced any errors.

Monitoring and testing coverage
To help you measure the effectiveness of the currently used Test case set and provide you with the highest possible coverage information, C ++ Test automatically monitors Test coverage, C ++ Test supports real-time and Test coverage, and then establishes a comprehensive Test coverage report.

The coverage window graphically shows the currently executed code lines, executed rows, and the number of executions per row. Therefore, it not only indicates whether a code line has been tested, but also shows how thoroughly tested. This information is very helpful for determining the code that requires additional testing.

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.