General program testing methods - test case design

First, the definition of test cases

 

Test cases are a set of test inputs for a specific purpose and design, the conditions and expected

As a result, in order to test a program path or to verify whether to meet a particular need.

 

Second, the purpose of the test case

Purpose of the test is to prove that software errors do not exist, or to find errors?       

If the software is to prove that there is no error, then

1) subconscious more inclined to achieve this goal, we may consider only the correct input

The correct result, less consideration leads to the failure of software test data

2) may hide some problems. Software errors in principle, but there is actually unreasonable. Such as:

A program "the input data, determines what kind of a triangle", the input 0,0,0, judgment program

Equilateral triangle, but it is clearly unreasonable.

       

Therefore, the purpose of writing test cases, software is induced errors, not just in order to prove its basic

Achieve normal function, but also to consider the limits, fault-tolerant, which do not run their practices.

  • Test case design

 

Personally I think that, in simple terms, is the way + experience, test case design that is more mature

Method as a guide, combined with personal experience of the designer.

 

1. where to start
  1) menu tree;

     2) Specification Fig requirements specification, module;

     3) basic prototype software;

     4) the relevant standard; such as software specifications and so on.

 

2. Design steps

1) obtain basic functional test cases according to the needs and specifications of the menu tree;

2) the boundary value test;

3) fault tolerance test;

4) Parallel test;

5) Serial test;

6) Cross test;

7) compatible test cases;

8) limit test case.

 

2.1 Basic functions

    See more demand documents, communicate more with the needs of designers, it said at least guarantee coverage requirements specification

SHEET functions and menu tree.

    Main methods:

    1) equivalence partitioning:

       The input range is divided, the test data representative of each equivalence class is identical to the test

The other type of data.

             

       Determining valid and invalid equivalence class.

             

       Equivalence class, if there is sufficient reason to be subdivided into a plurality of smaller number, and the like

Price category. Some smaller part of equivalence classes, with personal experience and user point of view to consider trade-offs.

       

    2) function, the path mixed analysis: the realization of a function, from the entry - exit realize the function ---

The combined operation of the various paths.

              

    To: if only one entry mode, the need not be described; and two or more kinds thereof into the

Modes, it described. Common mode of entry: enter the main menu, enter the desktop shortcut, the shortcut key to enter the start.

              

    Functions to achieve: the relevant functions via buttons on the interface.

              

Exit: unrealized and realized exit function.

 

  1. Boundary value

 

The so-called boundary conditions, means that the input and output equivalence class that is exactly at the boundary, or beyond the boundary, the state boundaries or less.

 

       Input value, such as: a software user input password is 6-12, then we choose 5, 6, 12, 13 enter the password.

      

       The output value, such as: a calculator software output value range is: 0 to 999999999999, you should get the test case and one trillion -0.1 for 0 and 999999999999 If you get to design test cases, as well as to observe whether it is possible to design

 

       . Boundary conditions, such as: image zoom to boundary conditions

 

       If a program is input or output an ordered sequence, care should be taken first and the last element of the sequence.

 

       Other border.

 

 

 

4) error guessing

        Speculation is a major mistake rely on informal process intuitive, the basic idea is the column

It cited the case of error or error-prone list may commit. E.g:

     0 or empty

     .  1

     Negative values

     Repeat class

     . restart cellphone

     Remove the source file state

     。。。

     Using the wrong guesses technology to add more test cases

 

 

2.2 Fault Tolerance Test

       

        The main input is wrong or unsupported content, conventional anti-user operation. For example: Change Password interface only supports inputting numbers and passwords, then we can choose to enter react special symbols, special characters like space to view the software.

 

 

 

2.3 Parallel Test

       That multiple functions simultaneously, such as: play movies during the software alerts, playing music during the open tap is turned on fluorescent button.

 

      You can run in the background: Mobile QQ, music player, browser and so on.

 

      Cross test the difference between:

       1) Cross-test is when a function is running, interrupted by another function to perform the original event

OK, is passive; parallel test does not interrupt the original program, is actively initiate multiple functions.

  1. CROSS sent in an instant test, the test should be run in parallel at the same time period.

 

 

2.4 serial test

       The main test is a series of deep path within a single module, the top-down method,

The program has been accessed from the top to the lowest end of the program, and then return to the top of the program. General provisions

Test time in about 3-5 minutes.

 

        For example: Android GSCS our clients, we can enter from the desktop - into the main interface - Select the air conditioning module - select the area to control - to control the implementation of the action. Then turn to the previous menu until you return to the desktop phone.

 

 

2.5 Cross test

       Cross test, the test that is interrupted when an event is executed, another event interrupt the execution of the original event.

       

       Two do not write:

       1) the operation time is too short, such as: a button press process.

       2) the use of low probability interface, such as: help interface, the software version of the interface.

 

       Two will write:

       1) operating for a long time, such as: zone alarm triggering process.

       2) The most important module, commonly used static and dynamic interface, such as: GSCS main interface, watch the surveillance video process.

 

2.6 Compliance Test

      The main test

           1) compatible with the phone system software, for example software compatibility at 2.1 Andrews, Andrews 2.2, 2.3 Andrews, Andrews 4.0 environment.

 

         2) Compatibility between software and different brands, mainly referring to Android. For example HTC phones, Samsung mobile phones.

 

 

2.7 Limit Test

     Also known as stress testing, some pressure is applied to the software, and to find errors in the software.

mainly includes:

     1) memory pressure, that is, open a up a lot of phone memory software before opening the software we want to test, try performance under low memory software.

 

     2) time pressure, that is a long time to a certain function, for example, watch the monitor screen for a long time does not stop, long stay in the CO2 concentration at the interface.

 

     3) pressure capability, i.e., for a single function, increases the number of tests, such as: GSCS mobile client continuously switching a lighting equipment.

Guess you like

Origin blog.csdn.net/IT_studied/article/details/90731718