Perl Testing: A Developer's Notebook
暫譯: Perl 測試:開發者筆記本

Ian Langworth, chromatic

  • 出版商: O'Reilly
  • 出版日期: 2005-08-23
  • 售價: $1,270
  • 貴賓價: 9.5$1,207
  • 語言: 英文
  • 頁數: 202
  • 裝訂: Paperback
  • ISBN: 0596100922
  • ISBN-13: 9780596100926
  • 相關分類: Perl 程式語言
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

商品描述

Description:

Is there any sexier topic in software development than software testing? That is, besides game programming, 3D graphics, audio, high-performance clustering, cool websites, et cetera? Okay, so software testing is low on the list. And that's unfortunate, because good software testing can increase your productivity, improve your designs, raise your quality, ease your maintenance burdens, and help to satisfy your customers, coworkers, and managers.


Perl has a strong history of automated tests. A very early release of Perl 1.0 included a comprehensive test suite, and it's only improved from there. Learning how Perl's test tools work and how to put them together to solve all sorts of previously intractable problems can make you a better programmer in general. Besides, it's easy to use the Perl tools described to handle all sorts of testing problems that you may encounter, even in other languages.

Like all titles in O'Reilly's Developer's Notebook series, this "all lab, no lecture" book skips the boring prose and focuses instead on a series of exercises that speak to you instead of at you.

Perl Testing: A Developer's Notebook will help you dive right in and:

  • Write basic Perl tests with ease and interpret the results
  • Apply special techniques and modules to improve your tests
  • Bundle test suites along with projects
  • Test databases and their data
  • Test websites and web projects
  • Use the "Test Anything Protocol" which tests projects written in languages other than Perl


With today's increased workloads and short development cycles, unit tests are more vital to building robust, high-quality software than ever before. Once mastered, these lessons will help you ensure low-level code correctness, reduce software development cycle time, and ease maintenance burdens.

You don't have to be a die-hard free and open source software developer who lives, breathes, and dreams Perl to use this book. You just have to want to do your job a little bit better.

 

 

Table of Contents:

The Developer's Notebook Series

Preface

Chapter 1. Beginning Testing

     Installing Test Modules

     Running Tests

     Interpreting Test Results

     Writing Your First Test

     Loading Modules

     Improving Test Comparisons

Chapter 2. Writing Tests

     Skipping Tests

     Skipping All Tests

     Marking Tests as TODO

     Simple Data Structure Equality

     Data Composition

     Testing Warnings

     Testing Exceptions

Chapter 3. Managing Tests

     Organizing Tests

     Checking Your Coverage

     Writing a Testing Library

     Testing a Testing Library

     Writing a Testing Harness

     Testing Across the Network

     Automating Test Runs

Chapter 4. Distributing Your Tests (and Code)

     Testing POD Files

     Testing Documentation Coverage

     Distribution Signatures

     Testing Entire Distributions

     Letting the User Decide

     Letting the User Decide (Continued)

     Bundling Tests with Modules

     Collecting Test Results

     Validating Kwalitee

Chapter 5. Testing Untestable Code

     Overriding Built-ins

     Mocking Modules

     Mocking Objects

     Partially Mocking Objects

     Overriding Live Code

     Overriding Operators Everywhere

Chapter 6. Testing Databases

     Shipping Test Databases

     Testing Database Data

     Using Temporary Databases

     Mocking Databases

Chapter 7. Testing Web Sites

     Testing Your Backend

     Testing Your Frontend

     Record and Play Back Browsing Sessions
     Testing the Validity of HTML

     Running Your Own Apache Server

     Testing with Apache-Test

     Distributing Modules with Apache-Test

Chapter 8. Unit Testing with Test::Class

     Writing Test Cases

     Creating Test Fixtures

     Inheriting Tests

     Skipping Tests with Test::Class

     Marking Tests as TODO with Test::Class

Chapter 9. Testing Everything Else

     Writing Testable Programs

     Testing Programs

     Testing Interactive Programs

     Testing Shared Libraries

Index

商品描述(中文翻譯)

**描述:**
在軟體開發中,是否有比軟體測試更吸引人的主題?除了遊戲程式設計、3D 圖形、音訊、高效能叢集、酷炫網站等等?好吧,軟體測試的確在這個列表中排名較低。這很可惜,因為良好的軟體測試可以提高你的生產力、改善設計、提升品質、減輕維護負擔,並幫助滿足客戶、同事和管理者的需求。

Perl 在自動化測試方面有著悠久的歷史。非常早期的 Perl 1.0 版本就包含了一個全面的測試套件,並且從那時起不斷改進。學習 Perl 的測試工具如何運作,以及如何將它們組合起來解決各種以前難以處理的問題,可以讓你成為一名更好的程式設計師。此外,使用這些 Perl 工具來處理你可能遇到的各種測試問題,即使是在其他語言中也很簡單。

像 O'Reilly 的開發者筆記系列中的所有書籍一樣,這本「全實驗,無講座」的書跳過了乏味的散文,而專注於一系列與你對話的練習。
《Perl 測試:開發者筆記》將幫助你立即投入並:
- 輕鬆編寫基本的 Perl 測試並解釋結果
- 應用特殊技術和模組來改善你的測試
- 將測試套件與專案捆綁在一起
- 測試資料庫及其數據
- 測試網站和網頁專案
- 使用「測試任何協議」(Test Anything Protocol),該協議可測試用其他語言編寫的專案

隨著今天工作負荷的增加和開發週期的縮短,單元測試對於構建穩健、高品質的軟體比以往任何時候都更為重要。一旦掌握了這些課程,將幫助你確保低層代碼的正確性、縮短軟體開發週期,並減輕維護負擔。

你不必成為一名死忠的自由和開源軟體開發者,生活、呼吸和夢想 Perl 才能使用這本書。你只需要想要讓自己的工作做得更好一些。

**目錄:**
**開發者筆記系列**
**前言**
**第 1 章. 開始測試**
- 安裝測試模組
- 執行測試
- 解釋測試結果
- 編寫你的第一個測試
- 載入模組
- 改善測試比較

**第 2 章. 編寫測試**
- 跳過測試
- 跳過所有測試
- 將測試標記為 TODO
- 簡單數據結構相等
- 數據組合
- 測試警告
- 測試例外

**第 3 章. 管理測試**
- 組織測試
- 檢查你的覆蓋率
- 編寫測試庫
- 測試測試庫
- 編寫測試工具
- 跨網路測試
- 自動化測試執行

**第 4 章. 分發你的測試(和代碼)**
- 測試 POD 文件
- 測試文檔覆蓋率
- 發佈簽名
- 測試整個發佈
- 讓用戶決定
- 讓用戶決定(續)
- 將測試與模組捆綁
- 收集測試結果
- 驗證 Kwalitee

**第 5 章. 測試無法測試的代碼**
- 覆蓋內建函數
- 模擬模組
- 模擬物件
- 部分模擬物件
- 覆蓋實時代碼
- 在各處覆蓋運算子

**第 6 章. 測試資料庫**
- 發佈測試資料庫
- 測試資料庫數據
- 使用臨時資料庫
- 模擬資料庫

**第 7 章. 測試網站**
- 測試你的後端
- 測試你的前端
- 記錄並回放瀏覽會話
- 測試 HTML 的有效性
- 運行你自己的 Apache 伺服器
- 使用 Apache-Test 測試
- 使用 Apache-Test 分發模組

**第 8 章. 使用 Test::Class 進行單元測試**
- 編寫測試案例
- 創建測試設置
- 繼承測試
- 使用 Test::Class 跳過測試
- 使用 Test::Class 將測試標記為 TODO

**第 9 章. 測試其他所有內容**
- 編寫可測試的程式
- 測試程式
- 測試互動式程式
- 測試共享庫

**索引**