Tecnologia & Testing Più dettagli B · Guida ufficiale Piattaforma: Generale

Contract Testing

Test del contratto

Il test del contratto verifica se due sistemi che possono essere distribuiti separatamente scambiano ancora messaggi nel formato concordato.

Vedi come funziona
Potresti chiamarlo Contract TestingTest del contratto

Vedi come funziona

Esempio originale svoltoTest del contratto

Un altro esempio

Un client si aspetta che GET /profiles/42 restituisca determinati campi e uno stato. L'integrazione continua (CI) verifica che il provider mantenga questa promessa. Il test non dimostra l'intero percorso né la qualità dei dati live.

Parti principali

  1. 01contratto del consumatore
  2. 02verifica del fornitore
  3. 03risultato di compatibilità

Usalo quando

Usa questo termine quando i servizi vengono distribuiti autonomamente e la compatibilità dei messaggi deve essere verificata senza l'intero sistema.

Non usarlo quando

Non copiare il codice privato del fornitore nel contratto o usare questo test al posto della verifica della sicurezza dell'API.

Nome usato nel codice

consumer expectation ↔ provider verification

Prima di spedire

Check the environment and prepared test data (fixture). Define a result you can observe, failure and edge cases, isolation, stable inputs, useful error details, and cleanup. Set a time budget, owner, and flaky-test rule.

Puoi copiare la richiesta

Outcome: Complete the task with Test del contratto (Contract Testing). User context: Un client si aspetta che GET /profiles/42 restituisca determinati campi e uno stato. L'integrazione continua (CI) verifica che il provider mantenga questa promessa. Il test non dimostra l'intero percorso né la qualità dei dati live. Validation approach: Test del contratto (Contract Testing). Why it fits: Usa questo termine quando i servizi vengono distribuiti autonomamente e la compatibilità dei messaggi deve essere verificata senza l'intero sistema. Do not use it when: Non copiare il codice privato del fornitore nel contratto o usare questo test al posto della verifica della sicurezza dell'API. Test requirements: Name the system and test environment. Define prepared test data, other inputs, and the result you can observe. Include failure and edge cases, allowed error, isolation, and cleanup. Test operations: Make failures easy to diagnose. Control random or changing inputs. Name an owner. Keep the test fast and simple enough for its release gate. Acceptance criteria: The test fails for the known bug and passes after the fix. It repeats in the target environment, gives useful evidence, and does not expose or change unrelated data. Evidence and limits (evidence boundary): È ufficiale per quella fonte. Altre piattaforme o team potrebbero usare il termine in modo diverso. Unknowns to confirm: Release gate, environment, prepared test data, allowed error, time budget, owner, and flaky-test rule.

Controlla questa richiesta

Review how Test del contratto (Contract Testing) is used now. Definition: Il test del contratto verifica se due sistemi che possono essere distribuiti separatamente scambiano ancora messaggi nel formato concordato. Release checks: Check the environment and prepared test data (fixture). Define a result you can observe, failure and edge cases, isolation, stable inputs, useful error details, and cleanup. Set a time budget, owner, and flaky-test rule. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.

B
Quanto è ufficiale questo termine?

Guida ufficiale

La piattaforma, il framework, il progetto o il gruppo di esperti nominato ha una guida ufficiale per questo termine.

È ufficiale per quella fonte. Altre piattaforme o team potrebbero usare il termine in modo diverso.

Ambito
Solo ciò che la sorgente copre:nome canonico、definizione、API della piattaforma、implementazione、guida all'uso
stato del documento
stabile
Selezionato attivato
2026-07-30

Fonti e ambito delle prove

Fonte dell'autorità + Riferimento del termine · Pact · stabile Pact Documentation Ambito: nome canonico、definizione、API della piattaforma、implementazione、guida all'uso Ruolo qui: Riferimento diretto al termine La fonte copre: nome canonico, definizione, API della piattaforma, implementazione, guida all'uso

Copia tu stesso

Il browser non è riuscito a copiare questo. Seleziona la richiesta qui sotto e copiala tu stesso.