Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

software testing

How to perform equivalence class partitioning

Dian Us Suqlain

Software testing involves several testing techniques, including black-box testing.

Equivalence class partitioning (ECP) is a technique which allows us to perform black-box testing in a software product. We can apply ECP to unit testing, integration, system testing, and more.

How to perform ECP

In ECP, we divide the input data into valid and invalid values to check whether or not they exhibit the same behavior.

We divide the input into classes of data that help us derive test cases. This division demonstrates a partition, and each partition equivalates over a class of data.

Let’s observe an example to see how ECP works.

Example

Suppose there is a “search an item” feature on an online store. We can test the behavior of this feature by giving several valid and invalid inputs.

Search an item test case

Valid test case

Suppose we want to search for an item “Laptop.” The expected result is that the test case succeeds and the item is displayed.

Search an item valid test case

Invalid test case

The text box only approves data written in text form. If the user enters data in numeric form, the test case does not succeed and the application gives an error.

Suppose the expected result and actual results are the same. We can then say that the test case has successfully run and the feature is good to go.

Search an item invalid test case

RELATED TAGS

software testing

CONTRIBUTOR

Dian Us Suqlain
Copyright ©2022 Educative, Inc. All rights reserved
RELATED COURSES

View all Courses

Keep Exploring