Software Testing Engineering / API & CONTRACT TESTING / TST-024
Service Boundary Suite
Explore concept graphLatihan soal
Real PostgreSQL service-boundary lab
Dengan Docker daemon dan Node/npm, jalankan di repository root:
bash labs/TST-024/verify.shExpected output:
service-boundary-network=internal
transfer-success=persisted-accepted
transfer-timeout=persisted-unknown
bank-requests=2
published-ports=0
production-bank-requests=0
tst024-postgres16=verifiedSkrip menyiapkan PostgreSQL 16, real Node transfer service dan HTTP fake bank pada internal Docker bridge, lalu menjalankan dua transfer. Hasil dicek lewat API GET dan psql langsung, diikuti cleanup otomatis seluruh container dan network.
Batas: tidak memakai Spring MVC, auth bank, ledger atau pembayaran asli. V3 generator tidak dapat menjalankan Docker, maka receipt unit ini ditandai not-executable; tes integrasi terpisah wajib lulus di CI.
Konsep 1 / 3
Run a real HTTP service and PostgreSQL database with a fake external bank on an internal Docker network.
Coba prediksi atau perbaiki
Why not call a real bank API from the automated integration suite?
Kalau jawabanmu berbeda
Kesalahan yang mungkin: Treating a fake in-memory method as an integration with a remote service.
Mengapa tidak bekerja: No network protocol or database driver is exercised.
Coba perbaiki: Run real HTTP and PostgreSQL processes in isolation.
Periksa hasil sendiri
Hasil yang diharapkan: Containers share one internal network and publish no ports.
Kalau berbeda: Inspect Docker network, container aliases and SQL readiness.
Konsep 2 / 3
Prove the real bank stub acknowledgement is committed to PostgreSQL without claiming settlement.
Coba prediksi atau perbaiki
Does a stub ACCEPTED result prove that money has settled?
Kalau jawabanmu berbeda
Kesalahan yang mungkin: Immediately marking accepted transfers COMPLETED.
Mengapa tidak bekerja: The stub did not perform settlement.
Coba perbaiki: Keep transfer PENDING with providerOutcome ACCEPTED.
Periksa hasil sendiri
Hasil yang diharapkan: The DB stores PENDING/ACCEPTED and a bank reference.
Kalau berbeda: Compare API read-back and psql data.
Konsep 3 / 3
Persist UNKNOWN for a provider timeout and prove only one outbound bank attempt.
Coba prediksi atau perbaiki
Can a timed-out bank request safely be marked REJECTED and retried?
Kalau jawabanmu berbeda
Kesalahan yang mungkin: Assuming network timeout means bank rejection.
Mengapa tidak bekerja: Remote work may have occurred before the response was lost.
Coba perbaiki: Persist UNKNOWN and do not blindly retry.
Periksa hasil sendiri
Hasil yang diharapkan: PostgreSQL contains PENDING/ACCEPTED and PENDING/UNKNOWN rows.
Kalau berbeda: Inspect SQL UPDATE and bank call count.
Lima soal service boundary
Jawab tanpa melihat pembahasan dulu. Kamu bisa memperbaiki jawaban dan mencoba lagi. Kuis ini latihan mandiri dan tidak menyimpan skor atau progres.