Software testing and supporting tools

Source: Internet
Author: User

Software testing and supporting tools

(The author's time is unknown)

Introduction

Software testing, as a key technical means to ensure the quality and reliability of software, is becoming increasingly important. But how to conduct tests, how to improve the quality and efficiency of testing, so as to ensure the quality and reliability of software products is still a deep concern for many people. This article briefly introduces the basic process of software testing, as well as some common technical means, testing strategies and guidelines based on my experiences in software testing for many years, we also introduce two representative software testing support tools with special characteristics, so that more and more people can learn the importance of software testing, the ability to further understand how to correctly select and effectively use a variety of testing methods, techniques and tools to improve the quality and reliability of software.

 

I. Basic software testing process

Software testing is an extremely complex process. As shown in, a standardized software testing process usually involves the following basic testing activities.

· Develop software testing plans

Prepare the software testing outline

· Design and generate test cases

· Implementation Testing

· Generate software Issue Report

In fact, the software testing process is basically parallel to the entire software development process. The test plan should be developed as early as the demand analysis phase. Other relevant work, including the preparation of the test outline, the generation of test data, and the selection and development of test tools, should also be carried out before the test phase. Full preparation can effectively overcome the blindness of the test, shorten the test cycle, improve the test efficiency, and serve as the mutual check between the test document and the development document.

In addition, the implementation phase of software testing is composed of a series of test cycle. During each test cycle, the software testing engineer will perform a complete test of the tested software based on the pre-prepared test outline and prepared test cases. Testing and error correction are usually conducted repeatedly. When professional testers are used, testing and error correction are performed in parallel to reduce the total development time. More importantly, due to the rich testing experience of professional testers, the systematic testing methods adopted, and full-time investment, especially independent of developers' thinking, so that they can more effectively find many errors and problems that are hard to be discovered by developers alone.

The software testing outline is the basis for software testing. It clearly defines in detail the basic test items and test completion criteria that must be completed for each function or feature of the system in the test. Both automatic and manual tests must meet the requirements of the test outline.

Generally, a test case refers to the input data, operations, or environment settings provided to the tested system for a test. Test Cases control the execution of software tests, which are further instantiated for each test item in the test outline. Many famous articles have summarized various rules and Strategies for designing test cases. There are several basic principles from the perspective of engineering practice:

1. Representativeness of test cases: Representative of various reasonable and unreasonable, legal and illegal, boundary and out-of-boundary, as well as input data, operations, and environment settings of the limit;

2. testability of the test results: the correctness of the test execution results can be determined or evaluated;

3. Reproducibility of test results: the execution results of the system should be the same for the same test cases.

 

Ii. Test Methods

Software testing methods and techniques are diverse. From the perspective of testing whether the system's internal structure and specific implementation algorithms are targeted, there are usually two types: the white box method (structure test) and the black box method (function test ). The former is an internal test of the system, while the latter focuses on the external functions and features of the system.

 

Iii. software testing tools

Some software testing tools that are welcomed by software developers provide strong support for software testing. This article will introduce the famous suit software SQA of rational and purify of pure atria.

SQA suitesqa directly supports testing customer/server application software. An important feature of SQA suitesqa is that it can automatically drive the running of the tested program. SQA can automatically record and replay the program execution process, so as to automate the "Review" test.

Since testing is a process that requires repetition, it usually takes dozens or even hundreds of times. Therefore, this feature greatly increases the automation of software re-test and regression, this frees testers from complicated and repetitive manual tests, significantly improving the efficiency of software testing.

In addition to this basic Automatic Recording and publishing function, it also provides a series of auxiliary support functions, such,

· The Execution Process of the recorded program can be automatically converted to an advanced language program with good readability, so that the test driver can be modified by the tester according to the test requirements, it is even compiled manually.

· Automatically record and analyze the execution results of the comparison test. Whether it is a simple text output, or any component in a chart, sound, animation, or graphic user interface (GUI, the results can be automatically recorded in the test result library according to the specified tester, and the results of the two tests can be automatically compared, pointing out the difference. This feature is undoubtedly helpful for "Automatic Error search.

· Adjust and set the event occurrence time and speed.

· Basic test database management functions.

In addition, SQA supports software testers:

· Develop test plans and outlines, manage these documents hierarchically according to the natural tree structure, and control and drive the entire test process accordingly.

· Not only can automatically record various test results, but also modify them so that the tester can still have many errors in the program running results, the ideal "Expected Results" can be obtained by appropriately correcting the recorded results, laying the foundation for automatic comparison of test results.

· Record and manage test issue reports.

In short, SQA suite provides a complete testing platform to support various basic activities of software testing, this includes the preparation of test plans and outline, the automation of regression testing, the analysis and comparison of test results, and the generation and automatic distribution and control of Software Problem Reports. Many application software development is undoubtedly a powerful test support tool.

Purify is a software tool that was first launched in early 1990s by the original pureatria Company (now merged with rational in the United States and renamed rational in the United States) to detect various memory usage errors in programs. Almost all programmers who have used C language software development will have this experience. The use of extremely flexible pointers in C language brings great convenience to programmers, but it also creates a lot of trouble. Errors caused by improper pointer usage are usually the most difficult to discover and are also the most difficult to locate. Purify is favored by the majority of software developers for its ability to detect and accurately locate a variety of common memory usage errors.

Purify automatically identifies more than 20 memory usage errors, including

· Uninitialized local variables

· Memory not applied

· Use released memory

· Array out-of-bounds

· Memory Loss

· File Description Problems

· Stack Overflow

· Stack structure boundary errors

In the following example, two memory usage errors are hidden. The first behavior is that the size of the space requested by the PP array is incorrect. This type of errors is often hard to find, because in C, some "slight" memory out-of-bounds may be tolerated by the system. But this is often the root cause of more serious errors. For example, it may damage other data areas. The error in the last row is that the string space assigned to the PP is not released before the PP is released, so that they are "lost. This type of error is like a chronic suicide. It will gradually consume the memory and reduce the operating efficiency of the system until the system crashes completely. The real problem is that the "malignant tumors" in these Procedures are difficult to find and locate using conventional testing methods and debugging tools. Purify fully demonstrates its powerful functions here. wherever it goes, the above common memory errors can be revealed one by one for tested cases, the error types and locations are also specified accurately. This greatly improves the efficiency of testing and error correction, and the reliability of the software.

... /"To get 10 words and print them out "/

If (! (Pp = (char **) malloc (10 ))){

/* Size shoshould be 10 * sizeof (char *)*/

Printf ("out of memory. \ n ");

Exit (-1 );

}

For (I = 0; I <10; I ++ ){

Scanf ("% s", buffer );

If (! (PP [I] = (char *) malloc (strlen (buffer) + 1 ))){

Print ("out of memory. \ n ");

Exit (-1 );

}

Strcpy (PP [I], buffer );

Printf (PP [I]);

}

Free (PP);/* all the strings pointed by it are lost! */

.........

Since this year, the original pureatria company has successively launched its series of products? /Font> pure, including purify that supports memory detection, purecoverage that supports path coverage, quan.pdf that supports performance testing for multi-thread applications, and purelink, which improves the efficiency of program compilation during testing. The pure series now supports C, C ++, Fortran, UNIX, Windows NT, and other operating systems such as Sun OS, Solaris 2.3, HP-UX, windows NT Server and ibm a/X.

 

Iv. Conclusion

Fully understand the importance and complexity of software testing, reasonably select testing methods, effectively organize testers and arrange testing tasks, and use software testing tools to improve the degree of automation of software testing, it can undoubtedly help software developers and testers to greatly improve test efficiency and software quality.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.