---
# System prepended metadata

title: Equivalence partitioning
tags: [ISTQB, SQA, Software Testing, Black Box Testing Tech]

---

# Equivalence partitioning

###### tags: `Black Box Testing Tech` `ISTQB` `Software Testing` `SQA`

- Chunck values into groups of similar attributes or effections.
- Every value inside the partition is exactly equivalent to any other value **as far as our program is concerned**. In other words, all the values in an equivalence partition are handled in exactly the same way by a given program.
- It often suits us **to treat zero as a special case** for testing where ranges of numbers are involved.
- **To reduce the number of test cases** we need to write cause we need **only test one of them as a representative of the partition**.
- According to source of values to be chuncked, there are: 
    - Input partitions
        - For exaples, the program accepts any value between −10,000 and +10,000. If we imagine a program that seperate numbers into >0, =0 and <0. So if the computer accepts −2,905 as a valid negative integer we would expect it also to accept −3. Similarly, if it accepts 100 it should also accept 2,345 as a positive integer.
    - Output partitions
        - Use test cases that generate each of outputs as an alternative to generating input partitions.
    - Other partitions
        - For example, if a program handles input requests by placing them on one of a number of queues we could, in principle, check that requests end up on the right queue. 
        - In this case a stream of inputs( of a test case) can be partitioned according to the queue we anticipate it will be placed into. 
- According if the values are valid or not, there are:
    - valid equivalence partitions
    - non-valid equivalence partitions
        - There will be many other possible non-valid input partitions, so we may have **to limit the test cases to the ones that are most likely to crop up in a real situation**.