About Me

Name: nkowl
Location: shanghai, NY
Biography
Loading...

Create Your Own Blog Find Other Townhall Blogs

Comments

Archives

Blog Roll

 

Software Testing Methods (Zhuanzhai)

 The basic software testing methods

Software testing methods and techniques are varied.

The software testing technology, from different perspectives can be classified:

The need for implementation from the perspective of the tested software, testing can be divided into static and dynamic tests.

From the test for whether the system's internal structure and specific software outsourcing algorithm point of view, can be divided into Baiheceshi and Black Box Testing;

1, Black Box Testing

Black Box Testing also known as functional testing or data-driven testing, which is known by the products should have the function of the test to detect whether each function is normally available in the tests, the procedure can not be seen as an open Black pot, do not consider the internal structure and internal procedures of the circumstances, the test in the program interface for testing, inspection procedures function only in accordance with the requirements specification whether the provisions of normal use, whether the proper procedures to receive the importation of sawn And generate the correct output, and to maintain external information (such as databases or files) integrity. Black Box Testing methods are equivalent to the main category of, the boundary value analysis, because of - fruit map, wrong to speculate, mainly for software validation testing. "Black box" by focusing on procedures for external structure, and not consider the internal logic structure, for software interface and software for testing. "Black box" to enter the test method is exhaustive, only to have the importation of all possible use as a test case, in this way can be found in all the wrong procedure. In fact there are infinite number of test cases, people not only to test all legal input, but also on those who are not legal but may enter the test.

2, Baiheceshi

Baiheceshi also said that the logic of the test or test-driven, it is aware that products work within the process, can pass the test to detect whether the actions in accordance with the internal product specification of the normal requirements, in accordance with the internal structure of the testing procedures, inspection procedures in Each channel has the right to request the work as scheduled, regardless of its functions, Baiheceshi the primary means of a logical drive, road-testing, mainly for software verification.

"White box" of a comprehensive understanding of internal logic structure, to all logic path for testing. "White box" law is exhaustive testing path. In the use of this programme, the testing procedures must check the internal structure and procedures of logic proceed, that the test data. The process runs through several independent path is an astronomical figure. But even if each path are tested may still have errors. First, the path exhaustive testing procedures must not be found in violation of design specifications that process itself is a mistake procedures. Second, the path exhaustive testing procedures can not be found in the path and through the omission of error. Third, the path exhaustive testing may be able to detect some of the mistakes associated with the data.

3. ALAC (Act-like-a-customer) test

 

ALAC is a test, the use of products based on the knowledge developed testing methods. ALAC test is based on complex software products have many wrong in principle. The biggest beneficiaries are users, to find and correct defects for which customers will be most vulnerable to mistakes.

The basic unit testing methods

Unit testing software design is the object of the smallest units - module. Unit testing is based on a detailed description of unit testing of all the modules to control the path of an important test case design, in order to find modules within the error. Baiheceshi unit testing use of technology, a number of modules within the system can be carried out parallel tests.
Unit testing task

Unit testing tasks include: a module interface test module 2 partial test data structure; module boundary conditions test all four modules in the implementation of an independent testing pathway; module of the error handling of the access road test.

Module interface unit test is a test basis. Only in the data correctly inflow, outflow module, under the premise of other tests can be meaningful. Test interface correct or not should consider the following factors:
1 input parameters and the actual number of parameters of the same;
2 Enter the actual parameters and the Outsourcing Forum parameters of the attributes of the match;
3 input parameters and the actual form of dimensionless parameters of the agreement;
4 called by the other modules to the actual number of parameters of the modules and transferred the same number of Senate-shaped;
5 call by the other modules to the actual parameters of the properties were transferred with the module-Senate attribute matching;
6 called by the other modules to the actual dimensionless parameters of the modules and transferred the Senate-dimensional line;
7 call predefined parameters used by the function of the number, characteristics and priorities are correct;
8 whether the current entry point has nothing to do with the parameters software outsourcing used;
9 whether to amend the CD-type parameters;
10 on the definition of global variables of each module are consistent;
11 whether or not to transfer certain constraints as a parameter.

If the modules, including external input and output, should also consider the following factors:
1 document attributes is correct;
2 OPEN / CLOSE statement is correct;
3 format and input-output statement that the match;
4 buffer size and length of the match record;
5 documents have been opened before use;
6 whether to take the paper tail;
7 whether to take the input / output error;
8 output in the text of whether there is a mistake;

Check local data structure is to ensure that temporary storage of data in the module in the integrity of the process of implementing the procedures correctly. Local data structure is often the root causes of errors, should be carefully designed test case, to find the following types of errors:
1 inappropriate or incompatible types;
2 variables no initial value;
3 variable initialization or default value is wrong;
4 incorrect variable name (misspelled or incorrectly cut);
5 appear on the overflow, the overflow and address anomalies.

In addition to local data structure, if possible, Outsourcing Forum unit testing also should identify the overall data (such as FORTRAN the common areas) the impact of the module.

In each module to an independent implementation of the road for testing, unit testing the basic task is to ensure that each module in the statement at least once. At this point is to design test case because of errors found, incorrect and inappropriate to compare the flow control error. At this point the basic cycle path testing and testing is the most commonly used and most effective testing technology. Calculation of common errors include:
A misunderstanding or wrong operator priority;
Two mixed-type operation;
3 variables initial wrong;
4 accuracy not enough;
5 expression symbol wrong.

Comparison of judgement and control flow often closely related, should also be committed to the test case that the following errors:
A different type of data comparison between the target;
2 wrong use of logical or priority;
3 because of the limitations of the computer said, expect the same theory and in fact does not equal the amount equal to two;
4 comparison operator error or variable;
5 cycle termination conditions or impossible;
6 iteration, can not withdraw from the divergence;
7 wrong to amend the cycle of variables.

A good design should be able to foresee all kinds of error conditions, and all kinds of mistakes handling the default pathway, mistakes need to be seriously dealt with the same access road test should focus on the check the following questions:
An output of the error message incomprehensible;
2 record of mistakes and errors encountered in the actual does not match;
3 custom procedures in the handling of the error before the operation, the system has been involved;
4 abnormal improper handling;
5 misrepresentation of the failure to provide adequate positioning error.

Boundary conditions testing unit testing is the last and most important task. Known to the public, the software often border on failure, a boundary value of technology, and its value against the border left and right test case design is likely that the discovery of new errors.

Unit testing process

Is generally believed that unit testing should be immediately after the coding, when the source of completion and adoption of the review and compile inspection, to start unit testing. Test Cases should be designed to work with the review of the combination, in accordance with design information select the test data, found that the above-mentioned categories will increase the possibility of error. In determining the test case at the same time, expectations should be given the results.

Test module for the development of a drive module (driver) and (or) a number of piles module (stub), the map shows the general unit testing environment. In most occasions drive module known as the "main program", it receives the test data and the data sent to be tested modules, test module is called, the "main program" Print "into - from" sources.

Pile driver module and the module is to test the use of software, rather than an integral part of software products, but it needs some development costs. If the pile driver and relatively simple modules, the actual costs relatively lower. Unfortunately, only a simple drive module and the module can not be completed pile some of the test module mission, the unit testing of these modules can only use the following discussion of the comprehensive test methods.

Enhance the cohesion of the module simplifies unit testing, if the completion of each module can only be one of the required number of test cases will be significantly reduced, the mistakes in the module is also more easily found.

 

Comprehensive testing the basic method


Often such a situation, each module can work alone, but after these modules are not integrated with the normal work. The main reason is that call each other when the interface module will introduce many new problems. For example, the data interface may be lost; one module to another module may cause undue influence; combination of several features of the main functions can not be achieved; errors continue to accumulate at an unacceptable level of the overall structure of data errors, etc. . Comprehensive testing of the system is assembled software testing technology, according to design requirements of the unit testing through the various modules assembled together, a comprehensive test in order to find the interface with all kinds of mistakes.

A design used all the modules according to design requirements all at once assembled, and then the whole test, this is known as non-incremental integration. This approach to the chaos. Because the tests may find a lot of mistakes, errors for each location and very difficult to correct, and to correct a wrong but also may introduce new errors, mistakes mixed the old and new, more difficult to determine the reasons for the error and location. In contrast to incremental integration methods, procedures and a section of a period of expansion, testing the scope of increased step by step, easy mistakes and correct positioning, the interface can be tested fully and completely. Below the two discussed incremental integration method.

A top-down integration

Top-down integration is a tectonic process of incremental approach it from the control module, in accordance with the hierarchical structure of control software, to the depth or breadth-first priority of the strategy to gradually integrate the various modules. Depth-first strategy is to first of all the main control module on the path to integrate, as to choose a path as the main control path, this somewhat arbitrary, based on the general characteristics identified. The following map as an example, if you choose the most left a path, first module M1, M2, M5 and M8 integrated, and then integrating M6, and then consider the middle and the right path. Breadth-first strategy is not, it controls along the hierarchical structure of the level of downward movement. The following are plans for example, the first to M2, M3 and M4 and integrated control module, and then M5 and M6 and other fund-raising modules integrate.

Top-down comprehensive test for the specific steps:
1 to the main control module as a test drive module, the control module unit testing, the introduction of all the piles modules with practical alternative module;
2 selected based on the integration strategy (depth or breadth-first priority), the only alternative a pile of each module;
3 each integrated module immediately test again;
4 only after the completion of each test, only proceed under a pile replacement module;
5 in order to avoid the introduction of new errors, to be constantly carried out regression testing (that is, in whole or in part to repeat the tests have been done).
 

From the second step, the cycle of the above steps until the structure of the whole process finished. The chart, the line that has been the completion of the structure, the use of depth-first strategy, the next step will be used to replace module M7 pile module S7, of course, M7 itself may have a pile module, and then the actual response will be replaced on January 1 module .

Top-down integration has the advantage of being able to process as soon as possible on the main decision-making mechanisms of control and inspection, so the earlier discovery of errors. Shortcomings in the test module at a higher level, low-level processing module replaced by piles, does not reflect the true situation, important data can not be sent to the timely return to the upper module, the test is not sufficient. To solve this problem there are several ways, the first is to use some real test postponed to a pile of alternative module after module, the second is the development of the module can simulate the real pile module; third is the bottom-up integration modules. The first method is to retire as non-incremental integrated approach so that the wrong location and difficult to correct, and lost in the assembly module for the possibility of some specific tests; second method will undoubtedly be greatly increased spending; third Comparison of practical ways, devoted to the following.

2 bottom-up integration

Bottom-up testing from the "atomic" module (that is, the lowest level of software module) assembly test, the test module to a higher level, the lower module functions have been fulfilled and therefore no longer need to pile module.

Comprehensive testing the bottom-up steps are:
A low-level modules organized into a realization of the functional module group (cluster);
2 development of a test drive module, control of the test data input and output test results;
Group 3 on each module for testing;
4 delete the test using the drive module, with a higher level modules to complete the module group organizations to become more functional modules of the new group.

From the beginning the first step cycle of the implementation of the above steps until the end of the process structure.

The following illustrates the above process. First of all, "atomic" module group was divided into three modules, each module group to introduce a drive module for testing. Modules for group 1, group 2 module in the modules are attached module Ma, therefore the drive module D1, D2 removed, the module Group 1 Group 2 with the module interface directly with Ma, then can be removed MaD3 After, M3 Group 3 with direct interface module can be conducted on Mb integration testing, the final Ma, Mb and Mc integrates all testing.

 

The bottom-up approach do not have to pile integrated module, the test case design is relatively simple, but the disadvantage is that the final procedures to join when a module with the overall image. Top it with the comprehensive test methods advantages and disadvantages to the contrary. Therefore, the test software system, the software should be based on the characteristics and the progress of works to choose the appropriate test strategy, sometimes mixing the two strategies more effective use of the upper module with top-down approach, the lower module with the bottom-up Approach.

In addition, the comprehensive test paying particular attention to key modules, the so-called key modules generally have one or more of the following characteristics: ? corresponding number of demand; ? a high-level control functions; ? complex, error-prone; ? have a special performance Requirements. Key modules should be tested as soon as software outsourcing possible and return to repeatedly test.

Test to confirm the basic method
Through comprehensive testing, the software has been fully assembled, the interface also has ruled out the error, the final step in software testing - to confirm test to get started. Test to confirm whether the software should be checked by the contract work, that is, whether to meet demand for software standards recognized in the statement.

1. Validation testing standards

To achieve recognition software cartridges through a series of tests. The same test to confirm the need for test plans and processes, test plans should provide the type of testing and testing progress, the testing process is the definition of some special test case, to note the consistency of software and demand. Is no plan or process, it should focus on software to consider whether to meet the terms of the contract all the features and performance, the documentation is complete, accurate and other man-machine interface (for example, portability, compatibility, error recovery and ability to safeguard And so on) whether the customer satisfaction.

The results of tests to confirm there are two possibilities, one is the function and performance indicators that meet the requirements of software demand, the user can accept a demand for software is software that does not meet the requirements, the user can not accept. Project to this stage found that serious errors and deviations in general it is very difficult to correct the scheduled work period, it is necessary in consultation with users, to seek a proper solution to the problem.

2. Configuration review

Another important test to confirm the link is targeted for review. The purpose of the review is to ensure that software fully equipped, classification and orderly, and include the software necessary to safeguard the details.

3. Α, β test

In fact, software developers can not be completely predictable users actually used procedures. For example, users may order the wrong understanding, or some strange combination of data, the designers may also claimed to understand the output of information puzzled, and so on. Therefore, the software is really to meet the end-user requirements, users should be carried out a series of "acceptance tests." Acceptance testing can be informal tests, can also be a planned and systematic testing. Sometimes, acceptance testing for weeks or even months, and constantly exposed errors, leading to the development of extension. A software product, may have many users, not by each user acceptance, now known as the use of α, β testing process, with a view that seems to be the only end-users who can find the problem.

α test is software development company in-house staff will simulate various types of users of the forthcoming launch of software products (known as α version) for testing in an attempt to find and correct errors. α is the key test as much as possible and realistic simulation of actual operating environment and users of software products in operation and do software outsourcing our best to cover all potential users of the operating methods. After the adjustment α testing of software products known as β version. Followed by β test is software development company organized various aspects of the typical user in their daily work in the actual use of β version and requires users to report unusual situation, criticized the comments. And software development company to the β version Gaicuo and improved.

The basic system testing methods

Computer software is based on the computer system of an important component of software development should be finished in the system and integrated with other components, then the need for system integration and confirm a series of tests. For a detailed discussion of these tests is beyond the scope of software engineering, these tests will not only by software developers to complete. Before testing the system, a software engineer should complete the following:
(1) to test the software system design input error handling path;
(2) design test cases, the wrong data and simulation software interface possible errors, record test results, for system testing and help provide experience;
(3) to participate in the testing system planning and design to ensure that software testing is reasonable.

System testing should be tested by a number of different components, the purpose is fully operational system to verify whether all parts of the system of political parties and complete the work under the task. Below a brief discussion on several categories of system testing.

1, resume testing

Resumption of testing major inspection system fault-tolerant. When the system error, whether within the specified time interval correct mistakes and restart the system. Resumption of testing is first necessary to adopt various means of forced system failure, then verify whether the system can be restored as soon as possible. The automatic restoration of the need to verify initialize (reinitialization), Check Point (checkpointing mechanisms), data recovery (data recovery) and restart the (restart) the accuracy of such mechanisms; manual intervention for the recovery system, need to estimate the average Repair time to determine if an acceptable range.

2, safety tests

Safety testing inspection system to prevent illegal intrusion into the ability. Safety testing, the testers posing as illegal intruders, using various ways trying to break through line of defense. For example, ? trying interception or cracked the passwords; ? specialized software customized the system of protection mechanisms; ? deliberately cause a system failure in an attempt to take advantage of the resumption of illegal entry; ? trying to visit the non-confidential data, derived the required information, and so on. In theory, as long as there is sufficient time and resources, not be allowed to enter the system. Therefore system security design criteria is to make more than the cost of illegal intrusion into the protected information of value. At this point the illegal invasion have been unprofitable.

3, strength test

Strength testing procedures to check the abnormal situation of resistance. Strength is always forced to test the system in the allocation of resources under abnormal operation. For example, ? When the interruption of the normal frequency of 1-2 per second, 10 have suspended operations per second Test Case; ? quantify the growth rate of input data, software outsourcing check the importation of sub-function of the capacity; ? need to run the largest storage space ( Or other resources) of the test case; ? operation could lead to virtual collapse of the operating system or disk data keen jitter test case, and so on.

4, performance testing

For those real-time and embedded systems, software, some even meet the functional requirements, it may not be able to meet performance requirements, although from the unit testing, each test steps include performance testing, but only when truly integrated system, in a real environment in order to Comprehensive, reliable test run of system performance tests in order to complete this task. Performance testing sometimes combined with the strength test, often need the support of other hardware and software support.

Email ItEmail It | Print ItPrint It | TrackbacksTrackbacks (0) | Flag as offensiveFlag as Offensive
« Previous1Next »