Common basic Control Test Cases

Source: Internet
Author: User

Directory:
    • Testing for tree controls
    • Drop-down box (list box) test Case design
    • text box is a character type
    • Test of the Date control text box
    • Test of a command button control
    • Test for radio button controls
    • Test for Page control
    • Test for uploading controls
    • Up-down Control text Box test
    • Test for check box
    • Test for scroll bar control
    • Testing when various controls are mixed and used in a form
    • Find replacement operations
    • Insert operation
    • Edit operation
    • Design method of interface test case
    • Menu
    • Special properties
    • Other

Test appearance actions for tree controls

1) are all trees in the project consistent in style?

2) What is the default state of the tree structure?  For example, if the default tree is expanded, what is the expansion? Do you have the default focus? What is the default value? Expand the node icon and color?

3) Verify that the connection to the tree structure on the page is displayed correctly when the node is opened.

4) If the display node exceeds the page boundary, there is a requirement.

5) The text of the node and leaf display specifies how long to fold the line.

6) node and leaf display text can not be garbled. (input Chinese, special characters)

2. Perform operation

1) When you point to a node, do you want to expand only the next level of nodes and show the leaf at that level, or show the next level of all.

2) When the point page refreshes, whether the tree structure changes according to the requirements, whether the tree structure is saved as the status quo or the default state of the process.

3. Data manipulation

1) Whether the data on the tree structure is correct.

2) The nodes and leaves on the tree structure are sorted correctly. (Ascending or descending).

3) The tree structure is sorted according to the order in the database or by the order of the program array.

4) Whether the tree structure returns to the default state or remains in the current state after performing an operation or changing the data.

5) After performing an operation or data changes, the modified data is not in the correct position, the status is correct, the sort is correct.

Drop-down box (list box) test Case design

Test method:

A. The contents of the item are correct, and the contents of the list are correct, without loss or error, according to the requirement specification;

B. Use scroll bars when the contents of the list box are large;

C. When the list box allows multiple selections, check the shift selection separately, press CTRL to select entries, and select multiple entries directly with the mouse;

D. Perform the function of each entry in the list box one by one;

E. Check whether data can be entered into the combo list box;

1. Content

1) Check default value, some default null, some are non-empty

2) Check the constraints. Sometimes its content is changed according to other factors, such as the contents of the following boxes in the city, are linked according to the changes in the province, or depending on the permissions of the login, the contents of the drop-down list are different.

2. Layout

1) width, sometimes it automatically controls the width according to the length of the content

2) height should be suitable

3. Ease of Use

Check to see if tab and up and down arrows are followed

There are many options in the drop-down box like the provinces can be divided under the equivalence class, two words, three words, four words of ... Each equivalence class is measured, and then the strange city inside some provinces is pulled out alone to make the display of the combined measurement content.

text box is a character type

Default value Test:

1, fixed value or the database or configuration item given the value of the input validation.

2, fill in the input box value, the point interface Refresh, is to display the input value or the default value.

Operational restrictions

1, do not limit the copy and paste operation, input validation.

2. Restrict copy and paste operation and enter validation.

Required non-null check:

1, the required fields are not entered-the program should prompt error;

2, must fill in only a few spaces, no other characters entered-the program should prompt error;

Field Uniqueness Check: (Not all fields are checked for this, depending on the actual project situation)

1. Enter duplicate field values when adding--Must prompt friendly information;

2. Enter duplicate field values when modifying--must prompt friendly information;

Field length check:

1, input [minimum number of characters -1]--program should prompt error;

2, input [minimum number of characters]--ok;

3, input [minimum number of characters +1]--ok;

4, input [maximum number of characters -1]--ok;

5, input [maximum number of characters]--ok;

6, input [maximum number of characters +1]--program should prompt error;

field is a special character check:

1, input domain, such as the prohibition of the input of certain characters, whether the restriction is successful, the information is friendly;

2, Chinese, English, space, numbers, characters, underscores, single quotes, and all the special characters of the combination;

3. All special characters must be tested ([email protected]#$^&* () _+{}|: "<>?/.,;" []\=-' ¥ ... ()--:《》? 、。 ,; ' "", =-)

field is a special code check:

1. Enter the HTML code: for example, "<font> Hello </font>"-The code must be displayed in text form.

2, input JavaScript code: for example <param name= "Moviewindowwidth" value= "" "" >;--must be in the form of text to display the code.

Multi-line text box input:

1, whether to allow carriage return to line;

2, save after the display can keep the input format;

3, only enter the carriage return line, check whether it can be saved correctly, if possible, view the saved results. If not, see if you have the correct prompt;

4, only enter the space, check whether it can be saved correctly, if possible, view the saved results. If not, see if you have the correct prompts.

Test of the Date control text box

1. Normal operation

1) There is a default item or not.

2) Select whether the date is correctly echoed back to the page, and the format is correct

3) through the left and right buttons to choose the year and month, is correct;

4) Direct selection of the year and month through the dropdown box, is correct;

5) When the control has finished selecting the date, the input box is selected correctly

6) Whether the input box can be modified manually

7) Click the Clear button to correctly empty the input box date;

8) The Close button of the point control does not modify the date and returns the page.

9) The date of the input box has not changed after the interface is refreshed

2. Manual input operation

1) input box can be entered manually

2) The input date is formatted correctly and cannot be used in any other format

3) Enter letters, text, and special characters after the prompt fails.

4) How to prompt (limit input: Unlimited input and instant use of the prompt or label, unrestricted input: When the focus is left behind with a hint box or label, point other button prompt)

Test of a command button control

Test method:

A. Click the button to respond to the action correctly. For example, click OK to perform the operation correctly; Click Cancel to exit the window;

B. Give sufficient hint to illegal input or operation, for example, enter month working days is 32 o'clock, after click "OK" the system should prompt: The number of days can not be greater than 31;

C. For operations that may cause data to be unrecoverable, a confirmation message must be given to give the user the opportunity to opt out;

D. If you have a keyboard shortcut, use the shortcut key to perform the function normally.

Special operation:

1, Quick Click two times button, whether only one effective

2, click the button, point refresh, whether only one effective

3, click the button, right-click back, whether only one effective

4. After clicking the button, the button will not change the status

5, whether to set the ENTER key/shortcut action (set the shortcut key and Windows comes with the shortcut keys have no conflict)

Test for radio button controls

Test method:

A. A group of radio buttons cannot be selected at the same time, only one is selected.

B. Perform the function of each radio button one at a to be stored in the database is not an option value. After selecting the "Male" and "female" respectively, the data saved to the database should be "male" and "female" respectively.

C. A group of radio buttons that perform the same function must be selected by default at the initial state, and cannot be empty at the same time;

D. Whether the options are in a sorted order

E. There is a default option or not.

F. Whether the option name and option values meet the requirements

G. When the page is refreshed, the selected value/default value is dropped.

Test for Page control

1, the total number of pages and the current page is displayed correctly, and can be displayed in real-time according to the data record (real-time display page changes?) Remember the general system to refresh before the page changes can be displayed). (The default display data is usually "show all data" and "Do not show data" according to the system design.) )

2. Each button in the page control is executed one by one, and can operate normally. (The main button is usually: first page, previous page, next page, last page.) (The current page, the total number of pages, jump to the first?) Page go))

3, if you can enter the number of pages, check whether the page jump is correct, such as the total number of pages is 10 pages, enter 11 after the go, whether still stay on the current page (or prompt input error), you can also try to enter ordinary characters or special characters after the go, the page is displayed normal, no script error.

4, the page shows whether the number of data can be configured, can be configured with the actual display whether the match.

Test for uploading controls

Test method:

A. Select the file via the browse button;

b, if the file limit type (exe,rar,doc,pdf,xls,jpg,gif,bmp,png, etc.) and size (100k,512k,1m,1.5m,2m,2.5m), to test the constraints are correct, and give a clear hint;

C, check if the actual transmission can be downloaded correctly, if the picture can be displayed correctly;

D, if there is no special requirements, you should keep the name of the uploaded file and the name of the file after the preservation of the same.

Up-down Control text Box test

Test method:

A. Enter the number directly or control with the up and down arrows, for example, enter 10 directly in number, or click the up arrow to make the number 10;

B. Use the up and down arrows to control the automatic rotation of numbers, for example, when the maximum number is 253, click the up arrow, the number automatically becomes 1;

C. Direct input of the super-boundary value, the system should prompt re-input;

D. Enter a default value, blank. For example, insert number is the default value, click OK, or delete the default value so that the content is empty, click OK to test;

E. Enter characters. At this point the system should prompt for incorrect input.

Test for check box

Test method:

A. check box can be selected at the same time;

B. check box can be selected partially;

C. check box can not be selected;

D. Perform each check box function individually;

Test for scroll bar control

Here are some points to note:

A. The length of the scrollbar is changed in time based on the length or width of the displayed information, so that the user can understand the location and percentage of the displayed information, for example, when navigating a 100-page document in Word and browsing to page 50, the scroll bar position should be in the middle;

B. Drag the scroll bar, check the screen refresh, and see if there is garbled;

C. Click the scroll bar;

D. Use the roller to control the scroll bar;

E. Scroll bar up and down buttons.

Testing when various controls are mixed and used in a form

A. Interaction between controls;

B. The order of tab keys, usually from top to bottom, from left to right;

C. Use of hotkeys, testing each;

D. The use of the ENTER key and the ESC key, in the test, should follow the principle of simple into the complex, first to test the function of a single control, to ensure that the implementation of the error, then the function of multiple controls to test the combination.

PS: The password input box should pay special attention to the test of uppercase and lowercase input.

Find replacement operations

Case Demo:

Open the Replace dialog box in Word

Testing this function has passed the test and failed the test two cases

Pass the test:

1. Enter the content to find directly. or Find All

2. Look for what has been found in the combo box. Find and confirm that the contents of the document are correct again. For example, "test cases" have been looked up. Enter again without re-entering the search. You can search directly in the document.

Failure test:

1. Enter a query string that is too long or too short. Suppose the query has a string length of 1 to 255. then enter 0. 1.2. 256.255 and 254 for testing;

2. Enter a special character set. For example, in Word. ^g represents a picture. ^ Represents a column break. This type of special character test can be entered;

The replacement test is basically the same.

Use cases for functional testing of the Edit Operations window:

1. Close the Find replacement window. No action is taken. Direct exit;

2. Accessories and options test. If. Set "Exact Search". "Backward" search and other attachment options, etc. to test;

3. Interactions between controls. When the search content is empty. Button "Search All". "Search". Replace All. "Replace" is grayed out.

4. Hotkey. tab. The use of the ENTER key.

Insert operation

1. inserting files

The situation of the test

A. inserting files;

b. inserting images;

C. Insert the document itself in the document;

D. Remove the inserted source file;

E. Replace the contents of the inserted source file;

2. Link files

Test method:

A. Insert the linked file;

B. Link the document itself to the document;

C. Remove the inserted source file;

D. Replace the contents of the inserted source file.

3. Inserting objects

What to test

A. Insert the object allowed by the program. For example, insert an Excel worksheet in Word.

B. Modify the contents of the inserted object. The inserted object can still be displayed correctly;

C. Uninstall the program that generated the inserted object. For example, when you insert an Excel worksheet in Word, you uninstall Excel. The worksheet is still working correctly.

Edit operation

Editing operations include clipping. Copy. Paste operation.

Methods for testing cutting operations

A. to the text. Text box. frame to cut;

B. Cut the image

C. Text image blending and clipping

The copy operation method is similar to clipping.

When testing. This is primarily a test of the paste operation. The method is:

A. Paste the clipped text. text boxes and frames;

B. Paste the cut image;

C. After cut. Paste in a different program

D. Paste the same content multiple times. such as. After cut. Paste in the program 3 times in a row;

E. Use the paste operation to force the input of data that is not allowed by the program.

Design method of interface test case

1. Form

Methods to test the form:

A. Form size. Size to fit. control layout is reasonable;

B. Move the form. Move the form quickly or slowly. The background and the form itself must be refreshed correctly;

C. scale the form. Controls on the form should vary depending on the size of the form;

D. display resolution. It is necessary to test the display of the program at different resolutions.

You should also be aware that the status bar is displayed correctly when you test it, and that the icon on the toolbar performs the operation effectively. is consistent with the icon in the menu bar, and the error message content is correct. No typos. and clear and so on;

2. Controls

Test method:

A. The font and size of the form or control must be the same;

B. Pay attention to the full angle. Half-width mixing

C. No mix of Chinese and English.

Menu

Be careful when you test

A. Select whether the menu will work correctly. and consistent with the actual implementation of the content;

B. Whether there is a typo:

C. Whether the shortcut keys are duplicated;

D. Whether the hotkey is duplicated;

E. Whether shortcut keys and hotkey operations are valid

F. Whether there is a mix of Chinese and English

G. The menu should be context-sensitive. For example, users with different permissions log on to an application. Different levels of users can see different levels of menus and use different levels of functionality;

H. Right-click shortcut menu

Special properties

1. The installation interface should have company introduction or product introduction. Have the company icon

2. The main interface and most of the interface preferably have a company icon

3. Select the "About" command, "help". You should see the relevant copyright and product information

Other

1, all the above test should be in Netscape, Firefox, Opera browser under normal.

2, the main interface and most of the interface should have the company icon

3, the bottom of the page should be able to see the relevant copyright and product information

Common basic Control Test Cases

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.