What is the underlying logic of software testing?

"Similarity between things is the underlying logic.

Only the similarities in differences and the unchangeable things behind changes are the underlying logic.

......

Underlying logic+environmental variables = methodology "

Then let's discuss: What is the underlying logic of software testing?

1. Basic knowledge of software testing

The basic knowledge of software testing enables us to reach a * * * knowledge, so it is easier to discuss the underlying logic of software testing based on this * * * knowledge. The basic understanding of software testing needs to be summed up in one sentence, that is, to grasp the essence of software testing and briefly describe the correct values of software testing, but it is not someone's values of software testing, but the values of software testing that most people can accept.

Software testing is to verify whether the functional characteristics of the software meet the requirements;

Software testing is to find defects in software.

Software testing includes static testing-requirements, design and code review activities.

Software testing is to systematically and completely evaluate the quality of software products and provide quality information.

Software testing is to expose and reveal product quality risks.

Software testing is not only a technical activity, but also a comprehensive social and psychological activity.

Software testing is to greatly reduce inferior cost by investing in quality assurance cost.

According to these understandings of software testing, to explain the basic cognition of software testing in one sentence is to obtain real and all-round quality information of software products through various means on the basis of understanding the real needs of users. Whether verifying whether the functional characteristics of the software meet the requirements, evaluating the quality of the product or revealing the quality risks of the product, the judgment is based on the obtained real quality information about the product, and defects can be regarded as by-products in this activity.

What is emphasized here is the understanding of the real needs of users. On the one hand, it shows that "there is no quality without users, and quality exists relative to users". We must complete the test from the user's point of view, on the other hand, it is the real needs of users, not the false and wrong needs. Business requirements will eventually be decomposed into user role requirements, and the functional/non-functional requirements of the system are also to meet the needs of users.

The "software products" mentioned here are not limited to programs, but also include data, requirements documents, design documents, codes, user manuals, technical manuals and so on.

After understanding "what is software testing", we can discuss the underlying logic of software testing below.

2. The underlying logic of software testing

The basic logic of software testing can be summarized as the answers to three questions:

Why test it?

Test what?

How to measure?

Moreover, in the process of answering these three questions, we should be able to adapt to different test objects (such as Windows/MacOS native applications, web software, mobile app, embedded software) and different test types (such as functional test, performance test, security test, compatibility test, etc.). ), different test levels (such as unit test, integration test, system test, etc. ), different teams and different products have become ubiquitous. Although there are different testing methods, techniques and practices in different environments, we can abstract their similarities.

Based on this consideration, let's answer these three basic questions:

Why test it? As long as people do the work, there is no guarantee that it will be foolproof, and there will be problems. If something goes wrong with the software, it is likely to bring losses to customers, or make customers dissatisfied, which will eventually lead to the loss of corporate interests. Numerous quality accidents in the past have also proved this point. Before delivery to customers, the software needs to be fully tested, otherwise the consequences will be very serious.

Test what? According to the delivered quality target, that is, starting from the quality target, the target is decomposed, and then the quality data about the tested object to be obtained is determined for each specific sub-target, so as to determine its test scope or test items. If we go further, we decide the priority of test items according to the different feelings of users on quality characteristics and functional characteristics. This part belongs to the test analysis work, involving test risks and test strategies.

How to measure? It is to find the way, method or means to obtain the quality data of the tested object, including the design of test scheme, scene, test case or test data.

Three questions about the soul of software testing, how to get back?

Question 1: Why can't this Bug be detected?

Question 2: How is the exam measured? Will it be measured or not?

Question 3: Take the exam quickly! Why do you always procrastinate when testing, and finally report bugs?

In fact, it also embodies another layer of logic of "software testing", namely:

1 The underlying logic presented by the answer to the question: testing is endless, testing is always risky, and the more bugs are developed, the more bugs are missed; Testing can only prove that the defects found are defects, but can't prove that the software has no defects, because testing is a sample experiment.

The answer to the second question shows the underlying logic: the test work (including the formulation of test objectives, the process of test analysis and the corresponding test design method) can be clearly explained. Testing is not an isolated work, it is influenced by requirements (such as vague requirements), system design (such as coupling and complexity) and programming (such as secretly modifying code), and testing should work closely with products and development.

The underlying logic of the answer to the third question: We can complete the test analysis, test plan and test design before the code is developed and written, but the system-level test execution needs to wait for the completion of the version development, and the test execution is a post-work, so the test time is easily squeezed out by the pre-development work, and the delay of the project can easily cause the illusion that the test is dragging its feet.

The underlying logic of testing (probabilistic thinking): testing is a sample experiment, which needs careful analysis and design, and strives to reveal the quality risk as soon as possible at the least cost.

3. The basic logic of the test process

The testing process conforms to the general engineering project flow. After the process of analysis, planning, design, implementation and evaluation, any link is indispensable and every link is very important, but the former link will affect the latter link, so the more important it is. Test analysis is the foundation, followed by design, implementation and evaluation, forming a pyramid model.

Another underlying logic of the testing process: forming a closed loop. If problems are found in the testing process after evaluation, it is necessary to re-analyze, modify the scheme, modify the design ..... and then form a new closed loop through a complete process.

4. Basic logic of test analysis

The underlying logic of test analysis is based on systematic thinking and structured thinking, which needs to be systematically considered from many aspects such as project background, product structure and quality requirements. Some clues can not be ignored, which can completely present the test scope, identify various test risks, and finally clarify the test items and their priorities.

One of the underlying logics of test analysis: test analysis is a systematic analysis process that is stripped layer by layer and deepened step by step. Analyze the test object from different dimensions such as business requirements, user behavior, system functions and application scenarios, and finally determine what to test.

The second underlying logic of test analysis: test analysis is also a process of game, selection and balance, which requires determination and insight to make a choice, such as using the 80/20 principle to grasp the main risks, and sometimes abandoning some secondary risks.

The third bottom logic of test analysis: from the end, from the test target, and finally back to the test target. For example, considering how to measure the requirements of test adequacy, the final analysis result-the completion of each test item can meet the requirements of test adequacy.

5. The underlying logic of testers

Finally, talk about the underlying logic of testers. Whether a tester is valuable does not depend on his/her current working attitude, knowledge and skills, but on the speed of progress of working attitude, knowledge and skills, because we can't change the past, but we can change the future. As long as you keep learning and reflecting, you can quickly complete evolution and grow up, and no one can stop your magnificent future.