Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

WEB Common Test case-- text input Box

2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

For ordinary text input boxes, you usually check the following points:

1. Chinese and English spaces

two。 The beginning and end of a string contain spaces

3. There are spaces in the middle of the string

4. Letter

5. Figures

6. Chinese

7. Special character

8. Null/NULL

9. Ultra-long character

10. Html format string

Serial number

Input

Expected output

one

Chinese space

Cannot be empty

two

English space

Cannot be empty

three

The string begins with a space

Saved successfully, automatically filter the first space

four

There are spaces in the middle of the string

Saved successfully

five

The end of the string is a space

Saved successfully, automatically filter trailing spaces

six

Letter

Saved successfully

seven

Figures

Saved successfully

eight

Chinese

Saved successfully

nine

~! @ # ¥

Saved successfully

ten

Null

Saved successfully

eleven

NULL

Saved successfully

twelve

Super long Chinese

No more than how many Chinese characters

thirteen

Very long English / numbers

No more than how many characters

fourteen

Html format string

Saved successfully

For the text input box of the expense class, you usually check the following points:

1. Normal integer

two。 Normal decimal

3. Negative number

4. An integer that begins / ends with 0

5. A decimal that begins / ends with 0 (not 0. How many of these)

6. Ultra-long integer

7. Super-long decimal

8. Start / end with a decimal point

9. Chinese and English spaces

10. Letter

11. Special characters

twelve。 Chinese

13. 0

14. More than 1 decimal point

If you can enter xxxxxxxx.xx at most

Serial number

Input

Expected output

one

Normal integer

Save successfully, automatically join. 00

two

Normal decimal

Saved successfully

three

Negative number

Saved successfully

four

An integer that begins with 0

Error prompted, cannot start with 0

five

An integer that ends with 0

Saved successfully

six

A decimal that begins with 0 (not 0.)

Error prompted, cannot start with 0

seven

A decimal ending with 0

Saved successfully, keep 0

eight

The integer part is very long.

Error is prompted. The integer cannot exceed 8 bits.

nine

The decimal part is very long.

Saved successfully, rounding to intercept the top 2 places

ten

Start with a decimal point

Save successfully, automatically add 0 in front

eleven

End with a decimal point

Save successfully, automatically filter the decimal point

twelve

Chinese space

Cannot be empty

thirteen

English space

Cannot be empty

fourteen

Letter

Cannot be entered

fifteen

Special character

Cannot be entered

sixteen

Chinese

Cannot be entered

seventeen

0

Saved successfully

eighteen

More than 1 decimal point

Error prompt. The decimal point cannot be more than 1.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report