Pragmatic unit testing : in Java with JUnit
Andy Hunt, Dave Thomas, Dave Thomasقیمت نهایی
نسخه اصلی و اورجینال
بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.
مشخصات کتاب
- سال انتشار
- ۲۰۰۳
- فرمت
- زبان
- انگلیسی
- حجم فایل
- ۱٫۳ مگابایت
- شابک
- 9780974514017، 0974514012
دربارهٔ کتاب
Learn how to improve your Java coding skills using unit testing. Despite it's name, unit testing is really a coding technique, not a testing technique. Unit testing is done by programmers, for programmers. It's primarily for our benefit: we get improved confidence in our code, better ability to make deadlines, less time spent in the debugger, and less time beating on the code to make it work correctly.
This book shows how to write tests, but more importantly, it goes where other books fear to tread and gives you concrete advice and examples of what to test—the common things that go wrong in all of our programs. Discover the tricky hiding places where bugs breed, and how to catch them using the freely available JUnit framework. It's easy to learn how to think of all the things in your code that are likely to break. We'll show you how with helpful mnemonics, summarized in a handy tip sheet (also available from our www.pragmaticprogrammer.com website) to help you remember all this stuff.
With this book you will:
- Write better code, and take less time to write it
- Discover the tricky places where bugs breed
- Learn how to think of all the things that could go wrong
- Test individual pieces of code without having to include the whole project
- Test effectively with the whole team
But the best part is that you don't need a sweeping mandate to change your whole team or your whole company. You don't need to adopt Extreme Programming or Test-Driven Development, or change your development process in order to reap the proven benefits of unit testing. You can start unit testing, the pragmatic way, right away.
About the Starter Kit 8 Preface 10 Introduction 13 Coding With Confidence 14 What is Unit Testing? 15 Why Should I Bother with Unit Testing? 16 What Do I Want to Accomplish? 16 How Do I Do Unit Testing? 19 Excuses For Not Testing 19 Roadmap 24 Your First Unit Tests 25 Planning Tests 26 Testing a Simple Method 27 More Tests 32 Writing Tests in JUnit 33 Structuring Unit Tests 33 JUnit Asserts 34 JUnit Framework 38 JUnit Test Composition 39 JUnit Custom Asserts 44 JUnit and Exceptions 45 More on Naming 47 JUnit Test Skeleton 47 What to Test: The Right-BICEP 49 Are the Results Right? 49 Boundary Conditions 52 Check Inverse Relationships 54 Cross-check Using Other Means 54 Force Error Conditions 55 Performance Characteristics 56 CORRECT Boundary Conditions 58 Conformance 59 Ordering 60 Range 62 Reference 65 Existence 66 Cardinality 67 Time 69 Try It Yourself 71 Using Mock Objects 75 Simple Stubs 76 Mock Objects 77 Testing a Servlet 81 Easy Mock Objects 84 Properties of Good Tests 89 Automatic 90 Thorough 91 Repeatable 92 Independent 93 Professional 94 Testing the Tests 95 Testing on a Project 99 Where to Put Test Code 99 Test Courtesy 103 Test Frequency 104 Tests and Legacy Code 105 Tests and Reviews 108 Design Issues 111 Designing for Testability 111 Refactoring for Testing 113 Testing the Class Invariant 124 Test-Driven Design 127 Testing Invalid Parameters 129 Gotchas 131 As Long As The Code Works 131 ``Smoke'' Tests 131 ``Works On My Machine'' 132 Floating-Point Problems 132 Tests Take Too Long 133 Tests Keep Breaking 133 Tests Fail on Some Machines 134 My main is Not Being Run 135 Installing JUnit 136 Command-line installation 137 Does it work? 138 JUnit Test Skeleton 139 Helper Class 141 Basic Template 141 Resources 144 On The Web 144 Bibliography 146 Summary: Pragmatic Unit Testing 147 Answers to Exercises 148 Volume II of the Pragmatic Starter Kit, a set of guides for getting project teams up and running. In the second volume of the sequence, Hunt and Thomas (software developers) offer guidance on writing better code, detecting and fixing potential problems, testing pieces of code, and testing with a whole team. They describe the process of unit testing with the freely-available JUnit library in Java, but the techniques they describe can be applied in other languages and frameworks as well. Presents a guide to unit testing with the JUnit library in Java along with providing information on writing code, detecting and fixing problems, testing pieces of code, and testing with a team.کتابهای مشابه
Pragmatic Unit Testing in Java with JUnit
۴۹٬۰۰۰ تومان
Pragmatic unit testing : in Java with JUnit
۴۹٬۰۰۰ تومان
Pragmatic unit testing : in Java with JUnit
۴۹٬۰۰۰ تومان
Pragmatic Unit Testing in Java 8 with JUnit
۴۹٬۰۰۰ تومان
Pragmatic Unit Testing in Java 8 with JUnit
۴۹٬۰۰۰ تومان
Pragmatic unit testing in Java 8 with JUnit
۴۹٬۰۰۰ تومان
Pragmatic Unit Testing in Java with JUnit, 3rd Edition
۴۹٬۰۰۰ تومان
Java Unit Testing with JUnit 5 : Test Driven Development with JUnit 5
۴۹٬۰۰۰ تومان
JUnit in Action [Java testing framework
۴۹٬۰۰۰ تومان
Practical Unit Testing with JUnit and Mockito
۴۹٬۰۰۰ تومان
Practical Unit Testing with JUnit and Mockito
۴۹٬۰۰۰ تومان
Practical Unit Testing with JUnit and Mockito
۴۹٬۰۰۰ تومان
قیمت نهایی
۴۹٬۰۰۰ تومان
