Skip to content

Repository files navigation

LiveDoc

CILicense: MITNode.js.NET

A Living Documentation platform that brings Gherkin-style BDD syntax to modern testing frameworks, enabling executable specifications that serve as living documentation.

📖 Full Documentation → · 🔬 Live Test Results →

Fastest Setup — Point Your AI at One URL

Tell your AI coding assistant:

Read https://livedoc.swedevtools.com/ai/setup.md and configure this repository for LiveDoc. Inspect the project first, ask me one configuration question at a time, and wait for approval before making changes.

No LiveDoc package or skill needs to be installed first. AI project setup guide →

Packages

PackageDescriptionStatus
@swedevtools/livedoc-vitestGherkin BDD syntax for Vitest✅ Active
@swedevtools/livedoc-viewerReal-time web UI for test results✅ Active
livedoc-vscodeVS Code extension with snippets & formatting✅ Active
SweDevTools.LiveDoc.xUnitBDD syntax for xUnit (.NET)✅ Active

@swedevtools/livedoc-schema and @swedevtools/livedoc-server are private workspace packages embedded in the Viewer distribution. They are not published or installed independently.

Quick Start — TypeScript (Vitest)

npm install --save-dev vitest@^4.0.16 @swedevtools/livedoc-vitest
import{feature,scenario,given,when,Thenasthen}from'@swedevtools/livedoc-vitest';feature('Calculator',()=>{scenario('Adding two numbers',()=>{letresult=0;given("I have entered '50' into the calculator",(ctx)=>{result=ctx.step.values[0];});when("I press add and enter '70'",(ctx)=>{result+=ctx.step.values[0];});then("the result should be '120'",(ctx)=>{expect(result).toBe(ctx.step.values[0]);});});});

📖 Vitest Getting Started →

Quick Start — C# (xUnit)

dotnet add package SweDevTools.LiveDoc.xUnit
usingSweDevTools.LiveDoc.xUnit;usingXunit.Abstractions;[Feature("Calculator")]publicclassCalculatorTests:FeatureTest{publicCalculatorTests(ITestOutputHelperoutput):base(output){}[Scenario("Adding two numbers")]publicvoidAddingTwoNumbers(){intresult=0;Given("I have entered '50' into the calculator", ctx =>result=ctx.Values[0]);When("I press add and enter '70'", ctx =>result+=ctx.Values[0]);Then("the result should be '120'", ctx =>Expect(result).ToBe(ctx.Values[0]));}}

📖 xUnit Getting Started →

Features

  • Gherkin Syntax — Write tests using Given/When/Then
  • 📊 Data Tables & Scenario Outlines — Data-driven testing
  • 🎯 Tag Filtering — Include/exclude tests by tags
  • 🖥️ Live Viewer — Real-time web UI for test results (see a live example)
  • 📋 Beautiful Output — Formatted, colored test results in your terminal

License

MIT

About

A Living Documentation platform for BDD (Gherkin) specifications.

Topics

Resources

Stars

9 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages