aibdd.auto.csharp.it.handlers.query

Define read-only HTTP GET query handlers for SpecFlow C# integration tests.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guideline defines how to implement and validate read-only API queries in SpecFlow-based C# integration tests using HttpClient obtained from WebApplicationFactory. It ensures consistent GET requests and proper context handling without mutating server state.

Core Features & Use Cases

  • Standardizes the read-only query pattern for endpoints exposed via api.yml paths.
  • Demonstrates how to authenticate requests with JWT, build URLs with path and query parameters, and store the response for verification.
  • Distinguishes query steps from command steps to prevent side effects during testing.

Quick Start

Write a query step that performs a GET against a known endpoint with an Authorization header and stores the response for subsequent verification.

Frequently Asked Questions about aibdd.auto.csharp.it.handlers.query

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

FAQPage Schema
How do I perform read-only API queries in SpecFlow C# integration tests?

To perform read-only API queries, implement a handler that executes HTTP GET requests using HttpClient from WebApplicationFactory, applying JWT authentication and path or query parameters while storing the response for downstream verification.

What is the difference between query and command steps in WebApplicationFactory testing?

Query steps enforce an explicit no-state-change policy by performing HTTP GET requests, whereas command steps allow server mutations. This distinction prevents side effects during integration testing and ensures safe read model delegation.

How do I authenticate HttpClient requests with JWT in C# SpecFlow integration tests?

Authenticate HttpClient requests with JWT in C# SpecFlow tests by adding an Authorization header to your HTTP GET request. The query handler builds the request with this header before sending it to the WebApplicationFactory endpoint.

Does WebApplicationFactory support path and query parameters for API endpoint testing?

WebApplicationFactory supports API endpoint testing with path and query parameters by allowing the query handler to construct URLs dynamically. The handler performs HTTP GET requests against these endpoints and stores the response for validation by downstream handlers.

Why should I separate read-only query steps from command steps in API testing?

Separating read-only query steps from command steps enforces a no-state-change policy during API testing. This prevents unintended side effects, ensuring HTTP GET requests only retrieve data for read model delegation and response verification.