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

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.

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
1
0
0
0
0
0
0
0
0 Комментарии

Бесплатное образование

ПРИСОЕДИНЯЙТЕСЬ
Sweet Bonanza Sering Drop Lollipop, Gunakan Trik Ini Scatter Starlight Princess 1000 Muncul Teratur di Hari Tertentu Pola Mahjong Ways 2 Anti Mainstream Tapi Banyak Bikin Maxwin Petir Merah Olympus Lebih Sering Muncul Setelah Pola Ini Rahasia Slot Pragmatic yang Hanya Diketahui Member Level Tertinggi Trik Buka Pola Mahjong Tanpa Bakar Banyak Modal Kombinasi Pola Olympus dan Starlight Bisa Gandakan Peluang Menang Kombinasi Scatter Hitam dan Free Spin Bisa Tercapai dengan Cara Ini Link Gacor Mahjong Ways 2 Terbaru Bocor dari Forum Tertutup Strategi Slot Olympus dan Mahjong Ways yang Cocok Digabung Prediksi Maxwin Starlight Princess 1000 Berdasarkan Data Real Sweet Bonanza Gacor Lagi, Ini Pola Candy yang Dipakai Sweet Bonanza 1000 Buka Fase Cuan di Jam Tertentu Slot Sweet Bonanza Candyland Sering Drop Fitur Spesial Game Slot Online Sedang Ramai, Pemain Baru Perlu Tahu Ini Platform Slot Online Terpercaya yang Sering Bagi Bonus Diam-diam Daftar Slot Online Paling Dicari Karena Gampang Menang Slot Online Gacor Terpantau Aktif Saat Trafik Lagi Sepi Situs Slot Online Tiba-tiba Bagi Banyak Free Spin Hari Ini Kombinasi Waktu dan Pola Slot Gacor Bikin Hoki Maksimal Slot Starlight Princess Sedang Ramai, Ini Alasan Sebenarnya Starlight Princess 1000 Baru Update, Ini Waktu Gacor Terbaik Trik Starlight Princess yang Buat Banyak Pemain Balik Modal Petir Gate of Olympus Muncul Konsisten, Gunakan Pola Ini Gates of Olympus Buka Pola Baru yang Jarang Dipakai Slot Olympus Sedang Memberi Cuan Besar, Ini Buktinya Olympus 1000 Menyimpan Pola Unik yang Baru Terungkap Situs Slot Pragmatic Sering Bagi Hadiah Tak Terduga Waktu Paling Tepat Main Slot Gacor Hari Ini Versi Pro Situs Slot Gacor dengan Winrate Tertinggi Minggu Ini Saatnya Bongkar Pola Slot Gacor yang Jarang Diketahui Link Slot Gacor Tersembunyi yang Baru Dibuka Member Lama Penampakan Scatter Hitam Mahjong Ways 2 yang Langka Cara Baru Mendapatkan Scatter Mahjong Ways Tanpa Modal Besar Pola Mahjong Ways 2 Paling Diminati Hunter Maxwin Mahjong Ways Scatter Hitam Sering Muncul di Jam Ini Rekomendasi Pola Mahjong Ways yang Belum Banyak Diketahui Kombinasi Pola Mahjong Ways 1 yang Sulit Tapi Menguntungkan JP Mahjong Ways 2 Terjadi Lagi, Ini Kronologinya Strategi Slot Pragmatic Anti Rungkad Ala Pemain Profesional Gates of Olympus dan Olympus 1000 Ternyata Punya Jam Main Emas Tersembunyi Sweet Bonanza Candyland Munculkan Pola Baru yang Jarang Diketahui Situs Slot Pragmatic Gacor Paling Banyak Dipakai Penangkap Maxwin Slot Olympus dan Starlight Princess Jadi Duo Gacor Baru Para Sultan JP Mahjong Ways 2 Kini Lebih Gampang Lewat Kombinasi Pola Tak Terduga Slot Gacor Hari Ini Terbongkar, Pola Terlarang yang Sering Dipakai Pro Player Temukan Link Slot Gacor Rahasia yang Hanya Dikenal Komunitas Tertutup Scatter Hitam Mahjong Ways 2 Akhirnya Diungkap, Ini Trik Sederhananya Pola Mahjong Ways 1 dan 2 yang Sering Bocor di Forum Khusus Slotter Daftar Situs Slot Online Anti Rungkad dengan Peluang Gacor Tertinggi