aibdd.auto.csharp.it.handlers.readmodel-then

Automates Then-readmodel validation of API responses in SpecFlow-based C# integration tests using FluentAssertions and JsonElement.

1|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/zenbuapps/zenbu-powers --skill aibdd-auto-csharp-it-handlers-readmodel-then
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aibdd.auto.csharp.it.handlers.readmodel-then
Source: https://github.com/zenbuapps/zenbu-powers/tree/main/skills/aibdd.auto.csharp.it.handlers.readmodel-then
Command: npx skills add https://github.com/zenbuapps/zenbu-powers --skill aibdd-auto-csharp-it-handlers-readmodel-then

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Validates API responses in C# integration tests by reusing a stored HTTP response to verify JSON payloads against expected shapes and values.

Core Features & Use Cases

  • Reads the HTTP response stored in the scenario context, handles envelope structures like data/items, and asserts fields with FluentAssertions.
  • Applies to Then-readmodel validations in SpecFlow-based tests to ensure API outputs conform to the defined schema and business rules.
  • Supports end-to-end BDD workflows where queries return data that needs verification without re-issuing requests.

Quick Start

Run the Then steps in your SpecFlow tests to validate the API response against the expected shape.

Frequently Asked Questions about aibdd.auto.csharp.it.handlers.readmodel-then

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate API responses in C# SpecFlow integration tests?

To validate API responses in C# SpecFlow integration tests, you can use Then-readmodel validation steps that extract the stored HTTP response from scenario context, deserialize the JSON payload with JsonElement, and assert expected envelope structures and data values using FluentAssertions.

What is the best way to assert JSON payload fields from an HTTP response without re-issuing requests?

The best way to assert JSON payload fields from an HTTP response without re-issuing requests is by reading the LastResponse stored in the scenario context. This allows you to verify JSON field mappings and business rules directly against the previously captured payload data.

Does this approach support validating envelope structures like data and items in API responses?

Yes, validating envelope structures like data and items in API responses is fully supported. The validation process reads the stored HTTP response and applies assertions to ensure the envelope structures conform to the defined schema and expected data values.

Can I reuse a stored HTTP response for multiple assertions in a BDD workflow?

Yes, you can reuse a stored HTTP response for multiple assertions in a BDD workflow. The mechanism extracts the LastResponse from the test context once, allowing you to run multiple Then-readmodel validation steps to verify different fields and schema shapes.

How do I deserialize JSON for FluentAssertions field validation in C# tests?

To deserialize JSON for FluentAssertions field validation in C# tests, the validation process uses JsonElement to parse the stored HTTP response payload. This allows precise assertions on specific JSON field mappings and envelope structures within SpecFlow integration tests.