Test-Driven Development

Pengertian dari TDD

Alur penerapan TDD

TDD Cycle — source: Slide PPW materi Test-Driven Development Fakultas Ilmu Komputer UI

Tujuan dan Manfaat menggunakan TDD

Programming is like exploring a dark house. You go from room to room to room. Writing the test is like turning on the light. Then you can avoid the furniture and save your shins (the clean design resulting from refactoring). Then you’re ready to explore the next room”

— Kent Beck, pembuat extreme programming

Contoh Implementasi dari TDD

salah satu contoh test case
contoh gitlab pipeline pada tahap RED
url routing yang akan mengakses fungsi my_profile
fungsi yang akan dipanggil oleh test case, yaitu my_profile
contoh gitlab pipeline pada tahap GREEN
fungsi my_profile yang telah dilakukan refactor
contoh pipeline-pipeline hasil proses TDD

Kekurangan dalam menggunakan TDD



Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store