English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 71 Lessons (10h 34m) | 1.54 GB
Written for the working developer, it offers state-of-the-art software testing techniques. Perfect for training the next generation of effective software testers.
From the Foreword by Dr. Arie Van Deursen
Go beyond basic testing! Great software testing makes the entire development process more efficient. This book reveals a systemic and effective approach that will help you customize your testing coverage and catch bugs in tricky corner cases.
In Effective Software Testing you will learn how to:
- Engineer tests with a much higher chance of finding bugs
- Read code coverage metrics and use them to improve your test suite
- Understand when to use unit tests, integration tests, and system tests
- Use mocks and stubs to simplify your unit testing
- Think of pre-conditions, post-conditions, invariants, and contracts
- Implement property-based tests
- Utilize coding practices like dependency injection and hexagonal architecture that make your software easier to test
- Write good and maintainable test code
Effective Software Testing teaches you a systematic approach to software testing that will ensure the quality of your code. It’s full of techniques drawn from proven research in software engineering, and each chapter puts a new technique into practice. Follow the real-world use cases and detailed code samples, and you’ll soon be engineering tests that find bugs in edge cases and parts of code you’d never think of testing! Along the way, you’ll develop an intuition for testing that can save years of learning by trial and error.
Effective testing ensures that you’ll deliver quality software. For software engineers, testing is a key part of the development process. Mastering specification-based testing, boundary testing, structural testing, and other core strategies is essential to writing good tests and catching bugs before they hit production.
Effective Software Testing is a hands-on guide to creating bug-free software. Written for developers, it guides you through all the different types of testing, from single units up to entire components. You’ll also learn how to engineer code that facilitates testing and how to write easy-to-maintain test code. Offering a thorough, systematic approach, this book includes annotated source code samples, realistic scenarios, and reasoned explanations.
The Java-based examples illustrate concepts you can use for any object-oriented language.
Table of Contents
1 Effective and systematic software testing
2 Developers who test vs. developers who do not
3 Effective software testing for developers
4 The myth of “correctness by design”
5 Principles of software testing (or, why testing is so difficult)
6 The testing pyramid, and where we should focus
7 System testing
8 What if you disagree with the testing pyramid
9 Exercises
10 Specification-based testing
11 Step 1 Understanding the requirements, inputs, and outputs
12 Step 4 Analyze the boundaries
13 Step 5 Devise test cases
14 Step 7 Augment the test suite with creativity and experience
15 Finding bugs with specification testing Part 1
16 Finding bugs with specification testing Part 2
17 Use variations of the same input to facilitate understanding
18 Exercises
19 Structural testing and code coverage
20 Code coverage criteria
21 Creating a test suite that achieves MCDC
22 Criteria subsumption, and choosing a criterion
23 Boundary testing and structural testing
24 What does it mean to achieve 100 coverage
25 What should not be covered
26 Exercises
27 Designing contracts
28 Invariants
29 Inheritance and contracts
30 Design-by-contract in the real world
31 Exception or soft return values
32 Property-based testing
33 Example 1 The passing grade program
34 Example 3 Testing the indexOf method
35 Example 4 Testing the Basket class
36 Property-based testing in the real world
37 Test doubles and mocks
38 An introduction to mocking frameworks
39 Mocks and expectations
40 Simulating exceptions
41 What to mock and what not to mock
42 Date and time wrappers
43 What do others say about mocking
44 Designing for testability
45 Separating infrastructure code from domain code
46 Dependency injection and controllability
47 Making your classes and methods observable
48 Dependency via class constructor or value via method parameter
49 The cohesion of the class under test
50 The Hexagonal Architecture and mocks as a design technique
51 Test-driven development
52 Our first TDD session
53 Reflecting on our first TDD experience
54 What does the research say about TDD
55 Exercises
56 Writing larger tests
57 Testing larger components
58 Testing larger components that go beyond our code base
59 Database and SQL testing
60 Writing automated tests for SQL queries
61 Setting up infrastructure for SQL tests
62 System tests
63 Designing page objects Part 1
64 Designing page objects Part 2
65 Patterns and best practices
66 Final notes on larger tests
67 Test code quality
68 Tests should break if the behavior changes
69 Test smells
70 Sensitive assertions
71 Wrapping up the book
Resolve the captcha to access the links!