ورود به حساب

نام کاربری گذرواژه

گذرواژه را فراموش کردید؟ کلیک کنید

حساب کاربری ندارید؟ ساخت حساب

ساخت حساب کاربری

نام نام کاربری ایمیل شماره موبایل گذرواژه

برای ارتباط با ما می توانید از طریق شماره موبایل زیر از طریق تماس و پیامک با ما در ارتباط باشید


09117307688
09117179751

در صورت عدم پاسخ گویی از طریق پیامک با پشتیبان در ارتباط باشید

دسترسی نامحدود

برای کاربرانی که ثبت نام کرده اند

ضمانت بازگشت وجه

درصورت عدم همخوانی توضیحات با کتاب

پشتیبانی

از ساعت 7 صبح تا 10 شب

دانلود کتاب The Art of Unit Testing: with Examples in .NET

دانلود کتاب هنر واحد تست: با نمونه هایی از .NET

The Art of Unit Testing: with Examples in .NET

مشخصات کتاب

The Art of Unit Testing: with Examples in .NET

دسته بندی: برنامه نویسی: زبان های برنامه نویسی
ویرایش: 1 
نویسندگان:   
سری:  
ISBN (شابک) : 1933988274, 9781933988276 
ناشر: Manning 
سال نشر: 2009 
تعداد صفحات: 324 
زبان: English 
فرمت فایل : PDF (درصورت درخواست کاربر به PDF، EPUB یا AZW3 تبدیل می شود) 
حجم فایل: 9 مگابایت 

قیمت کتاب (تومان) : 55,000



ثبت امتیاز به این کتاب

میانگین امتیاز به این کتاب :
       تعداد امتیاز دهندگان : 13


در صورت تبدیل فایل کتاب The Art of Unit Testing: with Examples in .NET به فرمت های PDF، EPUB، AZW3، MOBI و یا DJVU می توانید به پشتیبان اطلاع دهید تا فایل مورد نظر را تبدیل نمایند.

توجه داشته باشید کتاب هنر واحد تست: با نمونه هایی از .NET نسخه زبان اصلی می باشد و کتاب ترجمه شده به فارسی نمی باشد. وبسایت اینترنشنال لایبرری ارائه دهنده کتاب های زبان اصلی می باشد و هیچ گونه کتاب ترجمه شده یا نوشته شده به فارسی را ارائه نمی دهد.


توضیحاتی در مورد کتاب هنر واحد تست: با نمونه هایی از .NET



تست واحد، درست انجام شده، می تواند به معنای تفاوت بین یک پروژه شکست خورده و یک پروژه موفق، بین یک پایه کد قابل نگهداری و یک پایه کد که کسی جرات لمس آن را ندارد، و بین رسیدن به خانه در ساعت 2 صبح یا رسیدن به خانه باشد. به موقع برای شام به خانه بروید، حتی قبل از مهلت انتشار.

هنر تست واحد بر روی آنچه قبلاً در مورد این موضوع مهم نوشته شده است، ساخته شده است. شما را گام به گام از تست های ساده تا تست هایی که قابل نگهداری، خواندنی و قابل اعتماد هستند راهنمایی می کند. این سوژه های پیشرفته مانند مسخره کردن، خرد، و چارچوب هایی مانند Typemock Isolator و Rhino Mocks را پوشش می دهد. و با الگوهای آزمایشی پیشرفته و سازماندهی، کار با کدهای قدیمی و حتی کدهای غیرقابل آزمایش آشنا خواهید شد. این کتاب ابزارهایی را که هنگام آزمایش پایگاه‌های داده و سایر فناوری‌ها به آن نیاز دارید، مورد بحث قرار می‌دهد. این کتاب برای توسعه دهندگان دات نت نوشته شده است اما دیگران نیز از این کتاب بهره خواهند برد.

فهرست مطالب:

  1. مبانی تست واحد
  2. اولین آزمون واحد
  3. استفاده از خرد برای شکستن وابستگی ها
  4. تست تعامل با استفاده از اشیاء ساختگی
  5. فریم ورک های جداسازی (شیء ساختگی)
  6. سلسله مراتب و سازماندهی تست
  7. ارکان تست های خوب
  8. ادغام تست واحد در سازمان
  9. کار با کد قدیمی

توضیحاتی درمورد کتاب به خارجی

Unit testing, done right, can mean the diff erence between a failed project and a successful one, between a maintainable code base and a code base that no one dares touch, and between getting home at 2 AM or getting home in time for dinner, even before a release deadline.

The Art of Unit Testing builds on top of what's already been written about this important topic. It guides you step by step from simple tests to tests that are maintainable, readable, and trustworthy. It covers advanced subjects like mocks, stubs, and frameworks such as Typemock Isolator and Rhino Mocks. And you'll learn about advanced test patterns and organization, working with legacy code and even untestable code. The book discusses tools you need when testing databases and other technologies. It's written for .NET developers but others will also benefit from this book.

Table of Contents :

  1. The basics of unit testing
  2. A first unit test
  3. Using stubs to break dependencies
  4. Interaction testing using mock objects
  5. Isolation (mock object) frameworks
  6. Test hierarchies and organization
  7. The pillars of good tests
  8. Integrating unit testing into the organization
  9. Working with legacy code


فهرست مطالب

front cover......Page 1
Brief contents......Page 9
Contents......Page 11
Foreword......Page 17
Preface......Page 19
Acknowledgments......Page 21
Roadmap......Page 22
Code conventions and downloads......Page 23
Author Online......Page 24
About the cover illustration......Page 25
Part 1 Getting started......Page 27
1 The basics of unit testing......Page 29
Unit testing—the classic definition......Page 30
1.1.2 We’ve all written unit tests (sort of)......Page 31
Properties of a good unit test......Page 32
Integration tests......Page 33
1.3.1 Drawbacks of integration tests compared to automated unit tests......Page 35
Good unit test—a definition......Page 37
A simple unit test example......Page 38
Test-driven development......Page 42
Summary......Page 45
2 A first unit test......Page 47
2.1.1 What unit-testing frameworks offer......Page 48
Introducing the LogAn project......Page 51
2.3.2 Loading up the solution......Page 52
2.3.3 Using the NUnit attributes in your code......Page 55
Writing our first test......Page 56
2.4.1 The Assert class......Page 57
2.4.2 Running our first test with NUnit......Page 58
2.4.4 From red to green......Page 59
2.5.1 Setup and teardown......Page 60
2.5.2 Checking for expected exceptions......Page 62
2.5.3 Ignoring tests......Page 64
2.5.4 Setting test categories......Page 65
Indirect testing of state......Page 66
Summary......Page 70
Part 2 Core techniques......Page 73
3 Using stubs to break dependencies......Page 75
Introducing stubs......Page 76
Identifying a filesystem dependency in LogAn......Page 77
Determining how to easily test LogAnalyzer......Page 78
3.4.1 Extract an interface to allow replacing underlying implementation......Page 81
3.4.3 Receive an interface at the constructor level (constructor injection)......Page 84
3.4.4 Receive an interface as a property get or set......Page 90
3.4.5 Getting a stub just before a method call......Page 92
Variations on refactoring techniques......Page 100
3.5.1 Using Extract and Override to create stub results......Page 101
Overcoming the encapsulation problem......Page 103
3.6.1 Using internal and [InternalsVisibleTo]......Page 104
3.6.2 Using the [Conditional] attribute......Page 105
Summary......Page 106
4 Interaction testing using mock objects......Page 108
State-based versus interaction testing......Page 109
The difference between mocks and stubs......Page 110
A simple manual mock example......Page 113
Using a mock and a stub together......Page 115
One mock per test......Page 120
Stub chains: stubs that produce mocks or other stubs......Page 121
The problems with handwritten mocks and stubs......Page 122
Summary......Page 123
5 Isolation (mock object) frameworks......Page 125
Why use isolation frameworks?......Page 126
5.2.1 Introducing Rhino Mocks into your tests......Page 128
5.2.2 Replacing a handwritten mock object with a dynamic one......Page 129
5.3.1 Strict mocks......Page 132
5.3.2 Nonstrict mocks......Page 133
Returning values from fake objects......Page 134
5.5.1 Creating a stub in Rhino Mocks......Page 136
5.5.2 Combining dynamic stubs and mocks......Page 138
5.6.1 Checking parameters with string constraints......Page 141
5.6.2 Checking parameter object properties with constraints......Page 144
5.6.3 Executing callbacks for parameter verification......Page 146
Testing for event-related activities......Page 147
5.7.1 Testing that an event has been subscribed to......Page 148
5.7.2 Triggering events from mocks and stubs......Page 149
5.7.3 Testing whether an event was triggered......Page 150
Arrange-act-assert syntax for isolation......Page 152
5.9.1 NUnit.Mocks......Page 156
5.9.3 NMock2......Page 157
5.9.5 Rhino Mocks......Page 158
Advantages of isolation frameworks......Page 160
5.11.1 Unreadable test code......Page 161
5.11.4 Overspecifying the tests......Page 162
Summary......Page 163
Part 3 The test code......Page 165
6 Test hierarchies and organization......Page 167
6.1.1 Anatomy of an automated build......Page 168
6.1.3 Automated build types......Page 170
Mapping out tests based on speed and type......Page 171
6.2.1 The human factor of separating unit from integration tests......Page 172
6.2.2 The safe green zone......Page 173
6.4.1 Mapping tests to projects......Page 174
6.4.2 Mapping tests to classes......Page 175
Building a test API for your application......Page 176
6.5.1 Using test class inheritance patterns......Page 177
6.5.2 Creating test utility classes and methods......Page 193
6.5.3 Making your API known to developers......Page 194
Summary......Page 195
7 Integrating unit testing into the organization......Page 197
7.1.1 Deciding when to remove or change tests......Page 198
7.1.2 Avoiding logic in tests......Page 204
7.1.3 Testing only one thing......Page 205
7.1.5 Assuring code coverage......Page 206
Writing maintainable tests......Page 207
7.2.1 Testing private or protected methods......Page 208
7.2.2 Removing duplication......Page 210
7.2.3 Using setup methods in a maintainable manner......Page 214
7.2.4 Enforcing test isolation......Page 217
7.2.5 Avoiding multiple asserts......Page 224
7.2.6 Avoiding testing multiple aspects of the same object......Page 228
7.2.7 Avoiding overspecification in tests......Page 231
Writing readable tests......Page 235
7.3.1 Naming unit tests......Page 236
7.3.2 Naming variables......Page 237
7.3.3 Asserting yourself with meaning......Page 238
7.3.5 Setting up and tearing down......Page 240
Summary......Page 241
Part 4 Design and process......Page 243
8 Integrating unit testing into the organization......Page 245
8.1.2 Convince insiders: champions and blockers......Page 246
8.1.3 Identify possible entry points......Page 248
8.2.1 Guerrilla implementation (bottom-up)......Page 249
8.2.3 Getting an outside champion......Page 250
8.2.4 Making progress visible......Page 251
8.2.5 Aiming for specific goals......Page 253
8.2.6 Realizing that there will be hurdles......Page 254
8.3.2 Lack of political support......Page 255
8.3.4 Lack of team support......Page 256
8.4.1 How much time will this add to the current process?......Page 257
8.4.2 Will my QA job be at risk because of this?......Page 259
8.4.4 Is there proof that unit testing helps?......Page 260
8.4.6 We have lots of code without tests: where do we start?......Page 261
8.4.9 How can we know we don’t have bugs in our tests?......Page 262
8.4.11 Must we do TDD-style coding?......Page 263
Summary......Page 264
9 Working with legacy code......Page 265
Where do you start adding tests?......Page 266
9.2.1 Pros and cons of the easy-first strategy......Page 268
9.2.2 Pros and cons of the hard-first strategy......Page 269
Writing integration tests before refactoring......Page 270
9.4.1 Isolate dependencies easily with Typemock Isolator......Page 272
9.4.3 Use JMockit for Java legacy code......Page 274
9.4.4 Use Vise while refactoring your Java code......Page 276
9.4.5 Use FitNesse for acceptance tests before you refactor......Page 277
9.4.7 Use NDepend to investigate your production code......Page 279
9.4.9 Detect duplicate code (and bugs) with Simian......Page 280
Summary......Page 281
Why should I care about testability in my design?......Page 282
Design goals for testability......Page 283
A.2.1 Make methods virtual by default......Page 284
A.2.2 Use interface-based designs......Page 285
A.2.5 Avoid direct calls to static methods......Page 286
A.2.7 Separate singletons and singleton holders......Page 287
A.3.1 Amount of work......Page 289
A.3.3 Exposing sensitive IP......Page 290
Alternatives to designing for testability......Page 291
Summary......Page 292
Isolation frameworks......Page 294
B.1.3 Typemock Isolator......Page 295
B.1.5 NUnit.Mocks......Page 296
B.2.2 NUnit......Page 297
B.2.5 xUnit......Page 298
IoC containers......Page 299
B.3.2 Microsoft Unity......Page 300
B.3.5 Common Service Locator Library......Page 301
Database testing......Page 302
B.4.2 Use rollback attributes......Page 303
B.5.1 Ivonna......Page 304
B.5.5 WatiN......Page 305
B.6.1 NUnitForms......Page 306
Thread-related testing......Page 307
B.7.3 Osherove.ThreadTester......Page 308
B.8.2 StoryTeller......Page 309
A......Page 310
C......Page 311
E......Page 312
F......Page 313
I......Page 314
M......Page 315
N......Page 316
P......Page 317
S......Page 318
T......Page 320
U......Page 321
Y......Page 322
back cover......Page 324




نظرات کاربران