How much should be tested (1) -- try to be as comprehensive as possible

Source: Internet
Author: User

Suppose there is a text box and you need to check whether the input content is an email. How many use cases should you test?

1. English email address

Abc@gmail.com

2. Email addresses with underlines and periods

A. B .c@gmail.com

A-b-c@gmail.com

A-b.c@gmail.com

A.b-c@gmail.com

A. B @gmail.com

A-b@gmail.com

A_ B @gmail.com

A. B _c@gmail.com

A-b_c@gmail.com

A_ B _c@gmail.com

3. A long email address

Abcdefghijklmnopqrstuvwxzy@gmail.com

4. Pure Digital email address

123@gmail.com

5. Email addresses mixed with English numbers

Abc123@gmail.com

A1b2c3@gmail.com

5. Email addresses with mixed english numbers and symbols

A-1-b-2-c-3@gmail.com

6. Chinese email address

Xiao Erlang @ gmail.com

7. full-width English email address

Abc@gmail.com

8. Email addresses with uppercase letters

ABC@gmail.com

9. Email addresses in combination with uppercase and lowercase letters

ABCdef@gmail.com

10. Email addresses with two @ symbols

ABC @ def@gmail.com

ABC @ gmail.com

11. Email addresses with other symbols

ABC # def@gmail.com

12. Email Addresses of consecutive periods

A.. B @gmail.com

A. B @ gmail..com

13. Email addresses with consecutive underscores

A__ B @gmail.com

AB __c@gmail.com

14. All are email addresses consisting of underscores, periods, and hyphens (minus signs ).

____ @ Gmail.com

---- @ Gmail.com

-- __@ Gmail.com

... @ Gmail.com

-_-@ Gmail.com

--. @ Gmail.com

-_. @ Gmail.com

15. There are two end addresses ~ Email Addresses at N points

Abc@abc.def.com

Abc@abc.def.ghi.com

Abc@abc.def.ghi.jkl.com

16. The end is a digital email address.

Abc@123.456

17. Email addresses without periods at the end

ABC @ def

18. Email addresses without the @ symbol

Abc.def.com

19. Two email addresses with spaces (related to trim)

Abc@gmail.com

Abc@gmail.com

20. Email addresses with spaces in the middle

C@gmail.com A B

21. Email Address of the fullwidth symbol

A--b@gmail.com

22. Email address with full-width Spaces

A B @gmail.com

23. full-width @ symbol email address

ABC · Gmail. com

 

 

Use the test cases above to test whether your website's email verification is complete and valid.

 

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.