Is there any way to use equivalence partitioning to write test cases for achieving coverage for testing an alphabet(English alphabet for example)?

Mostly when we speak about EP the first thing that comes to mind is numbers, but in real life, we can have names, car number plates, cities, special characters, etc.

So the idea is how can we achieve coverage by using EP for the alphabet, is there any way? Or this technique is only meant for number input fields and that's all?

1 Answer 1


Short answer is NO.

  • EP is not applicable to specific type of data format like numbers or alphabets/name

  • Equivalence Partitioning :

    1. In this technique, input data units are divided into equivalent partitions that can be used to derive test cases which reduces time required for testing because of small number of test cases.

    2. Each and every condition of particular partition (group) works as same as other.

    3. If a condition in a partition is valid, other conditions are valid too. If a condition in a partition is invalid, other conditions are invalid too.

    4. First thing come into mind for EP is numbers for you is valid because its easy to make partition (group) and numbers are easy to compare

    5. But its not mandatory to use numbers only. You can take car number plates, cities for that matter

    6. Example - For car registration, you can define number plate as <"state_name" "state_code" "actual_number"> i.e. TX 21 3205 (TX for Texas which has state code 21 and valid number with 4 digit)

    7. Car number plate with number "TXG 21 3205" would be invalid. Immediately you can identify because you are well aware this is not from any group or partitioning from US states. They have defined state_name should be mentioned in two alphabets only but it has three

  • 1
    Totally agree with the answer. My short answer is -- for eg alphabet consists of 33 unique characters so covering one will not give you coverage for any other character from the alphabet. I raised this question cause I've been asked during an interview by a well-honored person, even though I answered to question with some ideas and got the offer still left with the state that I don't know exactly, thank you for the answer
    – llRub3Nll
    Commented Feb 2, 2023 at 11:37
  • You did great concluding in interview. All the best for new role :) Commented Feb 2, 2023 at 13:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.