Announcement

Collapse
No announcement yet.

How many test cases do we need to test Email field?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How many test cases do we need to test Email field?

    What kind?
    1. Valid/invalid
    2. Capacity.

    Assuming that we are given this email: local-part@domain.com

    Requirements for email field (from WiKi):
    Local Part:
    - "Local-part" allows 64 character with the total email length of 254 characters.
    - Uppercase and lowercase English letters are allowed
    - Digits are allowed
    - Characters !#$%&'*+-/=?^_`{|}~ are allowed
    - "DOT" is allowed but leading or tailing with "DOT" as well as double "DOT"s are not allowed.
    - Special characters are allowed with restrictions. They are: Space and "(),:;<>@[\]
    - Special characters must only be used when contained between quotation marks, and that 2 of them (the backslash \ and quotation mark " must also be preceded by a backslash \ (e.g. "\\\"").
    - Comments are allowed with parentheses at either end of the local part; e.g. "john.smith(comment)@example.com" and "(comment)john.smith@example.com" are both equivalent to "john.smith@example.com".
    - A quoted string may be used when the outermost quotes are the outermost characters of the local-part (e.g. abc."defghi".xyz@example.com or "abcdefghixyz"@example.com are allowed.
    - Conversely, abc"defghi"xyz@example.com is not allowed; neither is abc\"def\"ghi@example.com

    Domain Part:
    - "Domain" can be 252 characters long with the total email length of 254 characters.
    - "Domain" may be an IP address literal, surrounded by square braces, such as jsmith@[192.168.2.1]
    - Internationalized domain names (which are encoded to comply with the requirements for a hostname) allow for presentation of non-ASCII domain parts.
    - Comments are allowed in the "Domain" part "john.smith@(comment)example.com" and "john.smith@example.com(comment)" are equivalent to "john.smith@example.com".


    1. Empty field before "@domain.com" - Error: Invalid email format
    2. 50 letters before "@domain.com" - Accepted
    3. 64 letters before "@domain.com" - Accepted
    4. 65 letters before "@domain.com" - Error: Invalid email format
    5. TesT65.6!#$%&'*+-/=?^_`{|}~@domain.com - Accepted
    6. .local@domain.com - Error: Invalid email format
    7. local.@domain.com - Error: Invalid email format
    8. local..part@domain.com - Error: Invalid email format
    9. local part@domain.com - Error: Invalid email format
    10. local"part@domain.com - Error: Invalid email format
    11. local(part@domain.com - Error: Invalid email format
    12. local)part@domain.com - Error: Invalid email format
    13. localart@domain.com - Error: Invalid email format
    14. local;part@domain.com - Error: Invalid email format
    15. local<part@domain.com - Error: Invalid email format
    16. local>part@domain.com - Error: Invalid email format
    17. local@part@domain.com - Error: Invalid email format
    18. local[part@domain.com - Error: Invalid email format
    19. local\part@domain.com - Error: Invalid email format
    20. local]part@domain.com - Error: Invalid email format
    21. "(), :\";<>@[\\]"@domain.com - Accepted

    When I tried the first requirement (64 characters in the "local-part" I found that it accepts even 256 characters. Where can we found the correct data and will be this question given on interview?
    Last edited by KIN; 03-12-2013, 04:33 PM.

  • #2
    How can students be sure that everything above is correct?
    Was it checked by moderators?
    Can students use it as a guru hint while getting ready for session 7?

    Thanks to the moderator\school employee who'll be willing to answer)

    Comment


    • #3
      Originally posted by The Luggage View Post
      How can students be sure that everything above is correct?
      Was it checked by moderators?
      Can students use it as a guru hint while getting ready for session 7?

      Thanks to the moderator\school employee who'll be willing to answer)
      You follow requirements if given, if not you use your common sense to test.
      Everything that is from Wiki you check. Sometimes you find it useful, sometimes not. You already know something about Software Testing, I think you can already see which of those examples are good.

      Comment


      • #4
        Originally posted by Kristina Dzyuba View Post
        You follow requirements if given, if not you use your common sense to test.
        Everything that is from Wiki you check. Sometimes you find it useful, sometimes not. You already know something about Software Testing, I think you can already see which of those examples are good.
        Thank you for your answer!

        I do understand we are supposed to make certain researches on our own and assume requirements for test cases according to our common sense, knowledge and experience)

        But as far as we are still students knowing not much about the subject yet we need some guru guidance and monitoring)

        Wiki says ALL characters are valid for e-mail address (though some valid with restrictions), Mikhail said special characters are not accepted by the email field as a class excluding some exceptions. What to test then? ALL characters? Only @ . _ - ? What about internationalization?

        Can't find any video by Mikhail, analyzing test cases for e-mail address(((

        Comment


        • #5
          Originally posted by The Luggage View Post
          Can't find any video by Mikhail, analyzing test cases for e-mail address(((
          Some tips regarding email field testing can be found in pre-recorded webinars for Sessions 9 and 10 (just inform in case anyone else is also interested)
          Last edited by The Luggage; 03-01-2016, 02:01 PM. Reason: Non limitum perfectiae

          Comment


          • #6
            Example e-mail: local@domain.com

            Requirements for e-mail field :
            Syntax
            The format of email addresses is local-part@domain-part where the local part may be up to 64 characters long and the domain part may have a maximum of 255 characters[]—but the maximum of 256-character length of a forward or reverse path restricts the entire email address to be no more than 254 characters long.
            Local part
            "Local-part" allows 64 character with the total email length of 254 characters.
            The local part of the email address may use any of these ASCII characters:
            - uppercase and lowercase Latin letters A to Z and a to z;
            - digits 0 to 9;
            - special characters !#$%&'*+-/=?^_`{|}~;
            - dot ., provided that it is not the first or last character, and provided also that it does not appear consecutively (e.g. John..Doe@example.com is not allowed);
            - space and "(),:;<>@[\] characters are allowed with restrictions (they are only allowed inside a quoted string, as described in the paragraph below, and in addition, a backslash or double-quote must be preceded by a backslash);
            - comments are allowed with parentheses at either end of the local part; e.g. john.smith(comment)@example.com and (comment)john.smith@example.com are both equivalent to john.smith@example.com.
            In addition to the above ASCII characters, international characters above U+007F, encoded as UTF-8, are permitted by RFC 6531, though mail systems may restrict which characters to use when assigning local parts.
            A quoted string may exist as a dot separated entity within the local part, or it may exist when the outermost quotes are the outermost characters of the local part (e.g., abc."defghi".xyz@example.com or "abcdefghixyz"@example.com are allowed. Conversely, abc"defghi"xyz@example.com is not; neither is abc\"def\"ghi@example.com). Quoted strings and characters however, are not commonly used. RFC 5321 also warns that "a host that expects to receive mail SHOULD avoid defining mailboxes where the Local-part requires (or uses) the Quoted-string form".
            The local-part postmaster is treated specially—it is case-insensitive, and should be forwarded to the domain email administrator. Technically all other local parts are case-sensitive, therefore jsmith@example.com and JSmith@example.com specify different mailboxes; however, many organizations treat uppercase and lowercase letters as equivalent.
            Despite the wide range of special characters which are technically valid; organisations, mail services, mail servers and mail clients in practice often do not accept all of them. For example, Windows Live Hotmail only allows creation of email addresses using alphanumerics, dot (.), underscore (_) and hyphen (-).[5] Common advice is to avoid using some special characters to avoid the risk of rejected emails.[6]
            Domain part:
            The domain name part of an email address has to conform to strict guidelines: it must match the requirements for a hostname, a list of dot-separated DNS labels, each label being limited to a length of 63 characters and consisting of:[7]
            - uppercase and lowercase Latin letters A to Z and a to z;
            - digits 0 to 9, provided that top-level domain names are not all-numeric;
            - hyphen -, provided that it is not the first or last character.
            This rule is known as the LDH rule (letters, digits, hyphen). In addition, the domain part may be an IP address literal, surrounded by square brackets [], such as jsmith@[192.168.2.1] or jsmith@[IPv6:2001:db8::1], although this is rarely seen except in email spam. Internationalized domain names (which are encoded to comply with the requirements for a hostname) allow for presentation of non-ASCII domain parts. In mail systems compliant with RFC 6531 and RFC 6532 an email address may be encoded as UTF-8, both a local part as well as a domain name.
            Comments are allowed in the domain part as well as in the local part; for example, john.smith@(comment)example.com and john.smith@example.com(comment) are equivalent to john.smith@example.com.

            Test Cases:

            1.valid local/@/valid domain, Accepted
            2.50 characters /@/domain.com, Accepted
            3.64 characters /@/domain.com, Accepted
            4.65 characters /@/domain.com, Rejected (error capacity)
            5.empty local part /@/valid domain”, Rejected (error message)
            6.invalid local part/ @/ valid domain, Rejected (error format)
            7.valid local part/@/invalid domain, Rejected (error format)
            8.65 characters /@/256 characters, Rejected (Error capacity)
            9.valid local part/no @/valid domain, Rejected (error format)

            What kind?

            1. Valid/invalid
            2. Capacity.

            Comment

            Working...
            X