How to design and design software test cases?

Source: Internet
Author: User
Tags documentation

One, Test Cases is the core of software testing.

The importance of software testing is beyond doubt. But how to complete the test in the shortest time with the least manpower and resources, discover the flaw of the software system, guarantee the good quality of the software, it is the goal that the software company explores and pursues. Each software PRODUCT or software development project requires a good set of test scenarios and test methods.

There are many factors affecting software testing, such as the complexity of the software itself, the quality of developers (including analysis, design, programming, and testing), the application of test methods and techniques, and so on. Because some factors are objective and unavoidable. Some factors are volatile, unstable, such as the development of the team is mobile, experienced to go, new people constantly added to the work of a specific person is affected by emotions, etc. How to ensure the stability of software testing quality? With test cases, whoever tests them, and the implementation of the test cases, can guarantee the quality of the test. Can reduce the effect of human factors to a minimum. Even if the initial test cases are poorly considered, they will be perfected as the test progresses and the software version is updated.

Therefore, the design and preparation of test cases is the most important in software testing activities. Test case is the guidance of testing work, is the principle of software testing must be followed, but also the quality of software testing the fundamental guarantee of stability.

 second, what is called Test Cases .

There is currently no classic definition for test cases. A more common term is the description of a test task for a particular software product, embodying test scenarios, methodologies, techniques, and strategies, including test objectives, test environments, input data, test steps, expected results, test scripts, and documentation.

Different categories of software, test cases are different. Unlike systems, tools, controls, and gaming software, the user requirements for management software are more uniform and more varied and faster. The author is mainly engaged in the test of enterprise management software. So our approach is to divide the test data and test scripts from the test cases. Test cases tend to be test scenarios designed for the functionality, business rules, and business processes of a software product. Testing of each particular function or running path of the software constitutes a test case.

 third, the preparation Test Cases .

This paper focuses on some specific practices for writing test cases.

1. Test Case Documentation

Writing test case documents should have document templates that conform to internal specification requirements. Test case documentation is subject to the constraints of the test case management software.

Test cases for software products or software development projects typically form a test case document in the software module or subsystem of the product, but are not absolute.

The test case document consists of an introduction and a test case. The introduction part has compiled the test purpose, the test scope, the definition term, the reference document, the summary and so on. The test Case section lists each test case. Each specific test case will include the following details: Use Case number, use case name, Test level, entry criteria, validation steps, expected results (including judgment criteria), export guidelines, comments, etc. The above covers the basic elements of test cases: Test index, test environment, test input, test operations, expected results, evaluation criteria.

2, the test case setup

Our early test case was to set the use case by function. The path analysis method was introduced and the use case was set by path. The current evolution is to set use cases by function and path blending mode.

3, according to the function test is the most simple, according to the use Case specification traversal test each function.

For the complex operation of the program module, the implementation of its functions are interrelated, closely related, interlocking, can evolve a large number of changes. Without rigorous logical analysis, it is unavoidable to produce omissions. Path analysis is a good method, its biggest advantage is that it can avoid leakage test.

To improve the efficiency of testing, software testing has been developed to develop automatic testing. The central task of automated testing is to write test scripts. If the software engineering software programming must have the design specification, then the test script Design specification is the test case.

4. Measure benchmark for evaluating test results

The test results need to be evaluated and the test report prepared after the completion of the test implementation. It requires some quantitative results to determine whether the software test is complete and to measure the quality of the test. Example: The test coverage is how many, the test pass rate is how many, the important test pass rate is how many, and so on. Previous statistical benchmarks were software modules or function points that were too coarse. It is more accurate and effective to use test cases as measurement benchmarks.

5, analysis of the standards of defects

By collecting defects, comparing test cases and defect databases, the analysis confirms whether the leakage or defect is reproduced. Leakage reflects the imperfect test cases, should immediately supplement the corresponding test cases, and finally achieve the gradual improvement of software quality. If there is a corresponding test case, there is a problem with the implementation test or the change processing.

 Iv. Related Issues

1. Review of Test Cases

Test cases are guidelines for software testing, but they are not the norm once they are completed. Test cases should be organized in the process of designing and peer-searching. After the completion of the preparation should be organized expert review, need to be approved before they can be used. The review Committee may be composed of the project owner, test, programming, analysis design and other relevant personnel, may also invite the customer representative to participate.

2. Modification and update of test cases

Test cases also need to be refined after they have been documented. Mainly from the three aspects of the reason: first, during the testing process, it is found that the design test cases are poorly considered and need to be perfected; second, the software defects of the feedback after the software is delivered, and the defect is caused by the flaw of the test case; third, the new software itself and the software version of the update, test cases must also be modified to

Generally small modifications can be modified on the original test case document, but the document must have a change record. The version of the software is updated, and the test cases should generally be updated with the upgrade version.

3, the test case management software

Test Case management software is also required to use test cases. Its main functions are three: firstly, the key content of the test case document, such as number, name and so on, can be automatically imported into the Management database to form the record corresponding to the test case document; Second, the test can be entered in time when the test is implemented; third, the final implementation automatically generates test results documents, including each test measure Test overrides the table and a list of test case manifests that are passed or not passed by the test.

With the management software, testers will be easy to write daily test logs or software test reports.

This article turns from:

Related Article

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: 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.