시나리오 개요와 데이터 표
시나리오 개요, 예제 표, 인라인 데이터 표를 사용하여 하나의 Gherkin 시나리오를 여러 데이터 집합으로 실행하세요.
시나리오 개요와 데이터 표은(는) CoddyKit의 무료 Testing Mastery: JUnit, Mockito & Integration Tests 강의입니다. 이것은 4개 중 4번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Testing Mastery: JUnit, Mockito & Integration Tests 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Testing Mastery: JUnit, Mockito & Integration Tests 강의에는 총 4개의 강의가 포함되어 있습니다.
이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.
Repeating Scenarios
Often you want to run the same behavior with different inputs. Copy-pasting a scenario per case is wasteful. Gherkin's Scenario Outline parameterizes one scenario over many examples.
Placeholders with Angle Brackets
In a Scenario Outline, values are placeholders written in angle brackets, filled in from an Examples table.
Scenario Outline: add numbers
Given I enter <a> and <b>
When I add them
Then the result is <sum>The Examples Table
The Examples keyword introduces a table of rows. Each row runs the outline once with those values.
Examples:
| a | b | sum |
| 2 | 3 | 5 |
| 0 | 0 | 0 |
| 5 | 7 | 12 |How It Expands
Cucumber expands the outline into one concrete scenario per Examples row, substituting the placeholders. Three rows means three test runs.
Step Definition Receives Values
The step definition uses capture groups, and each expanded row supplies its values.
@Given("I enter {int} and {int}")
public void enter(int a, int b) {
this.a = a; this.b = b;
}Data Tables vs Outlines
An Examples table multiplies the scenario. A data table passes a structured argument to a single step.
Given the following users
| name | role |
| Ada | admin |
| Bob | guest |Consuming a Data Table
The step receives the table, which you can convert into a list of maps or domain objects.
@Given("the following users")
public void users(DataTable table) {
List<Map<String,String>> rows =
table.asMaps();
}Choosing the Right Tool
Use a Scenario Outline when the whole flow repeats with varied inputs. Use a data table when one step needs a collection of structured data.
Keeping Examples Readable
Name columns clearly and keep each Examples table focused. Large unfocused tables hide which behavior you are actually specifying.
Multiple Examples Blocks
You can have several Examples blocks under one outline, each with a tag or comment, to group happy-path and edge cases.
Why It Matters
Parameterized scenarios keep features concise and make boundary testing explicit and reviewable by non-developers.
Quick Check
What does each row of an Examples table produce?
Recap
You learned data-driven Gherkin:
- Scenario Outline uses
<placeholders>and an Examples table - Each row runs the scenario once
- Data tables pass structured data to a single step
- Pick outlines for repeated flows, data tables for collections
자주 묻는 질문
“시나리오 개요와 데이터 표” 강의는 무료인가요?
네 — “시나리오 개요와 데이터 표” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Testing Mastery: JUnit, Mockito & Integration Tests 강의 전체를 잠금 해제할 수 있습니다. Testing Mastery: JUnit, Mockito & Integration Tests 강의에는 총 4개의 강의가 포함되어 있습니다.
“시나리오 개요와 데이터 표”에서 뭘 배우나요?
시나리오 개요, 예제 표, 인라인 데이터 표를 사용하여 하나의 Gherkin 시나리오를 여러 데이터 집합으로 실행하세요. 브라우저에서 직접 실행하는 실습 코드로 Testing Mastery: JUnit, Mockito & Integration Tests을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.
Testing Mastery: JUnit, Mockito & Integration Tests을(를) 시작하는 데 경험이 필요한가요?
사전 경험은 필요하지 않습니다. CoddyKit의 Testing Mastery: JUnit, Mockito & Integration Tests은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 4번째 강의입니다.
“시나리오 개요와 데이터 표” 강의는 얼마나 걸리나요?
대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.
이 Testing Mastery: JUnit, Mockito & Integration Tests 강의에서 코드를 작성하고 실행할 수 있나요?
네. 모든 Testing Mastery: JUnit, Mockito & Integration Tests 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.
이 강의의 모든 강의
- BDD 소개
- Gherkin 구문과 기능
- 단계 정의 구현
- 시나리오 개요와 데이터 표