Perl Testing: A Developer's Notebook
Год издания: 2005
Автор: Langworth Ian, chromatic / Лангворт Ян, хроматик
Издательство: O'Reilly
ISBN: 978-0-596-10092-6
Язык: Английский
Формат: PDF / EPUB
Качество: Издательский макет или текст (eBook)
Интерактивное оглавление: Да
Количество страниц: 182
Описание:
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.
Оглавление
Contents
The Developer’s Notebook Series
Notebooks Are...
Notebooks Aren’t...
Organization
Preface
What This Book Covers
Conventions Used in This Book
Using Code Examples
Safari Enabled
Comments and Questions
Acknowledgments
Ian Langworth
chromatic
Chapter 1: Beginning Testing
Installing Test Modules
How do I do that?
Through the CPAN shell
Through PPM
By hand
What about...
Running Tests
How do I do that?
What just happened?
What about...
Interpreting Test Results
How do I do that?
What just happened?
What about...
Writing Your First Test
How do I do that?
What just happened?
What about...
Loading Modules
How do I do that?
What just happened?
What about...
Improving Test Comparisons
How do I do that?
What just happened?
What about...
Chapter 2: Writing Tests
Skipping Tests
How do I do that?
What just happened?
Skipping All Tests
How do I do that?
What just happened?
Marking Tests as TODO
How do I do that?
What just happened?
What about...
Simple Data Structure Equality
How do I do that?
What just happened?
What about...
Data Composition
How do I do that?
What just happened?
What about...
Where to learn more
Testing Warnings
How do I do that?
What just happened?
What about...
Testing Exceptions
How do I do that?
What just happened?
What about...
Chapter 3: Managing Tests
Organizing Tests
How do I do that?
What just happened?
What about...
Checking Your Coverage
How do I do that?
What just happened?
What about...
Writing a Testing Library
How do I do that?
What just happened?
What about...
Testing a Testing Library
How do I do that?
What just happened?
What about...
Writing a Testing Harness
How do I do that?
What just happened?
Testing Across the Network
How do I do that?
What just happened?
What about...
Automating Test Runs
How do I do that?
What just happened?
What about...
Chapter 4: Distributing Your Tests (and Code)
Testing POD Files
How do I do that?
What just happened?
What about...
Testing Documentation Coverage
How do I do that?
What just happened?
What about...
Distribution Signatures
How do I do that?
What just happened?
Testing Entire Distributions
How do I do that?
What just happened?
What about...
Letting the User Decide
How do I do that?
What just happened?
Letting the User Decide (Continued)
How do I do that?
What just happened?
Bundling Tests with Modules
How do I do that?
What just happened?
What about?
Collecting Test Results
How do I do that?
What just happened?
What about...
Validating Kwalitee
How do I do that?
What just happened?
What about...
Chapter 5: Testing Untestable Code
Overriding Built-ins
How do I do that?
What just happened?
What about...
Mocking Modules
How do I do that?
What just happened?
What about...
Mocking Objects
How do I do that?
What just happened?
What about...
Partially Mocking Objects
How do I do that?
What just happened?
What about...
Overriding Live Code
How do I do that?
What just happened?
What about...
Overriding Operators Everywhere
How do I do that?
What just happened?
What about...
Chapter 6: Testing Databases
Shipping Test Databases
How do I do that?
What just happened?
What about...
Testing Database Data
How do I do that?
What just happened?
What about...
Using Temporary Databases
How do I do that?
What just happened?
What about...
Mocking Databases
How do I do that?
What just happened?
What about...
Chapter 7: Testing Web Sites
Testing Your Backend
How do I do that?
What just happened?
Testing Your Frontend
How do I do that?
What just happened?
Record and Play Back Browsing Sessions
How do I do that?
What just happened?
Testing the Validity of HTML
How do I do that?
What just happened?
What about...
Running Your Own Apache Server
How do I do that?
What just happened?
Testing with Apache-Test
How do I do that?
What just happened?
What about...
Where to learn more
Distributing Modules with Apache-Test
How do I do that?
What just happened?
What about...
Chapter 8: Unit Testing with Test::Class
Writing Test Cases
How do I do that?
What just happened?
What about...
Creating Test Fixtures
How do I do that?
What just happened?
What about...
Inheriting Tests
How do I do that?
What just happened?
Skipping Tests with Test::Class
How do I do that?
What about...
Marking Tests as TODO with Test::Class
How do I do that?
What about...
Chapter 9: Testing Everything Else
Writing Testable Programs
How do I do that?
What just happened?
What about...
Testing Programs
How do I do that?
What just happened?
What about...
Testing Interactive Programs
How do I do that?
What just happened?
What about...
Testing Shared Libraries
How do I do that?
What just happened?
What about...
Index