Unit test guide

xiaoxiao2021-03-06  61

Unit test guide

Zhang Hua (www.51testing.com consultant, CSAI) (2004-6-2)

First, unit test environment configuration test

1. Whether the network connection is normal

2. Whether the network traffic burden is too heavy

3. Software test platform is optional

4. If (3), whether it is software testing in different software test platforms

5. Is the version of the selected software test platform (including the service pack) correct

6. Is the parameter setting of the selected software test platform correct

7. Whether other programs running on the selected software test platform affect test results

8. Is the resolution and color settings of the picture correct?

9. Requirements and support for hardware test platforms

Second, the code test

A static test

1. Whether the code in the same program is written in the same style

2. Whether the code layout is reasonable, beautiful

3. Did the function of the program, whether the subroutine block is obvious

4. Notes if it is in line with a custom format

5. Note: Do not reflect the functionality of the code correctly

6. Variable definition is correct (length, type, storage type)

7. Subprints (functions and methods) accepted by the parameter, size, order and call module

8. Whether the return value type of the function is correct

9. Whether the unin-initialized variable is referenced in the program

10. Whether the subscript of arrays and strings is an integer

11. Whether the subscript of arrays and strings is within the range (not "crossing")

12. Introduce the retrieval and other operations, will there be "missing one such situation"

13. Variables are used in places where constants should be used (example: array range check)

14. Whether to give different types of values ​​for variables

15. In the case of the assignment, whether the value meets the data type conversion rules

16. Variables are naming

17. Whether there is a declaration, but never quoted or only a variable

18. Whether all variables in a particular module are explicitly declared

19. If it is not (18), it is understood that the variable has a higher level of sharing.

20. Whether to assign memory for the referenced pointer

21. The data structure is clearly defined in the function and subroutine.

22. Whether the variables of different data types are used in the calculation

23. Whether the different data types are used in the calculation, but different variables

24. Whether the value of the assigned destination is less than the value of assignment expressions

25. Numerical calculations will overflow (up)

26. Numerical calculations will overflow (down)

27. Whether the divisor may be zero

28. Some calculations will lose computing accuracy

29. Whether the value of variable exceeds meaningful value

30. Whether the order of calculating value is easily confusing

31. Is it correct?

32. Is there a comparison of scores and floating point numbers?

33. If (32), the accuracy problem will affect the comparison

34. Whether each logical expression has been correctly expressed

35. Whether the number of operands of logical expressions are logical values

36. Does the End correspond to a statement in the pro.

37. Can proceeds, modules, subroutines, and loops can be terminated

38. Whether there is a loop that never performs

39. Whether there is a case where multiple cycles is one or less cycle

40. Whether the loop variable is incorrectly modified within the cycle

41. Multi-branch selection, whether the index variable exceeds the possible branch

42. If (41), can this situation be properly processed

43. The global variable definition and usage is consistent in each module

44. Whether to modify the parameters used as input

45. Whether the constant is transmitted as a formal parameter

B dynamic test

1. Test whether data has certain representative

2. Test whether the data contains the various equivalences used in the test (boundary conditions, sub-boundary conditions, blank, invalid)

3. Whether you may get test data from your customers?

4. In the case of non-(3), the test data used is actually significant (customer service) 5. Each set of test data has been implemented

6. Whether the test results of each set of test data are consistent with the expected results

7. Whether the properties of the file are correct

8. Open the file statement correct

9. Input / output statement is consistent with the format manual

10. Buffer size matches if the recording length matches

11. Have files have been opened before using the file

12. Whether the file end condition exists

13. When generating an input / output error, the system is detected and processed.

14. Whether there is a text writing error and a syntax error in the output information

15. Do not accept digital input

16. (15) In the case of whether the number is displayed in a custom format

17. Do not refuse strings and "illegal" numbers

18. Can a pull-down selection?

19. Can the combo box be able to pull a plurality of options

20. For additional data combo box, the data can be added correctly and select the data.

21. Can the list box can choose

22. Do you have multi-data item selection?

23. Date input box accepts the correct date input

24. Date input box Rejects the error date input

25. Date input box Date after the date is entered, display the date according to the established date format

26. Whether there is a single selection group and only one radio button is available

27. If there is no box button in the radio group, this situation is allowed to exist

28. Select Multiple checkboxes (including all optional) in the box group (including all optional)

29. If there is no check box in the check box group, this situation is allowed to exist

30. Text boxes and certain controls refuse to input and select whether the display area is grayed or processed according to the established protocol

31. Whether the data format (size, alignment, color, background) in the text box meets the specifications

32. If the password input box is displayed in a mask

33. Is the control exists default input value, if there is, whether the default value is displayed and submitted

34. After the button, the Cancel is pressed, whether the data in the control is cleared, or processed according to the established protocol

35. The button such as Submit is pressed, and the data is submitted or processed according to the established norm.

36. Is an abnormal information statement correct?

37. Whether the software handles errors in an expected manner

38. Whether there is a corresponding error handling in the case where the file or periphery does not exist

39. Whether the software strictly follows the read and write format of peripherals

40. Is the format of the resulting file and data table correct?

41. Is the result of the resulting file and data sheet correct?

42. Whether the printed report meets the established format

43. Whether the expression of the error log is correct

44. Whether the format of the error log is correct

C GUI test

1. Can the form be based on the relevant input or menu command properly

2. Whether the form can change the size, move, and scroll

3. Does the form of the form can use the mouse, function keys, direction arrows and keyboard operations

4. Whether the form can be regenerated when the form is covered and reused

5. Is the form related function to operate?

6. Whether to display the related drop-down menu, toolbar, scroll bar, dialog, buttons, icons, and other controls, can both correctly display and call

7. When you display a multi-form, whether the form name can be correctly represented.

8. Can the active form be highlighted

9. Can all forms updated in real time when multiple users online?

10. Whether the mouse does not have a pre-expected result when clicking

11. Form sound and prompts if it meets established programming rules

12. Can the form be closed?

13. Whether the setting value of the size of the form control, the direction, color, background, etc. is consistent with the program design specification

14. Whether the form control layout is reasonable, beautiful

15. Whether the Tab order of the form control from left to right, from top to bottom

16. Does the form focus fall in a established control according to the programming specification

17. Is the form of form (full, half, format, spelling) correct

18. Whether the mouse can be identified by the form (such as the function of the function when the funnel shape is not accepted)

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

New Post(0)