Software Test Basics: http://www.scstlab.com.cn/techmain.htm 1, Overview II, Software Tests 3 Psychological problem six, good test engineers should have quality, reference software test foundation
First, outline the rapid development of information technology, so that software products apply to various fields of society, the quality of software products naturally become the focus of people 's common attention. Regardless of software producers or software users, software developers must use quality as one of the important goals of the enterprise in order to occupy the market, so as not to be eliminated in fierce competition. In order to ensure the smooth completion of its own business, it is of course hoped to choose high quality software. Software products that have poor quality will not only increase the development cost of developers, but also other responsible risk, causing the company's reputation, and then impact stock markets. In some key applications, such as civil aviation booking systems, bank settlement systems, securities trading systems, automatic flight control software, military defense and nuclear power plant safety control systems, etc., can also cause catastrophic consequences. The software crisis once is the hottest topic of the software industry and even the entire computer. In order to solve this crisis, software practitioners, experts and scholars have made a lot of efforts. Now people have gradually realized that the so-called software crisis is actually only one situation, that is, there is a mistake in the software, which is these errors lead to software development at cost, progress and quality out of control. Wrong is the properties of the software, and it is impossible to change, because the software is done by people, all the work made by people will not be perfect. The problem is how we avoid errors to generate and eliminate the generated errors, so that the error density in the program reaches the lowest possible level. There are many reasons for the software to bring a mistake. Specifically, there are few points: 1, there is not enough communication, misunderstanding or do not communicate on what should be done or should not do anything (application requirements) Developed without clarity. 2, software complexity graphical user interface (GUI), customer / server structure, distributed application, data communication, super large relational database, and large system scale, making the complexity of software and systems exponentially increase, no modern software development Experience is hard to understand it. 3, the programmer is the same as all of the people, and the programmer will go wrong. 4, the impact of changes in demand variations is multifaceted, customers may not understand the impact of demand changes, may also know but have to do it. The consequences of demand may be that the system is redesigned, the designer's schedule is rearranged, and the work that has been completed may have to be done or completely abandoned. It has an impact on other projects, and hardware demand may have to change, and so on. If there are many small changes or a large change, the known or unknown dependence between the items may interact with each other, and the complexity of the demand change may result in errors, which may also affect The enthusiasm of engineering participants. 5, the schedule of time pressure software project is difficult to accurate, many times, it is expected to be predicted and guess. When the final period is inhalation, the mistake is coming. 6, your own negotiate more like: 'No problem' '"This thing is easy to' 'a few hours I can take it out' too much unrealistic 'no problem', the result can only be introduced. 7. The code document is poor, poor, poor, poor documents, make the code maintenance and modification of the abnormality difficult, and the result is a lot of errors. In fact, in many institutions do not encourage their programmers to write documents for code, they don't encourage programmers to write code clear and easy to understand. Instead, they think that less write documents can encode faster, and unable to understand the code easier The confidentiality of the work ("painful must be readily read"). 8, software development tool visualization tools, class libraries, compilers, scripting tools, and so on, they often bring their own errors to the application. As we know, there is no good engineering as the foundation, and the use of object-oriented techniques will only make the project more complicated. In order to better solve these problems, a variety of efforts have made a variety of efforts.
People think that better programs allow us to get rid of these troubles, which promotes the development of programming languages, more languages begin to popularize, in order to make programs easier to understand the structural programming language, such as PL / 1, Pascal, etc .; in order to solve real-time multitasking requirements, structural multi-task programming languages, such as Modula, ADA, etc .; in order to improve reuse development, object-oriented programming languages, such as SIMLASA, etc .; to avoid incorrect demand , Development formal description language, such as HAL / S, etc., make it possible to establish a description based on natural language, and people describe demand in formal language; in order to support large database applications, visualization tools, such as Visual Studio, Power Builder Wait. The program language has played a role in improving software production efficiency, but it has a small effect on the entire software quality, more reliability, compared to other factors. It may be because the program language is based on stringent grammar and semantic rules, and people attempt to prove the correctness of the program with formal certification methods. It is possible to treat the program as a mathematical object, which proves that the program is correct from the sense of math. Mathematician is most interesting to formulate methods, talking very attractors in the paper, but the actual value is very limited, because the formal proof method only can be used after the code is written, this is obviously too late, and for large The procedure proves very difficult. Inspired by other industrial projects, software engineering has emerged, and software development is considered an engineering to develop planning and management software. For applications where demand is uncertain, the development model of progressive and iterative classes can be used. It is also possible to use Fast Application Development (RAD) and Collaborative Application Development (JAD) technology, and jointly participate in the development software specification by software developers and user representatives. The basic ideas of RAD and JAD are developers and users to design the screen in the system. Developers quickly write the most basic functions of these screens, and then give them to the user, then users and developers review these screens Confirm that they have reached the user's request, this cycle has continued until the basic part of the system is defined. Once the design is accepted by the user, the developer will complete the code required to fully implement the screen. One basic difference between the RAD and the traditional software development project is that the application RAD system is published in phases. Traditional projects generally release, also called "Big Bang". The RAD method uses an efficient development tool that developers can design the basic screen of the system very quickly, allowing users to see how the system seems to look at the future in the development cycle, avoiding the traditional development project, a big medieval and boring Understand the description. IBM's Dr. Harlan Mills proposed a clean room process. The net chamber process combines formal program verification and statistical process control (SPC). In this method, the prevention defect occurs first with the correctness of mathematics, and then use the MTBF metrics. The net chamber process is a quite new software development method that requires software development to make major changes in management methods and technical methods, especially those that require SPC to apply to software, which affects its extensive acceptance. Hardware costs continue to decrease, support new powerful workstations and networks that have been running in Case tools have become a work platform for software engineering, and the Case tool completes some specific software development processes. These tools provide software designers to describe the ability of software design in graphical ways, which is easy to maintain, easy to cross-check, easy to understand. Many people (especially the Case Tool Supplier) I believe that the Case tool plays a role to solve the software crisis and save the software industry. But in fact, the situation we have seen is a lot of company spent a lot of money, but very Less use, the reason is that the process of these tools is not applicable to the institutional software design process.
Today, with many new technologies and tools can be developed today, the maturity problem of software development process begins to attract people's attention. The main crux of this product consistency is management, so people turn targets to management improvements, and some activities that have been targeted to improve software development have shown positive results. Here are some typical texts. SEI SW-CMMISO Spice (Software Process Improvement and Capability Determination) Bootstrapiso-9000-3TICKITTRILLIUM in fact, for software, there is still something like silver bombs. No matter what technology and what method, the software will still be wrong. Adopting new languages, advanced development methods, perfect development processes, can reduce errors, but it is impossible to completely eliminate errors in software, these introduced errors need to be tested to find out, the error density in the software also needs to test Perform an estimate. Test is the basic components of all engineering disciplines, which are an important part of software development. The test has been accompanied by the test of the self-programs design. Statistics show that in a typical software development project, software test work tends to account for more than 40% of the total workload of software development. In the total cost of software development, it takes 30% to 50%. If the maintenance phase is considered, the cost ratio of the test may be reduced when discussing the entire software survival period, but in fact maintenance work is equivalent to secondary development, and even several development, it must also contain many test work. . Therefore, the test is required for software production. The problem is what we should think "What method is used, how to arrange test?" II. The purpose of the software testing software test determines how to organize test. If the purpose of the test is to find the error as much as possible, the test should be directly part of the software complicated or more than the previous error. If the test is to provide end users with quality assessment with certain credibility, the test should be directly for commercial hypotheses that are often used in practical applications. Different institutions will have different test purposes; the same institutions may have different test purposes, which may be testing different levels of different areas or different levels of the same area. When talking about software testing, many people collect GRENFORD J. Myers in the "The Art of Software Testing" book: 1, software testing is to find errors and execute the process of executing the program; 2, test is to prove the program It is wrong, not the procedure has no error. 3, a good test case is that it can discover the mistakes that have not been discovered so far; 4, a successful test is to discover the undisputed testing of the wrong test. This point of view can remind people to test to find errors, rather than demonstrating the correct functionality of software. But only literally understanding, this point may generate misleading. It is considered that the error is the only purpose of software testing. It is not worth testing that there is no error. This is not the case. First, the test is not just to find out the error. By analyzing the causes of errors and errors, the project manager can help the project manager discover the shortcomings of the software process currently used to improve. At the same time, this analysis can also help us design a targeted detection method to improve the effectiveness of the test. Second, no error detection is also valuable, complete testing is a method of assessing test quality. The detailed and rigorous reliability growth model can prove this. For example, Bev Littlewood discovered a test that was tested and n-hour, the system continued to operate n-hours. Third, the basic method of software testing software testing is a variety of ways. For software testing technologies, you can classify from different angles: from whether the angle of being measured software is required, it can be divided into static testing and dynamic testing.
From the perspective of testing for the internal structure of the system and the specific implementation algorithm, it can be divided into white box testing and black box testing; 1, black box test black box test also known as functional test or data driver test, it is known The product should have functions, pass the test to detect if each function can be used normally, when testing, treating the program as a black basin that cannot be opened, does not consider the internal structure and internal characteristics of the program, test, test In the program interface, it only checks if the program function is used normally according to the requirements of the requirements specification, and the program can properly receive the input number saw to generate the correct output information, and maintain external information (such as database or file) Sex. The black box test method mainly has equivalence classification, boundary value analysis, due to fruit pictures, error speculation, etc., mainly for software confirmation testing. "Black Box" method is the external structure of the program, regardless of the internal logic structure, testing the software interface and software function. The "black box" method is exhausted input test, only use all possible inputs as a test case, in order to find all the errors in the program in this way. In fact, there is a number of infinity tests, but also do not only test all legal inputs, but also test those non-legal but possible inputs. 2, white box testing white box test, also known as structural test or logical drive test, it is known that the internal work process can be tested to detect whether the internal action is normal in accordance with the specification of the specification, according to the structural test procedures inside the program, Whether each passage in the inspection process can work correctly according to the scheduled requirements, regardless of its function, the main method of the white box test has logical drive, basis test, etc., mainly for software verification. "White Box" method fully understands the internal logical structure of the program and tests all logical paths. "White Box" method is exhausted path test. When using this scenario, the tester must check the internal structure of the program, from the checkpoint logic, to draw test data. The number of independent paths throughout the program is an astronomical figure. But even if each path is tested, there may still be errors. First, the exhaustive path test must not detect the program violates the design specification, that is, the program itself is a wrong program. Second, the exhaustive path test is impossible to detect the procedure for missing paths. Third, the exhaustive path test may not find some errors related to data. 3. ALAC (Act-Like-a-Customer) Test
The ALAC test is a test method developed based on the knowledge of customers. ALAC testing is based on the principles of many errors based on complex software products. The biggest beneficiaries are users, defect findings, and corrections will be the most prone to errors for which customers are most prone to. Fourth, software testing complexity and economy people often think that developing a program is difficult, and a program is relatively easy. This is actually misunderstood. The design test case is a fine and requires high techniques. It will take care of the rest of this, and there should be no omissions. Whether it is a black box test method or a white box test method, it is impossible for thorough testing due to the huge quantity of the test. The so-called thorough test is to let the quenching procedures performed all over all possible inputs. This test is also known as "exhaustion test". The "black box" method is exhausted input test, only use all possible inputs as a test case, in order to find all the errors in the program in this way. In fact, there is a number of infinity tests, but also do not only test all legal inputs, but also test those non-legal but possible inputs. "White Box" method is exhausted path test, and the independent path of through the program is an astronomical figure, but even if each path is tested, there may still be errors. First, the exhaustive path test must not detect the program violates the design specification, that is, the program itself is a wrong program. Second, the exhaustive path test is impossible to detect the procedure for missing paths. Third, the exhaustive path test may not find some errors related to data. E. W. A famous quote from Dijkstra made a good annotation of the test of the test: "Program test can only prove the existence of the error, but it cannot be proved that the error does not exist." In actual testing, the exhaustive test work is too large, and the practice is unlocked, which is destined to all actual tests are not thorough. Of course, it is not possible to ensure that there is no legacy error in the test program. The overall goal of software engineering is to make full use of limited human and material resources, high efficiency, high quality, complete testing. In order to reduce test costs, choose the principle of "economic" when choosing test cases. First, to determine its test level according to the importance of the procedure and once the failure will cause the loss; second, we must carefully study the test strategy so that you can use as few test cases as possible, and discovers as many program errors as possible. . Mastering the test amount is crucial, an experienced software development manager has said this when talking about software testing: "Insufficient testing is stupid, and excessive test is a sin." The insufficient test means that the user will undertake the danger of hidden mistakes, and excessive testing will waste many valuable resources. Test is a link that costs the cost in the software survival. In addition to the direct consumption of tests, the test fees also include other relevant fees. The main influencing factors that can determine how many tests need to do are as follows: 1. The difference in the purpose of the system's purpose system is largely influenced the number of tests required. Those systems that may have serious consequences must be more testing. A system on Boeing 757 should need more tests than a system for retrieving information in public libraries. A system for controlling a sealed gas pipeline should have higher credibility than a system-independent system that is not related to the toxic explosive. A security key software development group has more demanding errors than a game software development group. 2, the number of potential users of one system also has largely affected the degree of testing necessity. This is mainly due to the economic impact of user groups. A system that has thousands of users around the world must need more tests than a system that is running only in the office. If you can't use, the economic impact of the previous system is definitely larger than the latter system. In addition, the difference in the cost of the spending is also very large when the distribution is wrong. If a serious error is found in the internal system, the fee is relatively less when processing the error, and if you want to handle an error throughout the world, you need a considerable financial and energy.
3, the value of information is considering the value of the information contained in the system, one supports the economic value of the client / server system that supports many large banks or many stock exchanges. High content. Obviously this system needs more testing than a system that supports the shoe store. Users of these two systems want to get high quality, no error-free systems, but the previous system has much much more much. Therefore, we should consider economic considerations, the time and money corresponding to the economic value is tested. 4, development agencies a developer that is not standard and lack of experience is likely to develop a wrong system. In a system established and has a lot of errors in the system developed in a developing organization in many experiences, there is no much difference, and therefore, the need for tests needed to be different. However, those who need to make a large improvement is not much likely to recognize their weaknesses. The organizations that need more stringent testing processes are often the most impossible for this activity. In many cases, the organization's management department does not really understand the benefits of developing a high quality system. 5, the time test amount will change over time. In a very fierce market, trying time may be the key to the winning, starting to spend how much time can be spent on testing, but if the market allocation pattern has been established, then the quality of the product becomes more Important, the test amount is to increase. The test amount should be adjusted for the right goal. V. Psychological issues of software testing 1. Process testing process has a high degree of purpose, and it is important to establish appropriate goals. If our purpose is to prove that there is no error in the program, we will don't consciously do it in this direction; that is, we will tend to pick the test data that makes the probability of possible probability. On the other hand, if our goal is to prove that there is a mistake in the program, you will choose some test data that is easy to discover the wrong program. The latter attitude will add more value than the former to the program. The definition of the test means that the process of program test is destructive, and the degree of its degree even reaches the unable tolerable. Most people in society are constructive, not destructive. People tend to create an item, not easy to destroy - items. Therefore, the program is bad - items. Therefore, the destructive definition of program testing makes people daunting. Program test definitions implicit how to design test conditions (measured data), and who should be and should not test a given program. Psychology research also tells us that when people are doing something that is unsuitable or impossible, it is often not good. For example, if a person has a three-minute cross-flock on the Sunday "New York Times", we will see that this person will be almost no progress, because he will actually do it. Alimental to give up their own efforts. However, if we ask for 4 hours to solve this problem, then we will see that he has a big progress in the beginning of 10 minutes. Defining program tests as a process of finding an error in the program, making testing into tasks that can be done, thereby overcoming the problem of psychological existence. Another irritating problem is that even if the program has completed the expected requirements, it may still contain an error. That is, if the program does not work as required, it is obviously wrong, but if the program does not do it, it is wrong. 2. Programmers should avoid testing their own program developers being specified to test their code is a very bad thing. Development and testing are different activities. Development is a behavior created or established, a module or whole system. The sole purpose of the test is to prove that a module or system is not working properly. There is essential contradiction between these two activities. A person is unlikely to play two troche-standing characters. Based on this idea, the participants should be restricted in the test. Give them a suitable task is to perform test-cell testing that is possible with possible minimum layers.
Different When a programmer completed the design, after the constructive work of writing programs, he suddenly changed his views overnight, trying to form a completely negative attitude towards the program, it is very difficult. Many households know that revealing the paste wallpaper (destructive process> is not easy, if the wallpaper is originally by him, not someone posted, he will feel unbearable depression. So, most of the programmers Because you can't enter your necessary mental state (not to reveal the wrong attitude in your own program), you can't effectively test your own procedure. In addition to this psychological issue: there is an important issue: It may contain errors due to the misunderstandings of the programmer's description or description of the problem. If this is the case, when the programmer tests its own program, it is often difficult to discover the problem with the same misunderstanding. Further, Seeing testing is a passion or - this book is working, or working similar to writing comments. As many authors know, proofreading or criticizing their own work is very difficult. That is, in their own work It is often not possible to find out the psychological state of people. The above view does not mean that programmers cannot test their own procedures. However, compared to additional-out program testing, it will be more effective. More successful. Note: This argument does not apply to error correction (correct known error), which is more efficient by the author of the original program. 3, the Cheng library design institution should not test your own procedure in many sense, An engineering or a program design agency is an organism with life. It also has a psychological issue. Furthermore, in most cases, people are measured in a given date to a certain price program. Design agencies and project managers. This kind of reason is that the time and cost indicators are easy to measure, and the reliability of the procedure is difficult to measure. It is difficult for programming agencies to test their own procedures, because If you look at the test with the right definition, it is not much possible to complete the test according to the scheduled plan. It is not possible to limit the cost of consumption within the required range. The three most important factors produced by software are: quality, progress and cost. Calculation The advancement of technology means that the information system update in the economic field is faster. The development of new hardware technology will make the software outdated, system delivery time becomes increasingly important, and new products are in their performance and cost Other products replaced the previous sales time, that is, the market window has been reduced. Due to the limitations of fees, it is more difficult to develop a high quality, fast delivery, and low cost software products, that is, It is difficult to reach three goals. Therefore, in the development of software products, we must weigh the relationships between them, so that the features of the software can meet the requirements of the user, which means that the metrics and expectations of software product characteristics are necessary. Software Test There are many benefits from the independent testing organization. Independent testing refers to the software testing work is carried out by the organization of economic and management. Independent testing can avoid software developers to test their own software, due to psychological problems Software developers are difficult to objectively, effectively test their own software, and find out more difficulties in errors due to misunderstanding of the problem. Independence Testing can also avoid software development agencies to test their own software, the development process of software products is subject to time, cost and quality of three constraints, time and cost indicators for measuring, and the quality is difficult to measure, so in software development, When there is a contradiction between the three time, cost and quality, the quality is most likely to be ignored. If the test organization is from the same institution, the test process will face the pressure of management aspects from the development organization, so that the test process is disturbed . With an independent test method, it is important to improve the effectiveness of software testing in terms of technical or management.
1. Objectivity is an objective attitude towards the errors in software testing and software. This objective attitude can solve psychology problems in the test, which can work unfastened errors in the wrong attitude of the software. Impact. Economic independence makes its work more completely, according to the test requirements. 2, professional independent tests as a professional work, in the long-term work process, will be able to accumulate a lot of practical experience and form its own professional advantage. At the same time, software testing is also a high technical content, and there is a professional team to study and conduct engineering practice. Specialized division of labor is to improve test levels to ensure the quality of test, and give full play to the inevitable pathway of testing. 3, authoritative due to professional advantages, the test results formed by independent testing are more convincing, and the test results are often associated with the quality evaluation of the software, and the evaluation of specialized independent test institutions is more objective, fair and has authoritative. 4, resources have the main task of ensuring independent testing organizations to conduct independent testing, which makes testing more guaranteed in terms of funds, manpower and plan, and does not reduce the effectiveness of testing, reducing testing due to the development of the test. It is possible to avoid the impact of adverse testing in the development unit side weight software development. Sixth, good test engineers should have the most valuable and most important resources in the test work. There is no qualified, active test team, and testing is impossible. However, there is a very common habit in the software development industry, which is to let those who have the least experience of experience, no efficiency developers or people who are not suitable for doing other jobs to do test work. This is definitely a light-shallow behavior. The skills needed for a system effective test are definitely less than the software development needs. In fact, the tester will get extremely wide experience, they will encounter many developers. I have encountered problems. 1, communication skills. An ideal tester must communicate with everyone involved in testing, with the communication capabilities of technology (developers) and non-technical personnel (customers, managers). It is necessary to talk to the user, and can talk to the developer, unfortunately, these two categories have no common language. The focus of the user's conversation must be placed in the system to handle what and cannot be handled. When talking to the developer, these live renections must be expressed in another way, and the members of the test team must be able to communicate equivalent to users and developers. 2, empathy. All personnel related to system development are in a state of concern and worried. User worry that the future uses a system that does not meet your requirements, developers are worried that he has to revisit the entire system due to incorrect system requirements, and the management department worried that the system suddenly crashed and made it a reputation. The tester must deal with each of the people, so members of the test team need to have enough understanding and sympathy for each of them, and this ability can reduce the conflicts and conflicts between testers and related personnel to the lowest level. . 3, technical ability. In general, developers have a despise attitude towards those who don't understand technology. Once a member of the test team made a wrong concluding, then their credibility will be immediately promoted. A tester must understand the concepts of the test software system and will use those tools in the project. To do this, you need to have more programming experience, and the early development experience can help the software development process has a deeper understanding, from the correct evaluation tester from the perspective of developers, simplify the learning curve of automatic test tool programming. 4, self-confidence. The developer accuses the tester to make a fault, and the tester must have enough self-confidence in his own point of view. If you can do anything about yourself, you can't complete what more things. 5, diplomatic ability. When you tell someone, he must use some diplomatic methods. Caracian experience and diplomatic techniques help maintain cooperative relationships with developers, and testers also need a certain diplomatic wrist when telling developers. If the method taken is too tough, for the tester, it is equivalent to "winning the war" in the future cooperation in the development department.