Troubleshooting in software testing

Source: Internet
Author: User

Software TestingMedium,Troubleshooting(That isDebugging. The test is successful because an error is found. Identify the cause and location of the error based on the error signs, and correct the error mainly relies on the troubleshooting technology.

1. troubleshooting Process

As shown in, the troubleshooting process begins with the execution of a test case. If the test result is different from the expected result, an error is reported. The Troubleshooting process must first identify the cause of the error, then, correct the error. Therefore, the troubleshooting process has two possibilities: one is to find the cause of the error and correct the error; the other is to make some speculation that the cause of the error is unknown, then we design a test case to confirm this speculation. If one speculation fails, we make the second speculation until we find and correct the error.

 

Troubleshooting is a rather difficult process. Apart from the psychological barriers of developers, the errors hidden in programs have the following special characteristics:

(1) The external symptoms of the error stay away from the internal cause of the error, which is more serious for highly coupled program structures;

(2) correct one error and cause another error (temporarily) to disappear;

(3) Some symptoms of errors are just an illusion;

(4) Some symptoms of errors caused by temporary negligence of the operator are not easy to track;

(5) The error is caused by wind, not the program;

(6) It is difficult to accurately reconstruct input conditions (for example, the input order of some real-time applications is not certain );

(7) There is always no error sign, which is especially common for embedded systems;

(8) The error is caused by the distribution of tasks on several different processing machines. [Nextpage]

In the process of troubleshooting software, you may encounter problems of both sizes and sizes. As problems increase, the pressure on Troubleshooting personnel increases, the excessive stress caused developers to introduce more new problems while eliminating one problem.

Although troubleshooting is not a studious technique (sometimes people prefer to call it art), there are still some effective methods and strategies. The following describes several troubleshooting methods.

2. troubleshooting

No matter which troubleshooting method is used, there is only one goal, that is, to identify and eliminate the cause of the error, which requires that the troubleshooting personnel can combine the intuitive imagination with the system evaluation.

Common troubleshooting policies are classified into three types:

① Original class (brute force)

② Backtracking)

③ Cause Eliminations)

The original troubleshooting method is the most common and inefficient method. It is used only when you are helpless. The main idea is "finding errors through a computer ". For example, the output memory and register content, and some output statements arranged in the program. With a large amount of on-site information, we can find the error clues, even though they can succeed, however, it will inevitably take a lot of time and effort.

The backtracking method can be successfully used for program troubleshooting. The method is to manually trace the control process from where an error occurs until the root cause of the error is found. Unfortunately, after the program grows, the possible backtracking route increases significantly, as a result, the human process is completely traced back to the desired and not reachable.

Based on the principles of induction and deduction, exclusion adopts the concept of "divide and conquer". First, we are afraid that all data is related to errors. Assume a cause of error and use the data to prove or refute it; or list all possible causes at a time and eliminate them by testing them one by one. As long as a test result shows that a certain hypothesis has already been presented to the slave end, the data will be refined immediately to win the game.

Each of the above methods can be supplemented by an error troubleshooting tool. Currently, debugging compilers, dynamic debugger ("tracker"), automatic test case generator, memory image, and cross-access graph tools are widely used. However, no tool can replace the role of a developer after carefully reviewing and reviewing the complete design documentation and clear source code. In addition, we should not waste one of the most valuable resources in the troubleshooting process, that is, the comments and advice of other members of the development team, which is called "the observer is confused and the observer is clear ".

As mentioned previously, modifying an old problem may introduce several new problems, and sometimes the program gets messy. However, if you can ask yourself three questions before each error correction, the situation will be greatly improved:

① Is the cause of this error still possible in other parts of the program?

② What is the impact of this modification on the related logic and data in the program? What problems does it cause?

③ How Was The Last Time I encountered a similar problem solved?

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.