Software test foundation

zhaozj2021-02-08  276

Software test foundation

I. Overview II. The basic method of software test III. The basic method of software test. The basic method of software test. The complexity and economy of software testing and economics. Five, software testing psychology issues six, good test engineers should have quality, reference software test basis

I. Overview

The rapid development of information technology makes software products to various fields of society, and 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 the following points: 1, there is not enough communication, misunderstanding on communication or not exchange

Development should be developed if the application should do or should not do anything (the need for application) is unclear. 2, software complexity

Graphical User Interface (GUI), customer / server structure, distributed application, data communication, super large relational database, and large system scale make the complexity of software and systems have grown index, and it is difficult to develop experience without modern software development. Understand it. 3, programming error

Like all people, the programmer will also go wrong. 4, demand changes

The impact of demand changes is multifaceted, and customers may not understand the impact of demand changes, but they may know that they 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, time pressure

The schedule of the software project is difficult to accurate, and many times need to be expected to guess. When the final period is inhalation, the mistake is coming. 6, your own negotiate more like: 'No problem'

'This is easy to

'I can take it out for a few hours.'

Too much unrealistic 'no problem', the result can only be introduced.

7, code document is poor

The poor or poor document makes 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 tools

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-CMM

Iso Spice (Software Process Improvement and Capability Dermination)

Bootstrap

ISO-9000-3

Tickit

TRILLIUM

In fact, for the software, there is no thing like a silver bomb. 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, testing is required for software production, the problem is what we should think "What method is used, how to arrange test?" Second, software testing

The purpose of software test determines how to organize tests. 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 Test is to find out the process of executing the program; 2, the test is to prove that the program 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 whether the internal structure of the system and the specific implementation algorithm can be divided into white box testing and black box testing; 1, black box test

Black box test is also known as functional test or data-driven test, which is a function of known products, and detects that each function can be used normally. When testing, the program is seen as a black Basin, in the case of completely regardless of the internal structure and internal characteristics of the program, the tester is tested in the program interface. It only checks if the program function is used in accordance with the requirements of the requirements specification, whether the program can properly receive the input number saw The correct output information and keep external information (such as database or file) integrity. 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 test

White box test is also known as structural test or logical drive test, it is known that the product's internal work process can be tested to detect whether the internal action of the product is normal according to the specification of the specification, according to the structure test program inside the program, each of the inspection procedures Whether it can work correctly according to the scheduled requirements, regardless of its function, the main method of white box test has logical drive, basic 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, the complexity and economy of software testing

People often think that developing a program is difficult and testing 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 decide how many times they need to do, as follows: 1, the purpose of the system

The difference between the purpose of the 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, potential number of users

The number of potential users of a system also greatly affect the degree of testing the need. 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

When considering the need to test the test, it is necessary to take into account the value of the information contained in the system, one supporting a very high economical value in the client / server system of many large banks or many stock exchanges. 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 agency

A development organization that is not standard and missing 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 timing of the test

The test amount changes 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 test 1, the process of program test is destructive

Human activities have 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 procedures

Developers are specified to test their own 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 the necessary mental state (not to reveal the incorrect attitude in your own program), you cannot effectively test your own procedure.

In addition to this psychological issue, there is an important issue: the program may contain errors generated 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 procedure, it is often difficult to discover the problem with the same misunderstanding.

Furthermore, you can do the test to make a papers or - this book is correct, or work similar to writing a review. As many by many authors, proofreading or criticizing their own work is very difficult. That is to say, it is not possible to find defects in their own work.

The above view does not mean that programmers cannot test their own procedures. However, compared to the additional-other person test, it will be more effective and more successful. Note: This argument does not apply to error correction (correcting known errors), the author's author's error correction is more efficient.

3, Chengbu design institution should not test your own procedure

In many senses, an engineering or a programming agency is a living organism, which also have psychological problems. Furthermore, in most cases, people will measure program design agencies and project management personnel in a given date. One reason for this is the time and cost indicator for measuring, and the reliability of the program is difficult. It is difficult to maintain an objective attitude while testing your own procedure, because if you look at the test with the right definition, you will not be aware of the predetermined plan to complete the test is not much likely to limit the cost of consumption within the required range.

The three most important factors produced by software are: quality, progress and fees.

The progress of calculation technology means that the information system update is faster in the economic field. The development of new hardware technology will make the software outdated, the time of system delivery is increasingly important, and new products are replaced by other products in their performance and cost, that is, the market window has shrunk.

Due to the limitations of fees and progress, it is difficult to develop a high quality, fast delivery, and low cost software products, which means that 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 user's requirements, which means that the metrics and expectations of software product characteristics are necessary.

Software Tests have many benefits by independent testing agencies. Independent testing refers to software testing by organizations that are economically and managed independent of the development agency. Independent testing can avoid software developers to test their own software, due to psychological problems, software developers are difficult to objectively, effectively test their software, and find out more difficult to find out those generated because of misunderstanding of issues. Independent 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 constraints, time and cost indicators for measuring, and the quality is difficult, so in software development, When there is a contradiction between the time, cost and quality, the quality is most easily 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 subject to interference.

With an independent test method, it is important to improve the effectiveness of software testing in terms of technical or management.

1, objectivity

In the software testing and errors in software, this objective attitude can solve the psychological problems in the test, which can both work in unreasonable attitudes in software, and can also affect the impact of the mistakes. Economic independence makes its work more completely, according to the test requirements.

2, professionalism

As a professional work, independent test is now able to accumulate a lot of practical experience in long-term work. 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, authority

Due to professional advantages, the test results of independent test work are more convincing, and the test results are often associated with the quality evaluation of the software, and the professional independent test institutions are evaluated, more objective, fair and authoritative. 4, resources are guaranteed

The main tasks of the independent testing organization are to conduct independent tests, which makes testing more guaranteed in funding, manpower and planning, and does not reduce the effectiveness of testing due to the development of the test, reduce the effectiveness of the test, can avoid development units Software development has an adverse effect on testing. Sixth, good test engineers should have quality

People are the most valuable resources in testing. There is no qualified, active test team, and testing cannot be achieved. 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. 6, a sense of humor.

In the case of sophistry, a humorous criticism will be very helpful. 7, very strong memory.

An ideal tester should have the ability to mine similar errors that have been previously encountered from memory, and this ability is impossible to measure the value during the test. Because many new problems are different from the problems we have found. 8, patience.

Some quality assurance work need to be unbelievable. Sometimes you need to spend an amazing time to separate, identify and assign a mistake. This job is those who are unable to do. ⑨, skeptical.

It can be expected that developers will do their best to explain all the errors in the past. The test must listen to everyone's instructions, but he must keep suspect until he has seen itself. ⑩, self-supervision. Dry testing work is easy to make you lazy. Only those who have self-supervision capabilities will work properly every day.

11, insight.

A good test engineer has the viewpoint of "testing to destroy", capturing the ability of user views, strong quality pursuit, focusing on the details. The high-risk zone of the application is determined to make limited testing for key links. Seven, reference 1, GRENFORD J. MYERS, "The Art of Software Testing"

转载请注明原文地址:https://www.9cbs.com/read-1597.html

New Post(0)