DEV Community

Cover image for Types of Test Cases and Identification
Kenta Takeuchi
Kenta Takeuchi

Posted on • Originally published at bmf-tech.com

Types of Test Cases and Identification

This article was originally published on bmf-tech.com.

Overview

A concise summary of the basic types of test cases and how to identify them.

Purpose of Testing

  • Discover bugs
  • Quality assurance
  • Quality improvement (refactoring)

Types of Tests

  • Unit Test

    • Tests to verify the specifications of methods
    • Targets public methods in the domain layer
  • Integration Test

    • Tests based on use cases (a series of processes)
    • Prioritizes business-critical cases

Identifying Test Cases

  • Normal Cases
    • Check if the expected output is produced for the expected input
  • Abnormal Cases
    • Check if the system can handle unexpected inputs
  • Equivalence Partitioning
    • Divide into equivalence classes... Group test results (divide by criteria, e.g., language, presence of symbols, domain of address, etc.)
    • Select representative values from each equivalence class
  • Boundary Value Analysis
    • Use values that are boundaries between equivalence classes as input

Identifying test cases for unit tests and integration tests should consider the above perspectives, along with business factors such as quality and effort.

Reference

Top comments (0)