Commonly used basic control test case design method

Test Appearance Actions for Tree Controls

1) Whether all trees in the project have the same style

2) What is the default state of the tree structure. For example, is the default tree expanded, and how many levels are expanded? Is there a default focus? What is the default value? Expanded node icon and color?

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

4) Is there a rule if the display node exceeds the page boundary.

5) The text displayed on nodes and leaves specifies how long it should be wrapped.

6) The text displayed by nodes and leaves cannot be garbled. (Enter Chinese, special characters)

 

2. Perform the operation

1) When a node is clicked, whether to expand only the nodes of the next level and display the leaves of this level or display all of the next level.

2) When the page is refreshed, whether the tree structure changes as required, and whether the tree structure preserves the current state or the default state of the process.

 

3. Data manipulation

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

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

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

4) After an operation is performed or the data changes, whether the tree structure returns to the default state, or remains expanded according to the current state.

5) After an operation is performed or the data changes, whether the modified data is in the correct position, whether the state is correct, and whether the ordering is correct.

Test method for dropdown list :

a. The content of the entry is correct; according to the requirements specification, it is determined that the content of the list is correct, and there is no loss or error;

b. Use the scroll bar when the content of the list box is large;

c. When the list box allows multiple selections, check the items selected by shift, select items by ctrl, and select multiple items directly with the mouse;

d. Execute the function of each item in the list box one by one;

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

 

1. Content

1) Check the default value, some are empty by default, some are not empty

2) Check constraints. Sometimes its content changes according to other elements, such as the content of the following box in the city, which is linked according to the change of the province; or the content of the drop-down list is different according to the permissions of the registrant.

 

2. Layout

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

2) The height should be appropriate

 

3. Easy to use

Check if till then TAB and up and down arrows

 There are many options in the drop-down box, such as provinces, which can be divided into equivalence classes, two-character, three-character, and four-character. . . One test for each equivalence class, and then pull out the strange cities in some provinces to display the combined test content

The text box is character type

Default value test:

1. Whether the fixed value or the value given by the database or configuration item is entered for verification.

2. Fill in the value in the input box. When the interface is refreshed, whether to display the input value or the default value.

 

Operational restrictions

1. Unrestricted copy and paste operations, input validation.

2. Restrict copy and paste operations and input validation.

 

Required fields are not empty check:

1. The required items are not entered - the program should prompt an error;

2. Only enter a few spaces for required items, and no other characters are entered - the program should prompt an error;

 

Field uniqueness check: (not all fields do this check, depending on the actual project situation)

1. Enter duplicate field values ​​when adding new ones - friendly information must be prompted;

2. Enter duplicate field values ​​when modifying - friendly information must be prompted;

 

Field length check:

1. Enter [minimum number of characters-1] - the program should prompt an error;

2. Enter [minimum number of characters] - OK;

3. Enter [minimum number of characters + 1]--OK;

4. Enter [maximum number of characters-1]--OK;

5. Enter [maximum number of characters] - OK;

6. Enter [maximum number of characters + 1] - the program should prompt an error;

 

Fields are checked for special characters:

1. If the input field is forbidden to input certain characters, whether the restriction is successful, and whether the prompt information is friendly;

2. The combination of all special characters such as Chinese, English, spaces, numbers, characters, underscores, single quotation marks, etc.;

3. All special characters must be tested (!~@#$^&*()_+{}|: "<>?/.,;'[]\=-`¥...()--: " "?,.,;'[],=-•)

 

The field is a special code check:

1. Enter the html code: such as "<font>Hello</font>" - the code must be displayed in the form of text.

2. Enter the JavaScript code: such as <param name="MovieWindowWidth" value="320">; -- the code must be displayed in the form of text.

 

Multi-line text box input:

1. Whether to allow carriage return and line feed;

2. After saving, the display can keep the format of the input;

3. Enter only carriage return and line feed to check whether it can be saved correctly; if yes, check the save result. If not, check whether there are correct prompts;

4. Enter only a space to check whether it can be saved correctly; if yes, check the save result. If not, check whether there are correct prompts.
date control text box

1. Normal operation

1) Whether there is a default item or not.

2) After selecting the date is it echoed to the page correctly and in the correct format

3) Use the left and right buttons to select the year and month, whether it is correct;

4) Is it correct to directly select the year and month through the drop-down box;

5) After the control selects the date, whether the input box is selected correctly

6) Is it possible to manually modify the input box

7) Click the clear button to clear the input box date correctly;

8) Click the close button of the control to return to the page without modifying the date.

9) After refreshing the interface, whether the date of the input box has not changed

 

2. Manual input operation

1) Can the input box be manually entered?

2) The format of the input date is correct, other formats cannot be used

3) After inputting letters, characters, and special characters, the prompt fails.

4) Prompt method (restricted input: unlimited input and then use prompt box or label immediately, unlimited input: use prompt box or label when the focus leaves, click other buttons to prompt)

command button control

testing method:

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

b. Provide enough prompts for illegal input or operation, for example, when the input monthly working days is 32, click "OK" and the system should prompt: the number of days cannot be greater than 31;

c. Confirmation information must be given for operations that may cause the data to be unrecoverable, giving the user the opportunity to give up the choice;

d. If there is a keyboard shortcut key, after using the shortcut key, the function will be executed normally.

 

Special operation:

1. Quickly click the button twice, whether only one is effective

2. After clicking the button, click refresh, whether it is valid only once

3. After clicking the button, right-click to go back, whether it is valid only once

4. After the button is clicked, will the button change its state?

5. Whether to set the Enter key/shortcut key operation (whether the set shortcut key conflicts with the shortcut key that comes with Windows)

radio button control

testing method:

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

b. Execute the function of each radio button one by one, and store the option value in the database. After selecting "Male" and "Female" respectively, the data saved to the database should be correspondingly "Male" and "Female";

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

d. Whether the options are arranged in order

e. There are default options or no.

f. Whether the option name and option value meet the requirements

g. After refreshing the page, whether the selected value/default value is lost.

Page control test

1. The total number of pages and the current page are displayed correctly, and can be displayed in real time according to the number of data records (real-time display of page changes? Remember that the general system needs to be refreshed to display page changes). (The default display data generally includes "display all data" and "do not display data" according to the system design.)

2. Execute each button in the page turning control one by one, and it can operate normally. (The main buttons are generally: the first page, the previous page, the next page, the 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 by yourself, check whether the page jump is correct; for example, the total number of pages is 10 pages, click GO after inputting 11, whether it still stays on the current page (or prompts an input error), you can also try to enter ordinary characters or Click GO after the special characters, whether the page is displayed normally, and there will be no script errors.

4. Whether the number of data displayed on the page can be configured, and if so, whether the configuration matches the actual display.

Upload control test

testing method:

a. Select the file through the Browse button;

b. If the file restriction type (exe, rar, doc, pdf, xls, jpg, gif, bmp, png, etc.) and size (100k, 512k, 1M, 1.5M, 2M, 2.5M), test the restriction conditions one by one Correct and give clear hints;

c. Check whether it can be downloaded correctly after uploading, and if the picture can be displayed correctly;

d. If there are no special requirements, the name of the uploaded file should be kept consistent with the name of the saved file.

UP-down control text box test

testing method:

a. Directly enter the number or use the up and down arrows to control, for example, directly enter 10 in "Number", or click the upward arrow to make the number become 10;

b. Use the up and down arrows to control the automatic cycle of numbers, for example, when the maximum number is 253, click the up arrow, and the number will automatically become 1; vice versa is also applicable;

c. Enter the over-boundary value directly, and the system should prompt to re-enter;

d. Enter the default value, blank. For example, the number of "insert" is the default value, click "OK"; or, delete the default value, make the content empty, click "OK" to test;

e. Enter characters. At this point, the system should prompt that the input is incorrect.

check box

testing method:

a. Check boxes can be checked at the same time;

b. Check boxes can be partially selected;

c. The checkboxes can be unchecked;

d. Execute the function of each checkbox one by one;

Scrollbar control test

A few things to note:

a. The length of the scroll bar changes in time according to the length or width of the displayed information, which is helpful for the user to understand the position and percentage of the displayed information. For example, when browsing a 100-page document in word, when browsing to 50 pages, the scroll bar position should be in the middle;

b. Drag the scroll bar to check the screen refresh and see if there are garbled characters;

c. Click the scroll bar;

d. Use the wheel to control the scroll bar;

e. The up and down buttons of the scroll bar.

A test of mixed use of various spaces in a window

a. Interaction between controls;

b. The order of the tab keys is generally from top to bottom, left to right;

c. The use of hot keys is tested one by one;

d. Use of enter key and esc key; In the test, the principle of from simple to complex should be followed, and the function of a single control should be tested first to ensure that the implementation is correct, and then the functional combination of multiple controls should be tested.

ps: When testing the password input box, special attention should be paid to the uppercase input test.
Find and replace operations

Case Demonstration:

Open the Replace dialog in Word

There are two cases for testing this function: pass test and fail test

 

Passed the test:

1. Enter the content to find directly. Or find all

2. Find the content you have searched in the combo box. Search again and confirm that the content of the document is correct. For example, you have searched for "test case". You don't need to re-enter the search content when you enter it again. You can search directly in the document.

 

Failed test:

1. Enter a query string that is too long or too short. Such as. Suppose the query string length is 1 to 255. Then enter 0. 1. 2. 256. 255 and 254 for testing;

2. Enter the special character set. For example. In word, ^g stands for picture. ^ stands for column breaker. You can enter this kind of special character test;

 

Substitution tests are largely the same.

Use case for functional test of edit operation window:

1. Close the Find and Replace window. Do nothing. Exit directly;

2. Test attachments and options. If. Set "exact search", "backward" search and other attachment options, etc. to test;

3. Interaction between controls. For example. When the search content is empty. The button "Search All". "Search". "Replace All". "Replace" are all gray.

4. Hotkey. Tab key. Use of Enter key.

 insert operation

1. Insert the file

test case

a. Insert file;

b. Insert an image;

c. Insert the document itself in the document;

d. Remove the inserted source files;

e. Replace the content of the inserted source file;

 

2. Link files

testing method:

a. Insert linked file;

b. link the document itself within the document;

c. Remove the inserted source files;

d. Replace the content of the inserted source file.

 

3. Insert objects

what to test

a. Insert the objects allowed by the program. For example, insert an excel worksheet in word;

b. Modify the content of the inserted object. The inserted object can still be displayed correctly;

c. Uninstall the program that generates the inserted object. For example, after inserting an excel worksheet in word, uninstall excel. The worksheet is still used normally.

edit operation

Editing operations include Cut. Copy. Paste operations.

How to Test the Cut Operation

a. Cut the text, text box, frame;

b. Cut the image

c. Text image blending and cutting

 

The copy operation method is similar to the cut.

When testing. It is mainly a test of the paste operation. The method is:

a. Paste the cut text. Text box and frame;

b. Paste the cut image;

c. After cutting. Paste in different programs

d. Paste the same content multiple times. Such as. After cutting. Paste it 3 times in a row in the program;

e. Use the paste operation to force the input of data that the program does not allow.
Design method of interface test case

1. Form

How to test the form:

a. The size of the form. The size should be appropriate. The layout of the controls is reasonable;

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

c. Zoom the form. The controls on the form should change with the size of the form;

d. Display resolution. It is necessary to test whether the display of the program is normal under different resolutions;

When testing, also pay attention to whether the status bar is displayed correctly; whether the operation of the toolbar icon is valid. Whether it is consistent with the icon display in the menu bar; whether the content of the error message is correct. No typos. And clear, etc.;

 

2. Controls

testing method:

a. The font and size of the form or control should be consistent;

b. Pay attention to full-width. Half-width mixing

c. No mix of Chinese and English.

menu

Be careful when testing

a. Select whether the menu can work normally. And it is consistent with the actual execution content;

b. Whether there are typos:

c. Whether the shortcut keys are repeated;

d. Whether the hotkey is repeated;

e. Whether the shortcut keys and hot key operations are valid

f. Whether there is a mixture of Chinese and English

g. The menu should be relevant to the context. For example, users with different permissions log in to an application. Users of different levels can see different levels of menus and use different levels of functions;

h. Right mouse button shortcut menu

special properties

1. The installation interface should have a company introduction or product introduction. There should be a company icon

2. The main interface and most interfaces should have a company icon

3. Select the "Help" -> "About" command. You should see relevant copyright and product information

other

1. All the above tests should work normally under Netscape, Firefox, and Opera browsers.

2. The main interface and most interfaces should have a company icon

3. You should see relevant copyright and product information at the bottom of the page

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325580428&siteId=291194637