# 화이트박스 테스트, 블랙박스 테스트

## 화이트박스 테스트

* 소스 코드를 알고 있는 상태에서 소스 코드 기반으로 테스트를 설계 및 수행

### 종류

* Base Path Testing - 기본적인 실행 경로를 테스팅
* Control Structure Testing - 논리적 조건, 반복문, 변수의 정의/사용에 맞게 테스트 케이스를 설계

### 커버리지(Coverage)

* 문장 커버리지(Statement Coverage) - 소스 코드의 모든 구문이 한 번 이상 수행되도록 테스트 작성
* 분기 커버리지(Branch Coverage) - 소스 코드의 모든 조건문의 참/거짓인 경우가 한 번 이상 수행되도록 테스트 작성
* 조건 커버리지(Condition Coverage) - 조건문 내 개별 조건식의 참/거짓인 경우가 한 번 이상 수행되도록 테스트 작성
* 분기/조건 커버리지(Branch/Condition Coverage) - 분기 검증과 조건 검증을 모두 만족하도록 작성

## 블랙박스 테스트

* 소스 코드를 모르는 상태에서, `소프트웨어가 수행해야 하는 기능이 잘 동작하는지`를 입증

### 종류

* 동치 분할(Equivalence Partitioning) 테스팅 - 타당한 입력, 타당하지 않은 입력을 균등하게 테스트 케이스로 선정
* 경계값 분석 - 입력 조건의 경계값을 테스트 케이스로 선정
* 원인-효과 그래프 테스팅 - 입력→출력에 미치는 영향을 분석
* 오류 예측 - 과거의 경험, 테스터의 감각으로 테스트
  * 추가적 오류를 발견하기 위한 테스트
* 비교 테스팅 - 테스트할 SW의 여러 가지 버전을 테스트하며 결과를 비교


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yihyuns-gitbook.gitbook.io/today-i-learned/testing/white_box-_black_box.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
