Human behaviors are highly targeted, and establishing a correct goal has an important psychological impact. The psychological problem of software testing is how to correct the relationship between the two goals of the test to make the test activity more effective.
1. The program testing process is destructive.
When testing a program, people always want to add some value to the program. To increase the value of a program by testing is to identify and modify as many program defects as possible through testing to improve the reliability or quality of the program.
Therefore, do not test the program just to prove that the program runs correctly. Instead, you should first assume that there are hidden errors in the Program (this assumption is almost true to all programs), then test the program and discover as many errors as possible.
As a matter of fact, if you target a test to prove that there are no defects in the program, you will be subconsciously inclined to achieve this goal. That is to say, testers tend to select test data that is less likely to invalidate the program. On the other hand, if the test target is to prove that there are defects in the program, some testing data that is easy to detect program defects will be selected. The latter attitude will add more value to the program than the former.
Therefore, most test professionals agree with Myers's definition of a test: "A test is a process of executing a program to detect errors ." This definition means that the process of program testing is destructive, or even a "Abuse" process. Developers may not want to do this because people tend to build rather than destroy it. This definition also implies how to design test cases (test data) and who should not perform tests for a specific program.
In fact, if a program segment is tested and a defect that can be corrected is found, or the test is ultimately determined that there are no other defects, this well-designed and effectively executed test should be called "successful ". The so-called "unsuccessful" test only refers to the test that fails to properly check the program and find hidden defects in the program. Because it is impossible for the software to have no defects and do not find them, of course the test is "unsuccessful ".
"Software testing is the process of proving that the software does not have errors ". For almost all programs, or even very small programs, this goal is practically impossible. Because even if the program fully meets the expected requirements, it may still contain defects. That is to say, if the program does not work as required, it is obviously flawed, but if the program does not do what it does, it also has defects.
Psychology research tells us that when people do something they already know is inappropriate or impossible, their performance is often quite bad. Defining program testing as a process of identifying errors in the program makes testing a task that can be done, so as to overcome psychological problems. Although this looks like a subtle text game, it has a huge impact on successful software testing.
In short, software testing is more appropriate to be seen as a destructive process of trying to discover errors in the Program (assuming they exist. A successful test can improve the software quality by inducing program errors. Of course, in the end, people still need to establish a certain degree of confidence through software testing: the software did what it should do, instead of doing what it should not do.
2. programmers should avoid testing their own programs
It is inappropriate for developers to test their own code. Development and testing are different activities. Development is the act of creating or establishing something, such as a function module or the entire system. The important purpose of the test is to prove that a module or system is not working properly. There are essential contradictions between these two activities. It is unlikely that a person can play very well in both opposing roles. Therefore, developers should be limited to participate in the test. The most appropriate task for them is to perform the bottom-layer test-unit test.
After a programmer completes the constructive work of designing and writing a program, it is very difficult to suddenly change his views overnight and try to form a completely negative attitude towards the program. Therefore, most programmers cannot effectively test their programs because they cannot bring themselves into the necessary mental state (rather than exposing errors in their own programs. In addition to this psychological problem, there is also an important problem: the program may contain errors due to the programmer's narration or misunderstanding of the problem. In this case, when programmers test their own programs, the same misunderstanding often makes the problem hard to find.
3. The program design organization should not test its own program
In a macro sense, a program design organization or an engineering project is a living organism, and it also has psychological problems. In most cases, the ability to complete programming tasks at a certain cost within a given date is measured by the program design organization and project management personnel. The reason for doing so is that the time and cost indicators are easy to measure, and the quality of the program is very difficult. It is very difficult for the program design organization to be objective when testing their own programs, because if you look at the test with the correct definition, it is unlikely that the test will be completed as planned, it is unlikely that the cost will be limited to the required range.
The three most important factors in software production are quality, progress, and cost. Due to cost and schedule constraints, it is not easy to develop a high-quality, fast delivery, and low-cost software product. That is to say, it is difficult to achieve three goals at the same time. Therefore, in the development of software products, we must weigh the relationship between them. This means that the characteristics of software products must be measured and estimated.
Software testing is undertaken by independent testing agencies and has many benefits. Independent testing means that software testing is conducted by organizations that are economically and managed independently of development institutions. Independent testing can avoid software developers from testing their own software. Due to psychological problems, it is difficult for software developers to objectively and effectively test their own software, it is more difficult to find out the errors caused by misunderstanding of the problem. Independent testing can also prevent software development institutions from testing their own software. The development process of software products is subject to time, cost, and quality constraints. In the process of software development, when there is a conflict between time, cost, and quality, the quality is the most likely to be ignored. If the testing organization and the Development Organization come from the same organization, the testing process is under pressure from the management of the same source of the Development Organization, which interferes with the testing process.
The adoption of independent testing is of great significance for improving the effectiveness of software testing, both in terms of technology and management.
Objectivity-an objective attitude towards software testing and errors in software. This objective attitude can solve psychological problems in testing and work with an attitude that exposes errors in software, it cannot be affected by any detected error. The economic independence makes the test more adequate to meet the test requirements.
Professionalism-as a kind of professional work, independent testing is bound to accumulate a lot of practical experience in the long-term work process to form your own professional knowledge. At the same time, software testing is also a highly technical task, which requires a professional team to study and carry out engineering practices. Professional division of labor is an Inevitable Way to Improve the test level, ensure the test quality, and give full play to the test effect.
Authority-because of professional advantages, the test results of independent testing work are more convincing, and the test results are often associated with the quality evaluation of software, the evaluation of professional independent testing institutions, more objective, fair, and authoritative.
Resource assurance-the primary task of an independent testing organization is to conduct independent testing, which ensures the testing work in terms of funding, manpower, and planning, it will not reduce the investment in testing because of the development pressure. Reducing the effectiveness of testing can avoid the adverse impact of the development unit focusing on software development on testing.
Source Document