Kode warisan (asring dudu tes, kode sing angel dirubah) iku tantangan kanggo tes — bisa uga gadhean ketergantungan lan tanpa tes. Nambah tes kanthi aman melu teknik kaya characterization tests, seams kanggo ngputus ketergantungan, lan perbaikan bertahap, nggawe owah-owahan luwih aman.
Tantangan kode warisan
Legacy code is often: untested, tightly coupled, hard to understand, risky to change:
→ no tests → changing it is dangerous (you can't tell if you broke something)
→ hard to test → dependencies are tangled (can't isolate units); not designed for testing
→ a chicken-and-egg problem: to change safely you need tests, but it's hard to test.
