Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Test HTTP command error responses through real endpoints

Aperta
#605 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 7 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
58/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
api, testing

Direzione di ricerca

Start with ResultExtensions.cs and the existing ASP.NET Core test application; trace the separate minimal-API and controller command mappings. Add hosted HTTP tests for each listed command outcome, then run the affected endpoint tests and collect focused coverage. Done means both mappings assert status, response body, and problem-details content type without checking full stack traces.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

The HTTP result-mapping code has approximately 24% line coverage in the October 5, 2026 .NET 10 coverage run. Most error-response paths are untested. These paths define the status codes and problem-details bodies that API clients rely on. You can view a test coverage report I generated here: index.html

Source: ResultExtensions.cs.

Proposed tests

Send HTTP requests to test endpoints backed by command services that produce each outcome:

Command outcome Expected response
Success HTTP 200 with the expected result body
Domain validation failure HTTP 400 with domain validation details
Missing aggregate HTTP 404 with problem details
Optimistic concurrency conflict HTTP 409 with problem details
Unexpected failure HTTP 500 with problem details

Cover both minimal-API and controller command mappings, since they use separate result-conversion paths. Assert the response content type and stable problem-details fields, including domain errors where applicable.

Acceptance criteria

  • Each outcome is exercised through an HTTP request to a hosted test application.
  • Both minimal-API and controller mappings are covered.
  • Assertions verify status codes and response bodies, rather than only whether requests complete.
  • Error responses use the expected problem-details content type and structure.
  • Tests avoid brittle comparisons of full exception stack traces.
  • No direct tests of ResultExtensions, external database, or Docker container are required.

Validation

Extend the existing ASP.NET Core test application and run the affected endpoint tests. Collect focused coverage for the HTTP result-mapping paths; do not rerun unrelated provider suites.

Lingua principale
C#
Stelle
512
Fork
99
Merge medio
5g 6h
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Eventuous/eventuous

Tutte le issue di Eventuous/eventuous

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.