The Way of the Web Tester: Reduce Bugs, Increase Quality, Have Fun

The Way of the Web Tester: Reduce Bugs, Increase Quality, Have Fun

by Jonathan Rasmusson
The Way of the Web Tester: Reduce Bugs, Increase Quality, Have Fun

The Way of the Web Tester: Reduce Bugs, Increase Quality, Have Fun

by Jonathan Rasmusson

Paperback

$29.00 
  • SHIP THIS ITEM
    Qualifies for Free Shipping
  • PICK UP IN STORE
    Check Availability at Nearby Stores

Related collections and offers


Overview

This book is for everyone who needs to test the web. As a tester, you'll automate your tests. As a developer, you'll build more robust solutions. And as a team, you'll gain a vocabulary and a means to coordinate how to write and organize automated tests for the web. Follow the testing pyramid and level up your skills in user interface testing, integration testing, and unit testing. Your new skills will free you up to do other, more important things while letting the computer do the one thing it's really good at: quickly running thousands of repetitive tasks.

This book shows you how to do three things:

* How to write really good automated tests for the web.

* How to pick and choose the right ones.

* How to explain, coordinate, and share your efforts with others.

If you're a traditional software tester who has never written an automated test before, this is the perfect book for getting started. Together, we'll go through everything you'll need to start writing your own tests.

If you're a developer, but haven't thought much about testing, this book will show you how to move fast without breaking stuff. You'll test RESTful web services and legacy systems, and see how to organize your tests.

And if you're a team lead, this is the Rosetta Stone you've been looking for. This book will help you bridge that testing gap between your developers and your testers by giving your team a model to discuss automated testing, and most importantly, to coordinate their efforts.

The Way of the Web Tester is packed with cartoons, graphics, best practices, war stories, plenty of humor, and hands-on tutorial exercises that will get you doing the right things, the right way.

Product Details

ISBN-13: 9781680501834
Publisher: Pragmatic Bookshelf
Publication date: 10/02/2016
Pages: 258
Product dimensions: 5.30(w) x 7.90(h) x 0.90(d)

About the Author

Jonathan is the author of "The Agile Samurai." An experienced programmer, Jonathan has helped some of the world's leading software companies find better ways of working and playing together. When not cycling to work in the throes of winter you can find him developing software and coaching teams at Spotify.

Table of Contents

Acknowledgements ix

It's Good to See You! xi

Part I Mapping the Pyramid

1 The Testing Pyramid 3

It Was Beautiful 3

The Wheels on the Bus 4

Three Hard Lessons Learned 5

Enter the Testing Pyramid 5

UI Tests 8

Integration Tests 8

Unit Tests 9

Rules of Thumb 9

Who's Writing These Things 13

What We've Learned So Far 17

2 Smoking User Interface Tests 19

Another Botched Release 20

Enter the User Interface Test 20

How They Work 26

HTML Is for Asserting 26

CSS Is for Selecting 27

What We've Learned So Far 30

3 Adding UI Tests to Legacy Systems 31

Step 1 Confirm You're on the Right Test Page 32

Step 2 Figure Out Your CSS Selectors 33

Step 3 Make Your Assertions 42

What We've Learned So Far 48

4 Connecting the Dots with Integration Tests 51

There Is No UI 52

Enter the Integration Test 52

How the Web Works 54

Talking HTTP 56

Taking a REST 62

What We've Learned So Far 64

5 Integration Testing RESTful Web Services 65

Testing the RESTful Permit API 66

HTTP GET 67

HTTP POST 70

HTTP PUT 73

HTTP DELETE 74

What We've Learned So Far 74

6 Covering Our Bases with Unit Tests 77

Everything Is Awesome! 78

The Challenge with UI Tests 78

Enter the Unit Test 81

How They Work 83

Turning It Up 89

What We've Learned So Far 94

7 Unit Testing in the Browser with JavaScript 97

Magic in the Browser 98

JavaScript and the Pyramid 102

Bug Hunt 104

Step 1 Scan the HTML 105

Step 2 Check the JavaScript 108

Step 3 Write the Tests 111

Static vs. Dynamic Typing 118

Open Mic 119

What We've Learned So Far 121

8 Climbing the Pyramid 123

The Pyramid in Action 123

Start with the Unit Tests 124

Step Up to the Integration Tests 125

Reach for the UI Tests 126

The Inverted Pyramid 127

How to Deal with Flaky Tests 130

What We've Learned So Far 132

Part II Exploring the Pyramid

9 Programming 101 137

The Mechanics of Programming 138

The Importance of Style 141

Naming 141

Spacing 142

Dealing with Duplication 145

Playing the Game 148

Step 1 Fix the Spacing 150

Step 2 Choose Good Names 150

Step 3 Tackle Duplication in the Class 151

Step 4 Remove Duplication in the Test 155

What We've Learned So Far 158

10 Organizing Tests: Bringing Method to the Madness 161

The Land of Confusion 162

The Beauty of Isolation 163

The Clarity of Context 168

Intruder Alert 174

What We've Learned So Far 176

11 Effective Mocking 177

Listen to the Music 178

Enter the Mock 179

Step 1 Prepare the Mock 180

Step 2 Set Expectations 182

The Shackles of Coupling 185

The Swamp of Mocking 187

Ports and Adapters 189

Open Mic 193

What We've Learned So Far 196

12 Writing Tests First 197

Where to Begin 198

What Is Test-Driven Development (TDD)? 200

Step 1 Write a Failing Test 201

Step 2 Make the Test Pass 201

Step 3 Refactor 201

Advantages of Working This Way 202

Seeing It in Action 203

Cycle, Rinse, Repeat 209

Open Mic 218

What We've Learned So Far 221

Final Words 221

A1 CSS Cheat Sheet 223

A2 Google Chrome Developer Tools 225

Bibliography 229

Index 231

From the B&N Reads Blog

Customer Reviews