Đang chuẩn bị liên kết để tải về tài liệu:
Lập trình Wrox Professional Xcode 3 cho Mac OS part 69
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Đơn vị kiểm tra Học cách kiểm tra đơn vị làm việc thêm các xét nghiệm đơn vị Mục tiêu của bạn - dự án C Cấu hình thử nghiệm đơn vị cho một ứng dụng iPhone Thêm xét nghiệm đơn vị đến C hay C + + Dự án | 20 Unit Testing WHAT S IN THIS CHAPTER Learning how unit tests work Adding unit tests to your Objective-C project Configuring unit tests for an iPhone app Adding unit tests to your C or C project Unit testing is a way of validating the run time behavior of your code at build time. In other words you can test and verify the functionality of individual modules before you assemble them into a working application. In addition to writing your application s classes you also write one or more unit tests that exercise those classes and verify that they perform as expected. These tests are not part of your application and live in a separate unit test bundle. You can elect to have these tests performed on your code whenever you build your product ensuring not only that your code compiles and links but that it behaves correctly as well. Unit testing is a fundamental part of Test Driven Development TDD a development philosophy popularized by the Extreme Programming movement. In TDD you develop the test for your function or class first and then write your function to meet the expectations of the test. In essence this is what rigorous designers have done for years. They first develop a detailed specification of exactly what a function should do write the function and then verify that the function behaves as designed. The quantum leap provided by unit tests is that the specification is now an automated test that verifies the design goals of the code rather than a paper description that must be interpreted by the programmer and verified by a quality assurance engineer. Because the test is automated it can be run every time the application is built ensuring that every function still conforms to its specification or immediately alerting the developer if it does not. Download at getcoolebook.com 550 CHAPTER 20 UNIT TESTING Whether or not you subscribe to the principles of Extreme Programming unit tests provide a powerful tool for avoiding issues like the so-called forgotten .