WHAT What is bug analysis

Bug analysis: This article refers to bug analysis at the micro level. Start with a single valuable bug, track and analyze the essential cause of the bug, and improve and optimize each role of the product and the project process on this basis.

As you can see, bug analysis is divided into two parts. The first is the “bug analysis” itself, and the second is a series of optimizations based on the results of the analysis.

WHYWhy do bug analysis

Reason 1: Bugs are used to improve testers’ overall control over product quality, from product demand PK in the early stage of the project, to self-testing, iterative testing, integration online testing, and user feedback after the release. It can be said that bugs almost run through all stages of product development. For testers, good use of bugs in the hand, improve the understanding of the product, can be more efficient and effective testing, so as to control quality risk, improve product quality. Some people say that the root cause of all product bugs is the code. If the launch of a product is a marathon, then bugs are the pits we’ve stepped on over the years. Pick up from where you fell down, find the root cause of bugs through analysis, and think about how to optimize and improve from all aspects to avoid similar “pits” in the future, so that you can run faster and farther in the next race.

HOW How to do bug analysis

Let’s start with the model and explain how to do bug analysis step by step.

Step 1: How do I pick bugs

There are many sources of bugs, including product experience, development self-test, test discovery, mass test feedback, gray feedback, post-release feedback, and so on. When we do bug analysis, the first thing we face is “how to choose the right bug”. Here are a few suggestions:

  • Select items that have a significant impact on users, such as flash backlogs or bugs that cause a function to be unavailable
  • Select typical: a series of problems of the same type, such as skia adaptation causing 2.3 and 4.4 phones to fail to boot
  • Select the ones that are hard to discover: build up a problem library to complement test cases
  • Choose the promotion value: can refer to other platforms or other products, such as: white screen series

In short, as long as it is in line with the target through bug analysis, more efficient and effective guarantee of product quality bug, can be selected to do bug analysis.

The second step is to collect bug information

Assuming that you have selected the bug to analyze, the next step is to gather as much valid information as possible about the bug. Common “bug messages” include the following:

  • Product information under test: such as APP name and version number
  • Test model and environment: for example, Xiaomi 4.4 system, wifi network, WUP test environment
  • Severity level: For example, major, Minor, or Recommended
  • BUG modules: such as bookmark module, font module
  • Test procedure: Describes step 123 of the test operation
  • Expected results & Actual results: Shows bug behavior compared to normal predicted results
  • Additional information: such as screenshots, videos, logCAT information, etc

It should be pointed out that, considering the actual performance of the bug, we should provide as much effective information as possible when submitting the bug and “isolate” the problem itself. The advantage of this is that it helps developers filter out distractions, reduce troubleshooting time, and locate bugs more efficiently. For example, using isolation to do a “preliminary screening,” testing can quickly do a preliminary round of locating bugs.

Step 3: How to do bug analysis

As mentioned earlier, bug analysis is all about tracking down the root cause of bugs. In the actual test, based on the experience of the BUG analysis team, we divided the process of BUG analysis into three types. Combined with their own bug characteristics, in the analysis can choose the appropriate method to apply.

1. Direct analysis method

Application scenario: The bug module can be directly seen or preliminarily located through quarantine screening.

Here’s an example:

Huawei M version (6.0 kernel), Picture display is abnormal.

Specific system problems, it seems that the cause of the bug is relatively clear, is the display problem under M system. We can usually quickly find the cause of a bug by looking at the official release update documentation and learning about code changes.

In the case of this bug, Chrome has the same problem and has been fixed, we can find relevant information on the official website, you can learn the root cause of the bug.

2. 5W analysis method

Application scenario: Relatively clueless, little information other than the bug itself.

5W is an analytical method to identify and explain causality and explain the essential causes of events by constantly asking “why”. Here, we use the 5W idea in BUG analysis to trace the root cause of the BUG and find the cause of the BUG from the source.

The characteristics of 5W bug analysis are: starting from the appearance, asking step by step, the answer to the previous question leads to the next question, until the essential cause of the bug is obtained.

Here’s an example:

BUG Source: X5 Lab Blink Version title: Using a third party font, page display exception test steps:

1. Change the popular “Rippling fruit” font on your phone;

2. Enter THE QQ browser to visit the pages of Baidu and NetEase. Symptom: Text is not displayed on the page

Analysis steps: (1) First find the outermost manifestation of the problem, that is, make clear what the manifestation of the BUG is; (2) Ask questions about the outermost expression to find out the direct cause of the BUG; (3) Use the 5W method to continuously ask for the direct cause for several times until the essence of the BUG is found;



It can be seen that by continuously asking why, we can always dig into the root cause of bugs. Of course, for starters, you probably won’t be able to get to the bottom of the bug all at once, but that’s okay. If you do it a few times and develop sensitivity, you’ll always be able to draw a line.

3. Case analysis

Application scenario: Based on the existing knowledge reserves, have certain tracing ideas, can divide the possible causes of the bug into several categories.

Case detection analysis method, from the occurrence of the case, based on experience analysis to determine the possible suspects, and then use high-tech tools to investigate the suspects one by one, and finally identify the real “murderer” by evidence.

Here’s an example:

“Blank screen after loading progress bar of any secondary link of Mi4 (4.4.4) in Kanalignment network”. First, extract valuable points from the description of the bug.

[Preliminary assessment]

1. Normal UC can rule out network abnormalities. 2

2. Network module is abnormal in network interaction, and resources are not pulled. [Refining doubt] Suspect 1: Only Mi 4 has this problem? Does it depend on the model and ROM version? Is there any feedback online? Doubt 2: What is kanzhen-net to do? What’s special about it? Why level one link is normal, level two link is white screen? [Collecting evidence & Eliminating interference] Step1 For doubt 1, compare and verify with other models, and the verification result is that other models do not reappear. Step2 find online data and confirm whether there is similar user feedback online. (1) The feedback version is 6.5.0.2170, and the feedback time is 20160324, which is earlier than the discovery time of the above bug. (2) The user model is LetvX500, so is changing the mobile phone. Overturn the judgment of the above single model problem. Step3 Check website is the largest platform for enterprise review, employer brand display and employee sharing in China. Other recruitment sites did not appear similar problems, initially can not see what special site. Step4 Through the inspector debugging, it is found that when accessing the secondary link of kanalignment network, the network request directly returns to 403, but the web resource is not pulled, and the request is rejected by the server. Why does the server reject network requests in some situations? It is suspected that the agent directly connected strategy leads to direct connection of some models and agent of some models. In addition, even if it is configured as a proxy, direct connections may occur due to various uncontrollable factors. According to log, when the white screen appears, it is indeed the agent that goes. At that time could not be further verified: no problematic mobile phone access to the site went directly connected. Guess the reason: in the case of proxy, the same IP high-frequency access, kanzhen-net shielding our proxy IP. Solution: Add a target network to the mandatory direct whitelist, and then you can pull resources normally. Below is a mandatory proxy whitelist pulled by QB from the background, with the addition of watchnet. [Closing Statement] The blank screen problem is caused by the abnormality of the network module. The limitation of the proxy policy may lead to such problems (such as ticket purchasing and voting, etc.) when the proxy accesses the site with invalid access shielding.

Fourth step, summarize experience and improve optimization

1. Bug moved left

As you all know, the earlier a bug is found, the cheaper it is to fix. Through bug analysis, do a good job of prevention, as early as possible to find problems, so as to reduce the repair cost and product risk.

2. Test optimization

Through the accumulation of bug analysis cases, improve the understanding of the overall structure of the product, design the test scheme efficiently and effectively, and better control the product quality risk.

3. Improvement of various roles in the project

Product side: more reasonable demand, predict implementation risk, avoid bugs from the design level in the early stage; Development side: improve code quality through coding specifications, strengthening self-testing and code review; Test side: supplement and optimize test plan, understand product architecture logic, improve experience and technology, pay more attention to key bugs and improve product risk assessment ability.

Here’s an example:

Bug analysis case: “White screen of a large Excel file” Root cause of the Bug obtained after analysis: there was a logical defect in the code when realizing the effect of fading out of file loading, which would lead to hidden WebView before the content of the article was loaded, white screen of the page and failure to open the file. (1) Test optimization and improvement scheme: a. Supplement the file format supported by QB that needs to be verified; B. Change the previous random selection of several formats for file logic verification to targeted selection of file formats to ensure; C. Verification of specific open logic (integration requires each logic to be verified with at least one file format) ensures coverage of file format and open logic verification;

(2) Supplement the focus on file size in file testing. Harvest: file format compatibility test more targeted, behind in the third party test tuning up and the demand for open Q la new requirements, are directly according to the format of the form to develop self-test, at the same time, so also our own validation, covers both QB file open logic, also covers the basic user commonly used file format

Actual results: From version 6.2 to 6.9, 14 bugs related to specific file formats were found; Such as:

ID:51182410 [File] A third party opens TXT using a browser. Garbled characters are displayed. ID:51343519 Online: No user feedback about the file format appears online.

Our thinking

Bug analysis is a means, not an end. From the root cause of the bug, we can reflect and recall the various stages of the bug, and think about how to avoid similar problems, stop stepping on pits, and get improvement in the next test, which is what we want. Similarly, the result of bug analysis is a closed-loop process of continuous improvement and optimization, which is a subtle improvement of testing ability of testers and a promotion of consciousness of ensuring product quality of all roles in the project process. Therefore, please do a good job of bug analysis, for product quality escort!

Copyright, prohibit reprint