0Pricing
Testing Mastery: JUnit, Mockito & Integration Tests · Ders

Senaryo Taslakları ve Veri Tabloları

Scenario Outlines, Examples tabloları ve satır içi veri tablolarını kullanarak tek bir Gherkin senaryosunu birden çok veri kümesiyle çalıştırın.

Senaryo Taslakları ve Veri Tabloları, CoddyKit'te ücretsiz bir Testing Mastery: JUnit, Mockito & Integration Tests dersidir. Bu, 4 dersinin 4. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, Testing Mastery: JUnit, Mockito & Integration Tests öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. Testing Mastery: JUnit, Mockito & Integration Tests kursu toplamda 4 dersten oluşur.

Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.

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

Sıkça Sorulan Sorular

“Senaryo Taslakları ve Veri Tabloları” dersi ücretsiz mi?

Evet — “Senaryo Taslakları ve Veri Tabloları” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve Testing Mastery: JUnit, Mockito & Integration Tests kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. Testing Mastery: JUnit, Mockito & Integration Tests kursu toplamda 4 dersten oluşur.

“Senaryo Taslakları ve Veri Tabloları” dersinde ne öğreneceğim?

Scenario Outlines, Examples tabloları ve satır içi veri tablolarını kullanarak tek bir Gherkin senaryosunu birden çok veri kümesiyle çalıştırın. Testing Mastery: JUnit, Mockito & Integration Tests ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.

Testing Mastery: JUnit, Mockito & Integration Tests öğrenmeye başlamak için deneyim gerekli mi?

Önceden deneyim gerekmez. CoddyKit'te Testing Mastery: JUnit, Mockito & Integration Tests, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 4. dersidir.

“Senaryo Taslakları ve Veri Tabloları” dersi ne kadar sürer?

Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.

Bu Testing Mastery: JUnit, Mockito & Integration Tests dersinde kod yazıp çalıştırabilir miyim?

Evet. Her Testing Mastery: JUnit, Mockito & Integration Tests dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.

Bu kursun tüm dersleri

  1. BDD’ye Giriş
  2. Gherkin Sözdizimi ve Özellikler
  3. Adım Tanımlarını Uygulama
  4. Senaryo Taslakları ve Veri Tabloları
← Testing Mastery: JUnit, Mockito & Integration Tests Sayfasına Dön