{
    "timestamp": "2026-10-25T05:09:51+00:00",
    "pass": 46,
    "fail": 0,
    "blocked": 0,
    "results": [
        {
            "id": "TC-MC-01",
            "category": "Multi-Cabang",
            "desc": "Owner melihat semua 4 cabang kos",
            "expected": "HTTP 200, count >= 4",
            "actual": "HTTP 200, count: 4",
            "status": "PASS",
            "notes": "Total Cabang: 4"
        },
        {
            "id": "TC-MC-02",
            "category": "Multi-Cabang",
            "desc": "Admin 1 (penuh) dapat melihat seluruh cabang",
            "expected": "HTTP 200, count >= 4",
            "actual": "HTTP 200, count: 4",
            "status": "PASS",
            "notes": "Cabang Admin 1: 4"
        },
        {
            "id": "TC-MC-03",
            "category": "Multi-Cabang",
            "desc": "Admin 2 hanya melihat cabang 3 & 4 yang diizinkan",
            "expected": "Cabang IDs [3, 4] only",
            "actual": "IDs: [3,4]",
            "status": "PASS",
            "notes": "Cabang ID 1 & 2 tersembunyi"
        },
        {
            "id": "TC-MC-04",
            "category": "Multi-Cabang",
            "desc": "Admin 2 ditolak mencatat pengeluaran di Cabang 1",
            "expected": "HTTP 403 Forbidden",
            "actual": "HTTP 403",
            "status": "PASS",
            "notes": "Pesan: Akses ditolak: Anda tidak memiliki akses ke cabang ini."
        },
        {
            "id": "TC-MC-05",
            "category": "Multi-Cabang",
            "desc": "Admin 2 ditolak konfirmasi pembayaran cabang 1",
            "expected": "HTTP 403 Forbidden",
            "actual": "HTTP 403",
            "status": "PASS",
            "notes": "Validasi cabang ditegakkan"
        },
        {
            "id": "TC-SEC-01",
            "category": "Security",
            "desc": "Login berhasil dengan kredensial sah",
            "expected": "HTTP 200 & status success",
            "actual": "HTTP 200",
            "status": "PASS",
            "notes": "Role: -"
        },
        {
            "id": "TC-SEC-02",
            "category": "Security",
            "desc": "Login gagal dengan password salah",
            "expected": "HTTP 401 Unauthorized",
            "actual": "HTTP 401",
            "status": "PASS",
            "notes": "Akses ditolak"
        },
        {
            "id": "TC-SEC-03",
            "category": "Security",
            "desc": "Request tanpa Authorization header ditolak",
            "expected": "HTTP 401 Unauthorized",
            "actual": "HTTP 401",
            "status": "PASS",
            "notes": "Token missing guard aktif"
        },
        {
            "id": "TC-SEC-04",
            "category": "Security",
            "desc": "Request dengan token palsu\/invalid ditolak",
            "expected": "HTTP 401 Unauthorized",
            "actual": "HTTP 401",
            "status": "PASS",
            "notes": "JWT verification aktif"
        },
        {
            "id": "TC-SEC-05",
            "category": "Security",
            "desc": "Admin 1 (can_view_reports=1) diizinkan akses laporan",
            "expected": "HTTP 200 OK",
            "actual": "HTTP 200",
            "status": "PASS",
            "notes": "Akses laporan disetujui"
        },
        {
            "id": "TC-SEC-06",
            "category": "Security",
            "desc": "Admin 2 (can_view_reports=0) diblokir akses profit_loss",
            "expected": "HTTP 403 Forbidden",
            "actual": "HTTP 403",
            "status": "PASS",
            "notes": "Pesan: Akses ditolak: Akun Administrator Anda tidak memiliki izin untuk mengakses laporan\/fitur ini. Hubungi Owner."
        },
        {
            "id": "TC-SEC-07",
            "category": "Security",
            "desc": "Admin 2 diblokir akses financial_summary",
            "expected": "HTTP 403 Forbidden",
            "actual": "HTTP 403",
            "status": "PASS",
            "notes": "Omzet terlindungi"
        },
        {
            "id": "TC-SEC-08",
            "category": "Security",
            "desc": "Admin 2 diblokir akses branch_comparison",
            "expected": "HTTP 403 Forbidden",
            "actual": "HTTP 403",
            "status": "PASS",
            "notes": "Data konsolidasi terlindungi"
        },
        {
            "id": "TC-SEC-09",
            "category": "Security",
            "desc": "Admin dilarang membuka kelola admin (Owner Only)",
            "expected": "HTTP 403 Forbidden",
            "actual": "HTTP 403",
            "status": "PASS",
            "notes": "Privilege escalation dicegah"
        },
        {
            "id": "TC-SEC-10",
            "category": "Security",
            "desc": "Admin dilarang mengubah permission sendiri lewat API",
            "expected": "HTTP 403 Forbidden",
            "actual": "HTTP 403",
            "status": "PASS",
            "notes": "Self-promotion di-block"
        },
        {
            "id": "TC-COA-01",
            "category": "COA",
            "desc": "Mengambil daftar akun COA standar",
            "expected": "HTTP 200 & count >= 16",
            "actual": "HTTP 200, count: 16",
            "status": "PASS",
            "notes": "Akun standar lengkap"
        },
        {
            "id": "TC-COA-02",
            "category": "COA",
            "desc": "Menambahkan akun COA baru berhasil",
            "expected": "HTTP 200 & status success",
            "actual": "HTTP 200",
            "status": "PASS",
            "notes": "ID: 21"
        },
        {
            "id": "TC-COA-03",
            "category": "COA",
            "desc": "Mencegah duplikasi kode akun COA",
            "expected": "HTTP 409 Conflict \/ 400 Bad Request",
            "actual": "HTTP 409",
            "status": "PASS",
            "notes": "Pesan: Kode Akun 'TEST-5999' sudah terdaftar. Gunakan kode lain."
        },
        {
            "id": "TC-COA-04",
            "category": "COA",
            "desc": "Menolak input kode\/nama akun kosong",
            "expected": "HTTP 400 Bad Request",
            "actual": "HTTP 400",
            "status": "PASS",
            "notes": "Validasi form aktif"
        },
        {
            "id": "TC-PAY-01",
            "category": "Pembayaran",
            "desc": "Mencatat pembayaran tagihan ke Bank BCA",
            "expected": "HTTP 200 & status paid",
            "actual": "HTTP 200, Status: paid",
            "status": "PASS",
            "notes": "Tercatat ke Bank BCA"
        },
        {
            "id": "TC-PAY-02",
            "category": "Pembayaran",
            "desc": "Menolak konfirmasi pembayaran tanpa invoice_id",
            "expected": "HTTP 400 Bad Request",
            "actual": "HTTP 400",
            "status": "PASS",
            "notes": "Validasi invoice_id aktif"
        },
        {
            "id": "TC-PAY-03",
            "category": "Pembayaran",
            "desc": "Pelunasan tagihan via Kas Tunai (cash)",
            "expected": "Invoice status: paid & method cash",
            "actual": "Status: paid",
            "status": "PASS",
            "notes": "Tercatat ke Kas Tunai"
        },
        {
            "id": "TC-PAY-04",
            "category": "Pembayaran",
            "desc": "Idempotensi pembayaran: tagihan lunas ditolak dari konfirmasi ulang",
            "expected": "HTTP 400 Bad Request & sudah lunas",
            "actual": "HTTP 400, Msg: Tagihan ini sudah berstatus lunas, tidak dapat dibayar ulang.",
            "status": "PASS",
            "notes": "Pembayaran ganda dicegah"
        },
        {
            "id": "TC-EXP-01",
            "category": "Pengeluaran",
            "desc": "Catat Beban Listrik Rp150.000 via BCA di Cabang 1",
            "expected": "HTTP 200 & success",
            "actual": "HTTP 200",
            "status": "PASS",
            "notes": "ID: 19"
        },
        {
            "id": "TC-EXP-02",
            "category": "Pengeluaran",
            "desc": "Catat Beban Air Rp100.000 via Kas Tunai di Cabang 1",
            "expected": "HTTP 200 & success",
            "actual": "HTTP 200",
            "status": "PASS",
            "notes": "ID: 20"
        },
        {
            "id": "TC-EXP-03",
            "category": "Pengeluaran",
            "desc": "Catat Beban Operasional Rp250.000 di Cabang 2",
            "expected": "HTTP 200 & success",
            "actual": "HTTP 200",
            "status": "PASS",
            "notes": "ID: 21"
        },
        {
            "id": "TC-EXP-04",
            "category": "Pengeluaran",
            "desc": "Menolak pengeluaran nominal negatif",
            "expected": "HTTP 400 Bad Request",
            "actual": "HTTP 400",
            "status": "PASS",
            "notes": "Validasi nominal positif aktif"
        },
        {
            "id": "TC-EXP-05",
            "category": "Pengeluaran",
            "desc": "Menolak pengeluaran tanpa deskripsi\/judul",
            "expected": "HTTP 400 Bad Request",
            "actual": "HTTP 400",
            "status": "PASS",
            "notes": "Validasi field wajib aktif"
        },
        {
            "id": "TC-BNK-01",
            "category": "Bank",
            "desc": "Mengambil daftar rekening bank & ringkasan kas",
            "expected": "HTTP 200 & banks >= 3",
            "actual": "HTTP 200, count: 3",
            "status": "PASS",
            "notes": "Kas balance: 400000"
        },
        {
            "id": "TC-BNK-02",
            "category": "Bank",
            "desc": "Menambahkan rekening bank baru (BNI)",
            "expected": "HTTP 200 & status success",
            "actual": "HTTP 200",
            "status": "PASS",
            "notes": "ID Bank: 9"
        },
        {
            "id": "TC-BNK-03",
            "category": "Bank",
            "desc": "Melihat riwayat mutasi debit\/kredit Bank BCA",
            "expected": "HTTP 200 & mutasi terambil",
            "actual": "HTTP 200, total: 2",
            "status": "PASS",
            "notes": "Mutasi BCA valid"
        },
        {
            "id": "TC-REC-01",
            "category": "Rekonsiliasi",
            "desc": "Mengambil transaksi & saldo buku berjalan untuk BCA",
            "expected": "HTTP 200 & book balance calculated",
            "actual": "HTTP 200, Saldo: 5850000",
            "status": "PASS",
            "notes": "Saldo Buku Aplikasi: Rp 5.850.000"
        },
        {
            "id": "TC-REC-02",
            "category": "Rekonsiliasi",
            "desc": "Menyimpan rekonsiliasi dengan selisih -Rp50.000",
            "expected": "HTTP 200 & status success",
            "actual": "HTTP 200",
            "status": "PASS",
            "notes": "ID Rekonsiliasi: 12"
        },
        {
            "id": "TC-REC-03",
            "category": "Rekonsiliasi",
            "desc": "Membuka riwayat rekonsiliasi lampau",
            "expected": "Data rekonsiliasi tersimpan ditemukan",
            "actual": "Ditemukan",
            "status": "PASS",
            "notes": "Histori rekonsiliasi konsisten"
        },
        {
            "id": "TC-AST-01",
            "category": "Aset Tetap",
            "desc": "Tambah AC Rp12jt, masa manfaat 60 bln, penyusutan Rp200rb\/bln",
            "expected": "monthly_depreciation == 200000",
            "actual": "Hasil: 200000",
            "status": "PASS",
            "notes": "Depresiasi: Rp 200.000 \/ bulan"
        },
        {
            "id": "TC-AST-02",
            "category": "Aset Tetap",
            "desc": "Menolak nilai residu lebih besar dari harga perolehan",
            "expected": "HTTP 400 Bad Request",
            "actual": "HTTP 400",
            "status": "PASS",
            "notes": "Pesan: Nilai residu tidak boleh lebih besar daripada harga perolehan."
        },
        {
            "id": "TC-AST-03",
            "category": "Aset Tetap",
            "desc": "Menolak umur manfaat aset 0 atau negatif",
            "expected": "HTTP 400 Bad Request",
            "actual": "HTTP 400",
            "status": "PASS",
            "notes": "Pesan: Nama Aset, Cabang, Tanggal Perolehan, Harga Perolehan, dan Umur Manfaat wajib diisi."
        },
        {
            "id": "TC-AST-04",
            "category": "Aset Tetap",
            "desc": "Verifikasi daftar aset & nilai buku saat ini di Cabang 1",
            "expected": "Asset found & current book value valid",
            "actual": "Ditemukan",
            "status": "PASS",
            "notes": "Aset ID: 10 tercatat"
        },
        {
            "id": "TC-REP-01",
            "category": "Laporan",
            "desc": "Laporan Laba Rugi Cabang 1: Revenue - Expense = Net Profit",
            "expected": "net_profit == revenue - expense",
            "actual": "Net: 1250000, Calc: 1250000",
            "status": "PASS",
            "notes": "Rev: 1500000, Exp: 250000, Net: 1250000"
        },
        {
            "id": "TC-REP-02",
            "category": "Laporan",
            "desc": "Ringkasan posisi kas & total likuiditas rekening bank",
            "expected": "HTTP 200 & liquid assets calculated",
            "actual": "Total Liquid: Rp 12.000.000",
            "status": "PASS",
            "notes": "Likuiditas: Rp 12.000.000"
        },
        {
            "id": "TC-REP-03",
            "category": "Laporan",
            "desc": "Laporan Komparasi & Konsolidasi Keuangan 4 Cabang",
            "expected": "HTTP 200 & 4 branches compared",
            "actual": "Branches count: 4",
            "status": "PASS",
            "notes": "Konsolidasi 4 cabang lengkap"
        },
        {
            "id": "TC-REG-01",
            "category": "Regresi",
            "desc": "Endpoint kamar existing (rooms\/get_all.php) berfungsi",
            "expected": "HTTP 200 OK",
            "actual": "HTTP 200",
            "status": "PASS",
            "notes": "Kamar terbaca normal"
        },
        {
            "id": "TC-REG-02",
            "category": "Regresi",
            "desc": "Endpoint penghuni aktif (tenants\/get_active.php) berfungsi",
            "expected": "HTTP 200 OK",
            "actual": "HTTP 200",
            "status": "PASS",
            "notes": "Penghuni terbaca normal"
        },
        {
            "id": "TC-REG-03",
            "category": "Regresi",
            "desc": "Endpoint dashboard (dashboard\/owner_summary.php) berfungsi",
            "expected": "HTTP 200 OK",
            "actual": "HTTP 200",
            "status": "PASS",
            "notes": "Metrik dashboard operasional normal"
        },
        {
            "id": "TC-REG-04",
            "category": "Regresi",
            "desc": "Endpoint riwayat transaksi (transactions\/get_history.php) berfungsi",
            "expected": "HTTP 200 OK",
            "actual": "HTTP 200",
            "status": "PASS",
            "notes": "Riwayat transaksi normal"
        },
        {
            "id": "TC-REG-05",
            "category": "Regresi",
            "desc": "Endpoint properti (properties\/get_properties.php) berfungsi",
            "expected": "HTTP 200 OK",
            "actual": "HTTP 200",
            "status": "PASS",
            "notes": "Kelola kos normal"
        }
    ]
}