text Box test case

Source: Internet
Author: User

First, text box:

in the In web testing, there are two types of form input boxes, one is a numeric text box, and the other is a normal text input box with character type.

Normal text input box

You typically check the following points:

1. Enter Chinese and English spaces

2. Enter extra long characters

3. Input string with spaces in the middle

4. Enter the trailing spaces

5. Enter special characters

6: Enter full-width/half-width special characters (especially single quotes)

7. Enter Special string Null,null

8. Enter normal string

9. The input string contains spaces between the strings

10: Enter full-width, half-width spaces

11: Input Full-width/half-width, uppercase/lowercase English characters

12: Input Full-width/half-width digits

13: Input Chinese characters (default full width)

14: Enter English characters (default full width)

15: Enter JAVASCRĪPT function: <b>hello</b>,alert ("Hello")

16: High-risk words, forbidden words, sensitive words

17: Enter Japanese characters (rarely check this character)

18: Enter the escape character of the special string null, NULL, space;<scrīpt></scrīpt>;<br>;<tr>;<td>;</TR>;</TD >;

numeric input box for expense class:

Condition:demcial (x, y), the interface displays the decimal point to the y bit

You typically check the following points:

1. Enter the English space

2. Enter Chinese space

3. The input character contains a~z or a~z or [email protected]#$%^&* () _+|\=-' {}[]; ' ":,./?<>

4, input integer first is 0

5, input integer at the bottom of 0

6. Enter a positive value

7. Enter a negative value

8. Input 0

9. Enter decimals

10. Input decimal number is 0

11. Enter more than one decimal point

12. Input extra Long value

13, the input number is only a decimal point, the left of the decimal > (x-y) a valid bit

14, the input number only a decimal point, the right of the decimal >y a valid bit

15, the input number has only one decimal points, the number of decimal place is less than <y a significant bit

16, the input number has only one decimal points, the number of decimal digits =y a valid bit

Required non-null check:

Required fields are not entered-the program should prompt the 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 subject to this check, depending on the actual project situation)

Enter duplicate field values when new--Must prompt friendly information;

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

Field length check:

input [Minimum number of characters -1]--program should prompt for errors

2, input [minimum number of characters]--ok ;
3. Enter [minimum number of characters +1]--program should prompt error

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 :

01, input domain, such as when certain characters are forbidden to enter, whether the restriction is successful, whether the information is friendly

2, Chinese, English, spaces, 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 HTM code: such as "<font> Hello </font>";--must be displayed as text in the form of the Code

02, 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:

Whether to allow carriage return line wrapping

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 the correct prompt , 4, only enter a space, check whether the correct save; If not, see if you have the correct prompts.

Second, the text box is a numeric type

? Boundary Value:
01, input [Minimum value -1]--program should prompt error;

2, input [minimum value]--ok;

3, input [maximum value]--ok;

4, enter [maximum value +1]--program should prompt error

Number of digits

input [Limit number of digits]--ok;

2, enter the [limit number +1]--according to the actual project, whether automatically rounded up to limit the number of digits, or prompt information;

3. Enter [Limit number -1]--ok

? outliers, special values:

Input non-numeric data: Chinese characters, letters, characters--The program should prompt error;

2, input negative number--according to the actual project, if not allowed to enter negative numbers, must prompt friendly information;
3, the field is forbidden to enter non-numeric data directly, use the "paste", "copy" function to try to enter, and test whether the normal commit save-only use the "paste", "Copy" method to enter the special characters should not be saved, and should give the appropriate prompt

4, full-width digital and half-width of the situation-the full-width of the number can not be saved, prompting friendly information, half-width digital normal preservation;
5, the first zero value: such as 01=1--depending on the actual project situation is determined

Third, the text box is the date type

? Legality check:

Day Input [0 days]--procedure should prompt error;

Day Input [1st]--ok

3, day input [32 days]--program should prompt error; 51Testing software test Network Q w9]!l6[6c
4, month input [1, 3, 5, 7, 8, 10, December], day input [31st]--ok

5, month input [4, 6, 9, November], day input [30th]--ok;

6, month input [4, 6, 9, November], day input [31st]--program should prompt error;
7, input non-leap year, month input [February], day input [28th], such as 2009.2.28--okp%c}&b
8, input non-leap year, month input [February], day input [29th], such as 2009.2.29--program should prompt error VN
9, (Leap year) month input [February], day input [29th], such as 2008.2.29--ok;

10, (Leap year) month input [February], day input [30th], such as 2008.2.30--program should prompt error

11, month input [0月]--program should prompt error

12, month input [January]--ok

13, month input [December]--ok

14, month input [1 March]--The procedure should prompt error;

? format check:

illegal format:2009-09, 2009-09-, 200-2-2;

Legal depending on the project:2009/09/01, 2009.09.01, 20090901, 2009-09-01

Exception value, special value:

input Chinese characters, letters, characters--The program should prompt error;

Four, the text box is the time type

? Legality check:

1, when input [24 o'clock]--The program should prompt error

2, when input [00 o'clock]--ok

3, sub-input [60 points]--The program should prompt error;

4, sub-input [59 points]--ok;

5, sub-input [00 points]--ok

6, seconds input [60 seconds]--The program should prompt error;

7, seconds input [59 seconds]--OK;

8, seconds input [00 seconds]--ok

? format check:

Illegal format:

Depending on the specific project is legal:

Exception value, special value:
1, enter Chinese characters, letters, characters--The program should prompt error '

2, whether the time involved in the system to take server time

Note point: Use case design:

parameter Description:<<<title>>> for the caption of the input box,<<<maxlen>>> the maximum length of the caption

Step 1: <<<title>>> Enter English space

Expect: When <<<title>>> required, prompt "<<<title>>> cannot be empty", the content is automatically emptied when not required

Step 2: <<<title>>> Enter Chinese space

Expect: When <<<title>>> required, prompt "<<<title>>> cannot be empty", the content is automatically emptied when not required

Step 3: <<<title>>> input of more than <<<maxlen>>> kanji

Expect: Hint "<<<title>>> cannot exceed <<<maxlen>>> characters"

Step 4: <<<title>>> input of more than <<<maxlen>>> English characters

Expect: Hint "<<<title>>> cannot exceed <<<maxlen>>> characters"

Step 5: <<<title>>> enter more than <<<maxlen>>> Chinese characters

Expect: Hint "<<<title>>> cannot exceed <<<maxlen>>> characters"

Step 6: <<<title>>> include spaces in the input string

Expect: Saved successfully

Step 7: <<<title>>> input string with spaces

Expect: Automatically filter left and right spaces, save success

Step 8: <<<title>>> Enter special characters such as [email protected]#$%^&* () _+|\=-' {}[]; ' ":,./?<>

Expect: Save succeeded, show no exception

Step 9: <<<title>>> Enter HTML format characters, such as
<script>alert (/xss/) </script>

Expect: Save succeeded, show no exception

Step: <<<title>>> Enter null or null string

Expect: Saved successfully

Step One: <<<title>>> enter normal string

Expect: Saved successfully

where8-10 is unrestricted, and some special input boxes are sensitive to these restrictions, the expected result is not the same, expect: Hint <<<title>>> cannot enter ....

numeric input box for expense class:

Condition:demcial (x, y), the interface displays the decimal point to the y bit

Use case design:

parameter Description:<<<title>>> for the caption of the input box,<<<maxlen>>> the maximum length of the caption

Step 1: <<<title>>> Enter English space

Expect: Hint <<<title>>> cannot be a space

Step 2: <<<title>>> Enter Chinese space

Expect: Hint <<<title>>> cannot be a space

Step 3: The <<<title>>> input character contains a~z or a~z or [email protected]#$%^&* () _+|\=-' {}[]; ' ":,./?<>

Expect: Hint <<<>>> can only be numeric

Step 4: <<<title>>> input 0010

Expect: Preserve valid data, 10.00 saved successfully

Step 5: <<<title>>> input

expect:10.00 Save Success Note: 5 and 6 of corresponding checkpoints

Step 6: <<<title>>> input -10

Expect:-10.00 saved successfully

Step 7: <<<title>>> input 0

expect:0.00 saved successfully

Step 8: <<<title>>> input 0.50

Expect: retain significant digits 0.50 Note: 8,9,16 of the corresponding checkpoint

Step 9:<<<title>>> input 0.5.5

Expect: Tip <<<title>>> can only have one decimal point

Value of step 10:<<<title>>> input (<<<maxlen>>>+1)

Expect: Indicates that the valid bit value cannot exceed X-bit

Step 11:<<<title>>> input [<<<x>>>-<<<y>>>+1]. [<<<y>>>] Expect: Indicates that the left of the decimal point cannot exceed (X-y) a valid bit

Step 12:<<<title>>> input [<<<x>>>-<<<y>>>]. [<<<y>>>+1] Expect: If there is a limit, hint to the right of the decimal point can not exceed the y effective bit, if not limited, after rounding save

Step 13:<<<title>>> input [<<<x>>>-<<<y>>>]. [<<<y>>>]    

Expect: [<<<x>>>-<<<y>>>]. [<<<y>>>] saved successfully

text Box test case

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.