The Art of Unit Testing with Examples С# (2014). Roy Osherove

One of the biggest failed projects I worked on had unit tests. Or so I thought. I was leading a group of programmers creating a billing application, and we were doing it in a fully test-driven manner—writing the test, then writing the code, seeing the test fail, making the test pass, refactoring, and starting all over again.

ПРИСОЕДИНЯЙТЕСЬ 436 Просмотры
Image

The first few months of the project were great. Things were going well, and we had tests that proved that our code worked. But as time went by, requirements changed. We were forced to change our code to fit those new requirements, and when we did, tests broke and had to be fixed.

The code still worked, but the tests we wrote were so brittle that any little change in our code broke them, even though the code was working fine. It became a daunting task to change code in a class or method because we also had to fix all the related unit tests.

Worse yet, some tests became unusable because the people who wrote them left the project and no one knew how to maintain the tests or what they were testing. The names we gave our unit testing methods weren’t clear enough, and we had tests relying on other tests. We ended up throwing out most of the tests less than six months into the project.
 

The project was a miserable failure because we let the tests we wrote do more harm than good. They took more time to maintain and understand than they saved us in the long run, so we stopped using them. I moved on to other projects, where we did a better job writing our unit tests, and we had some great successes using them, saving huge amounts of debugging and integration time. Since that first failed project, I’ve been compiling best practices for unit tests and using them on subsequent projects. I find a few more best practices with every project I work on.
 

Understanding how to write unit tests—and how to make them maintainable, readable, and trustworthy—is what this book is about, no matter what language or integrated development environment (IDE) you work with. This book covers the basics of writing a unit test, moves on to the basics of interaction testing, and introduces best practices for writing, managing, and maintaining unit tests in the real world.

 

Скачать книгу можно бесплатно по данной ссылке: Скачать


Ваша реакция?

0
LOL
1
LOVED
0
PURE
0
AW
0
FUNNY
0
BAD!
0
EEW
0
OMG!
0
ANGRY
0 Комментарии

  • The Art of Unit Testing with Examples С# (2014). Roy Osherove
  • Владимир Петров
Pemain Mahjong Wins 3 Asal Makassar Diduga Menang Rp 115 Juta di RAJA168, Ini Kisahnya di Makassar Jadwal Kemunculan Scatter Hitam di Solo, Berikut Penjelasan dari RAJA168 di Solo Cara Mudah Mengaktifkan Fitur Terbaik Mahjong Wins 3 di RAJA168 di Tangerang Ini 5 Pola Baru yang Siap Hadirkan Kemenangan Mahjong Wins 3 di RAJA168 di Batam Temui Sekjen Mahjong Wins 3 di Bengkulu, RAJA168 Ingin Adakan Kejuaraan Nasional di Bengkulu Evaluasi Permainan Mahjong Wins 3 di RAJA168 Telah Sukses Dikembangkan Oleh Pakar dari Jambi Gratis, Pola Terbaru RAJA168 Siap Bantu Para Penggemar Mahjong Wins 3 untuk Raih Kemenangan di Palembang Komunitas Mahjong Wins 3 di Bandung Ajak Para Masyarakat untuk Main di RAJA168, Ini Alasannya di Bandung RAJA168 Ajak Warganet untuk Cermati Perkembangan Rating Kemenangan di Mahjong Wins 3 di Semarang RAJA168 Miliki Rencana untuk Adakan Acara Besar dan Undang Para Sepuh Mahjong Wins 3 di Indonesia di Jakarta RAJA168 yakin Jika Bermain Mahjong Wins 3 Hari Ini, Anda Bisa Mudah Raih Scatter Hitam di Malang Main Mahjong Wins 3 di RAJA168, Lansia di Jateng Menang Rp 78 Juta di Semarang Warga Papua Barat Diingatkan RAJA168 untuk Ikuti Tips Main Mahjong Wins 3 di Manokwari Pencarian Kemenangan di RAJA168 Telah Berhasil Diraih Para Pemburu Scatter Hitam Asal Bali di Denpasar Profil Budianto, Pemain Mahjong Wins 3 di RAJA168 yang Ciptakan Inovasi Menang Terbaru di Surabaya BOS288 Pantau Aktivitas Scatter Hitam yang Bisa Datangkan Kemenangan Rp 100 Juta di Makassar Gempa Kuat Telah Guncang Scatter Hitam untuk Hadir di BOS288 di Padang Jadwal dan Lokasi Kehadiran Scatter Hitam di BOS288 untuk Wilayah Jawa Timur di Malang 1.400 Anggota BOS288 di Jayapura Telah Dapatkan Cara Ampuh Menang Main Mahjong Wins 3 di Jayapura 3 Cara Membuat Scatter Hitam untuk Turunkan Kemenangan Ratusan Juta di BOS288 di Bandung Jadwal Event Kemenangan Mahjong Wins 3 untuk Pemain Aktif FIJISLOT di Bekasi di Jawa Barat Unik, Warga Bandung Kini Telah Tak Pernah Ragu Main Mahjong Wins 3 di FIJISLOT di Bandung Pahami 3 Tanda Scatter Hitam Akan Hadir di FIJISLOT di Jakarta Apakah Main Mahjong Wins 3 di FIJISLOT Bisa Jadi Solusi Terbaik untuk Warganet Kalimantan di Banjarmasin? Warga Jakarta Telah Ikuti Program Sukses dari FIJISLOT, Ini Caranya di Jakarta Hadiri Acara Terbesar Mahjong Wins 3 di Bali, RAJA168 Jadi Situs Paling Viral di Denpasar Tetap Produktif Main Mahjong Wins 3 di RAJA168, Pria Asal Jambi Menang Rp 85 Juta di Jambi Rute Scatter Hitam untuk Wilayah Sulawesi Berhasil Dibocorkan Oleh RAJA168, Simak Panduannya di Makassar RAJA168 Luncurkan Buku Panduan Menang Main Mahjong Wins 3 di Surabaya Masyarakat Padang Telah Akses Situs RAJA168 untuk Wujudkan Kemenangan Main Mahjong Wins 3 di Padang Setahun Ini RAJA168 Telah Berikan Kemenangan Rp 20 Miliar di Mahjong Wins 3 di Jakarta Scatter Hitam Akhirnya Keluar di RAJA168, Simak Penjelasannya di Semarang RAJA168 Ajak Warga Kemayoran untuk Ikuti Tips dan Trik Main Mahjong Wins 3 Berikut Ini di Kemayoran Ratusan Masyarakat Medan Telah dapat Scatter Hitam Berkat Panduan Menang dari RAJA168 di Medan Spin Manual di Mahjong Wins 3 Kini Bisa Hadirkan Scatter Hitam di RAJA168 di Surabaya