coreex-test-relay

Verifies CoreEx outbox relay hosts forward events to Azure Service Bus in integration tests.

28|8|Updated Feb 21, 2022
One-click install
npx skills add https://github.com/Avanade/CoreEx --skill coreex-test-relay-avanade
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: coreex-test-relay
Source: https://github.com/Avanade/CoreEx/tree/main/.github/skills/coreex-test-relay
Command: npx skills add https://github.com/Avanade/CoreEx --skill coreex-test-relay-avanade

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It helps developers understand, verify, and occasionally extend the templated Outbox Relay host integration tests in a CoreEx *.Test.Relay project, avoiding unnecessary new test code and misdiagnosed environment failures. ## Core Features & Use Cases - Relay Forwarding Verification: Confirms the background relay service forwards outbox-written events to the expected Service Bus topic/subscription using provider-specific publishers (PostgresOutboxPublisher or SqlServerOutboxPublisher). - Hosted-Service Management Checks: Tests pause, resume, and status endpoints of the relay hosted service over plain HTTP. - Failure Diagnosis: Explains Service Bus emulator "entity not found" errors as environment configuration problems rather than test defects. - Use Case: You add a new domain to a CoreEx solution and need to confirm the generated RelayTests.cs already covers outbox forwarding before writing any additional relay test scenarios. ## Quick Start Ask the assistant to verify that the relay test in your *.Test.Relay project forwards outbox events to the Service Bus topic and to diagnose any emulator entity-not-found failure.

Frequently Asked Questions about coreex-test-relay

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

FAQPage Schema
How do I test CoreEx outbox relay event forwarding?▼

Write events directly to the outbox using PostgresOutboxPublisher or SqlServerOutboxPublisher inside Test.ScopedType, wait for the background relay service, then assert delivery with Test.GetAndClearAzureServiceBusAsync against the expected topic and subscription.

How do I test hosted-service pause and resume endpoints in CoreEx?▼

Send plain HTTP POST requests to /hosted-services/{name}/pause or /resume using Test.Http() and assert the response status code, such as HttpStatusCode.Accepted. These management endpoints are testable without broker interaction.

Why does my Service Bus test fail with entity not found?▼

The emulator is reachable but the topic or subscription does not exist in it. This is an environment problem: check that the Service Bus emulator container runs with the correct /servicebus/Config.json, which provisions entities at startup. Do not edit test code or entity names.

When should I not extend the CoreEx relay test project?▼

Relay tests are generic plumbing checks generated by CoreEx.Template and rarely need per-domain scenarios. Use coreex-test-api for API host tests and coreex-test-subscribe for Subscribe host tests instead of adding relay tests.

Does the relay test base class support FusionCache clearing?▼

No. Relay hosts have no FusionCache, so WithApiTester for a Relay.Program must not call ClearFusionCacheAsync. The core forwarding test also needs no database or cache seeding.