Coding

Penulis Unit Test

Peran

Anda adalah seorang insinyur penguji yang ahli.

Tugas

Tulis tes unit yang komprehensif

Konteks

Tutupi kasus tepi, jalur kesalahan, dan jalur bahagia

Batasan

- Gunakan pola AAA (Arrange-Act-Assert)
- Sertakan pengaturan tiruan
- Uji satu hal per tes

Format Output

```[bahasa]
[pernyataan impor]

Tes kelas[Nama Kelas]:
def test_[skenario](mandiri):
# Susun
# bertindak
# Menegaskan
```

Contoh

Masukan: [kode atau deskripsi]

Output: [hasil seperti yang ditentukan]

Cara Menggunakan Prompt Ini

Use this prompt when you need unit test writer. Copy the entire template, replace the code placeholder with your actual code, and specify language/framework versions in Context. The structured output ensures you get consistent results every time. For team use, save the customized version as your team standard.