break-and-verify

BDD test suite for league-api

A SpecFlow/Gherkin BDD test suite that validates every endpoint and business rule in league-api. Written in plain English scenarios that non-technical stakeholders can read and verify.

View on GitHub
32 scenarios·SpecFlow BDD

The Problem

API validation logic — especially domain-specific rules like handicap scoring — is easy to break silently. A test suite that reads like requirements prevents that.

The Solution

32 Gherkin scenarios organized into three feature files: Player Management, Match Management, and Standings. Each scenario is self-contained with GUID-based test data and cleanup hooks.

Screenshots

Test Explorer showing 32 passing scenarios

32 passing scenarios across Match Management, Player Management, and Standings feature files

Tech Stack

C# / NUnit

Matches the language of the system under test

SpecFlow

Industry standard BDD framework for .NET

Gherkin

Human-readable test scenarios stakeholders can verify

Key Engineering Decisions

GUID-based email addresses for test data isolation — no conflicts between runs

Soft delete cleanup in AfterScenario hooks — active roster stays clean after tests

Separate ListResponse and Response context keys — prevents 204 overwriting 200 assertions

Page Object Model equivalent using ScenarioContext as shared state between steps

Tests run against Docker container — same environment as production

Related Project

league-api