Test Automation
From unit tests and test-driven development to browser automation, API and data pipeline testing, performance and load testing, delivery pipelines and testing agents, test automation as told through the free samples of the Leanpub books about it.
Created from the free samples of 13 Leanpub books and the descriptions and tables of contents of 23 more, with every source cited.
Test automation is the practice of checking software with other software: tests are written as programs, run by machines, and repeated on every change. One book on the groundwork takes the dictionary sense of automation, making a machine or a system work without direct human control, and observes that this is simply what programming is; to automate a test one must therefore know two things, how the process under test operates, which is a matter of testing, and how to make a machine repeat a person's actions, which is a matter of programming.[3]
The books divide by the level at which the checking is done. Developers write unit tests beside their code, and one author argues that the real reason for doing so is none of the usual ones, quality or documentation or design, but shipping value faster.[2] Testers and developers drive a whole application through its interface, where an experienced writer says that teams repeatedly end up with suites that either run reliably and validate little or check everything and report false failures.[5] Others measure behaviour under load, check interfaces and flows of data, or assemble all of these into the pipeline through which software is delivered.[6][29]
This article covers where to begin, the history, the reasons and the groundwork, unit tests and test-driven development, end-to-end and browser automation, interfaces, data and the cloud, performance and load testing, pipelines and process, and testing agents. Its sources are the free samples of the Leanpub books listed at the end, with the descriptions and tables of contents of the books whose samples were not available, and every claim that rests on a source is cited to it.
Where to start
Before any tool, Before The Code: First Steps to Automation in Testing (2021) is a short book on what has to be settled first, independent of tools,[3] and Implementing Test Automation (2019) surveys the choices.[32] The adjacent Effective Testing in Agile/Scrum: Methodology and Strategy (2025), the most widely sold book in the extract, places automation within the work of an agile team.[33]
Developers should choose by language. For Ruby there is Everyday Rails Testing with RSpec, the most widely sold of the core books, with Testing Rails from Scratch from the same author for the framework's built-in tools;[1][19] for Java, Practical Unit Testing with JUnit and Mockito - 2nd edition (2019), Testing Spring Boot Applications Demystified and Java Testing Toolbox (2025);[20][21][23] for Python, Testing in Python (2020);[17] for PHP, The Grumpy Programmer's Guide To Testing PHP Applications (2020);[24] and for the JavaScript front end, Outside-In React Development (2022).[7] Writing Maintainable Unit Tests (2023) is for experienced developers in any of them.[2]
For tests through the browser, Web Test Automation in Action: Volume 1 is a set of exercises that has been tried on complete novices,[12] and The Web App Testing Guidebook (2023) builds a suite round a realistic application.[5] Testers new to performance work have The Performance Testing Handbook (2023),[28] and anyone about to start an automation effort can read How to Fail Your Test Automaton (easily!) (2025) first.[31]
History
Commercial tools that recorded a tester's actions on a graphical interface and played them back were sold from the late 1980s, and were notorious for scripts that broke whenever the interface changed. The developer's side of the practice began in the 1990s with small frameworks for unit tests, soon ported to every language, and with test-driven development, in which a failing test is written before the code that makes it pass. Open-source libraries for driving a browser appeared from 2004 and one of them became a web standard. Continuous integration made it normal to run every test on every change, and the image of a pyramid, many unit tests under fewer tests of services and fewer still of the interface, became the usual advice on proportions.
Several authors lived through this. The author of Before The Code: First Steps to Automation in Testing has more than twenty-five years with testing tools, beginning with one for an operating system that then lost its market, followed by a decade of tools for graphical interfaces on personal computers.[3] Writing Maintainable Unit Tests opens with a story set in the middle of the 1990s, before the practices of extreme programming were known.[2] The author of Everyday Rails Testing with RSpec recalls that early books on the framework prized speed of development and left testing, if they covered it, to a chapter near the end,[1] and the foreword to Master Apache JMeter From load testing to DevOps. records an open-source load testing tool overtaking the commercial leader, by the measures of documents and job advertisements, by 2018.[6] Selenium 4 A Quick and Practical Guide (2021) was written while a new major version of the standard browser library was in beta,[26] and Agentic Testing Architectures: Building Autonomous QA Systems asserts that by the middle of 2026 testing by autonomous agents had become a mainstream discipline.[10]
Reasons and groundwork
Writing Maintainable Unit Tests makes its case with a story. A developer without automated tests is given a feature, designs it, writes hundreds of lines in a few days and feels productive. The work is done, but not really done: there are compiler warnings, and fixing one means changing the design. Then the program crashes at start-up, and hours of debugging trace it to a small change made and forgotten. Then the feature has to be walked through by hand, which finds subtler faults; a manager asks whether it will be ready for a trade show; and with two days left it goes to the testers. Each time the developer is done, and not really done. Tests, on this argument, are what make it possible to know.[2]
Before The Code: First Steps to Automation in Testing is about everything that precedes the code. Automation is among the most discussed subjects in testing, it says, because the industry is pressed to deliver faster, and what distinguishes the book is its attention to the work of implementing and maintaining automation and its refusal to be tied to a tool. Its material comes from work as tester, lead and manager, as employee and as consultant, and it describes the testing half of the necessary knowledge as knowing how to prove something by logic and scientific method.[3] Implementing Test Automation likewise lays out strategies and kinds of tool and concludes that there is no single solution.[32] Modern Manual Software Testing: Embracing the Oxymoron (2024) treats the modernising of manual tests as a first step, using one feature of an application as a case study and building a small language in which its tests are written.[30] How to Fail Your Test Automaton (easily!) collects more than sixty lessons from failed efforts, most of which the author admits to having made personally, offered as a mirror and not as blame.[31]
Unit tests and test-driven development
Everyday Rails Testing with RSpec is addressed to developers who do not test, and names their reasons: tests seem extra work, there is no time, or testing has always meant clicking links in a browser. Its author, a self-taught developer of web applications since 1995, has two goals. The first is a consistent strategy, because tests that are unreliable or not meaningful give no confidence, and confidence is the point: being able to change code knowing that the suite will report anything broken. The second is ease with the part of a large testing framework that is used daily, about a fifth of it for four fifths of the work. The framework was chosen for specifications readable enough that, with a little coaching, people who are not programmers can follow them.[1] Testing Rails from Scratch does the same with the tools the web framework includes, and adds a new question, how to be sure that code generated by a model works as intended.[19]
Writing Maintainable Unit Tests assumes the habit and concerns its upkeep. After a chapter on the kinds of automated test it applies design principles to tests, describes their anatomy, and gives its longest chapter to keeping tests decoupled from the code they exercise, so that they do not obstruct change.[2] Outside-In React Development brings to front-end development a form of test-driven development that starts from an end-to-end test of a feature and works inwards to unit tests of components, which the author says yields tests that cover an application thoroughly while remaining loosely coupled to it; its first part explains the agile practices from which the method comes. It is written for front-end developers new to testing as well as for those who test already, and holds that end-to-end tests add a different kind of coverage and keep a developer from building, test first, things that no feature needs.[7]
The Java books are the most numerous. Practical Unit Testing with JUnit and Mockito - 2nd edition covers substitutes for real collaborators, parameterised tests and matchers, with stress on readable tests and testable code;[20] Testing Spring Boot Applications Demystified addresses developers who struggle with configuration and with the imitation of external services in the dominant application framework, and has a companion in Testing Spring Boot Applications Masterclass Workbook;[21][22] Java Testing Toolbox describes about thirty tools and libraries with their uses;[23] and Test-Driven Development, Build Automation, Continuous Integration goes from unit tests to automated builds.[18] Elsewhere, The Grumpy Programmer's Guide To Testing PHP Applications distils sixteen years of advice on testing PHP whatever the framework,[24] Testing in Python introduces the usual runner and its fixtures,[17] Unit Testing con Jest y Testing Library en Angular (2025) is a guide in Spanish to unit tests for one front-end framework,[25] and Property-Based Testing in a Screencast Editor (2019) applies tests with generated inputs to a real graphical application.[13]
End-to-end and browser automation
The Web App Testing Guidebook was written after its author had taught one browser automation framework in detail and been left with a doubt, whether knowing a tool is enough: a painter needs more than the mixing of colours. The book therefore teaches how the commands are combined into a suite that is worth having, on examples from realistic situations. It defends testing through the interface on the ground that there is no choice. Everyone who loads a page and presses a button is testing the interface already, and a site that is not to be broken cannot skip it. The author grants that unit, integration, performance, accessibility and usability tests matter as much or more, and that the ideal of a suite so effective that a team need only keep it up to date is not the reality most teams reach.[5]
End-to-end Test Automation Anti-Patterns is a catalogue of what goes wrong, from an author who took up the practice in 2005 and notes that it is rarely taught in universities, so that misconceptions abound. Its preface retells another writer's account of visiting team after team and being shown a machine in a corner with an expensive tool installed and an empty chair, whose scripts fall over when run. The entries are grouped: general practices, such as recording and playing back; scripting, such as tests that depend on one another, suites that take too long, and an excess of low-value tests of unusual paths; execution, such as assuming that a test once written will go on passing, and running the whole suite only overnight; and leadership, such as liking the idea without committing time to stabilising and maintaining the tests. Others concern interfaces, where the fault is a fixation on graphical clients; mobile applications, where it is attempting automation there before succeeding on the web; and performance testing done too late and too seldom. Several entries are deliberately contrary to common advice, and the book ends with the author's own strategy in thirty-five words.[4]
Web Test Automation in Action: Volume 1 has fourteen short exercises, most of them on a site for booking flights and each solved in two frameworks, and grew from an experiment in training people with no background in software; an appendix compares the two frameworks and recommends being able to work in both.[12] Selenium 4 A Quick and Practical Guide and Practical End 2 End Testing with CodeceptJS (2020) are short guides to particular tools, the second taking its tests from a developer's machine to a hosted browser service, a pipeline and parallel execution.[26][27] Mastering Android Screenshot Testing covers a different kind of check for mobile applications: a reference image of a screen is recorded, every run captures the screen again and compares, and any visual change, intended or not, is reported. It complements functional tests, which verify behaviour and cannot verify appearance, and the book asks when it should and should not be used, what should be verified, which tools exist and how the checks fit into a delivery pipeline, with attention to the variety of devices and system versions that make the platform hard.[9]
Interfaces, data and the cloud
API Testing Fundamentals: Postman to Pytest teaches the testing of programming interfaces from exploration by hand to automated suites, on the rule that an interface should be understood before its tests are automated; its chapters go on to the validation of responses beyond their status codes, authentication, errors and limits, and versioning, with fifty exercises.[11] Modern Data Pipelines Testing Techniques (2023) is a visual guide to the testing of data pipelines, in short sections each stating a problem, its complications and guidance. It begins with the observation that newcomers do not realise that pipelines fail transitively, and learn it by months of asking whether a number is correct and why a dashboard has not been updated. Later chapters cover legacy pipelines, starting with tests that characterise the whole before anything is touched, design for testability, what a developer can do from a single machine, deployment and changes of schema, the ways of organising a company that help or hinder the testing of its data, and even when to give up.[8] Testing in the Sky a Guide to Cloud QA Excellence (2025), widely sold, is a handbook on quality assurance for applications on the large cloud platforms: environments for tests defined as code, automation within the delivery pipeline, functional, load, security and data testing, and the particular concerns of cost and resilience.[15]
Performance and load testing
Performance tests measure how fast a system responds, and load tests how it behaves as the number of simultaneous users rises. Master Apache JMeter From load testing to DevOps. is a guide to the most used open-source tool, written by contributors to it. Its foreword notes that the tool's scripts have become a standard on which hosted services are built, that the tool is not trivial, offering many ways of doing each thing, and that most of what is written about it online is for beginners; the book supplies a framework of knowledge and may be too condensed for a complete novice.[6] Practical Performance and Load Testing takes another route, measuring performance with automated tests that drive a real browser and running them continuously, with chapters on the plan for each kind of test, on the choice between recording a script and writing it by hand, on the number of simulated users required and on criteria of success.[14] The Performance Testing Handbook introduces the concepts and method to testers meeting them for the first time,[28] and AI Performance Engineering is an account, by the builder of the platform it describes, of agents that write, check and repair the scripts of load tests.[16]
Pipelines and process
Automated tests earn their keep when they run without being asked. Continuous Delivery Pipelines (2025), widely sold, is a handbook on building and improving the deployment pipeline, the automated path from a change to a release, by the originator of the idea according to its description.[29] The adjacent Effective Testing in Agile/Scrum: Methodology and Strategy has a chapter on automation in agile teams, on choosing tools, preparing infrastructure, integrating with the pipeline and setting priorities within a sprint.[33] The Software Developers’ Guidebook (2025) gives its largest part to test-driven development and its relatives,[34] Testing Like a Senior: Patterns & Anti-Patterns Across Software QA Career Levels sets out patterns and anti-patterns by level of career,[35] and Ultimate Productivity Toolkit (2021) is a directory of several hundred tools for testers.[36]
Testing agents
The newest books concern language models. Agentic Testing Architectures: Building Autonomous QA Systems is on building agents that observe an application, reason, act and evaluate, from the basic loop through systems of several agents to the safeguards and costs of running them, and on the converse problem of testing software that is itself made of agents. It is written for test engineers who want to move beyond scripts, for architects of test infrastructure and for managers deciding whether the approach suits their teams, and expects intermediate programming and a basic acquaintance with the models.[10] End-to-end Test Automation Anti-Patterns is sceptical: its last group of entries includes the belief that such automation is good enough, the generation of many scenarios, slow execution and unnoticed cost.[4]
Questions about Test Automation
Which test automation book should I start with?
Before any tool, Before The Code: First Steps to Automation in Testing (2021) is a short book on what has to be settled first, independent of tools.[3] Developers should choose by language: Everyday Rails Testing with RSpec for Ruby, Practical Unit Testing with JUnit and Mockito - 2nd edition (2019) for Java, Testing in Python (2020) for Python and The Grumpy Programmer's Guide To Testing PHP Applications (2020) for PHP.[1][20][17][24] For tests through the browser, Web Test Automation in Action: Volume 1 is a set of exercises that has been tried on complete novices.[12]
What is test automation?
Test automation is the practice of checking software with other software: tests are written as programs, run by machines, and repeated on every change. Before The Code: First Steps to Automation in Testing (2021) takes the dictionary sense of automation, making a machine or a system work without direct human control, and observes that this is simply what programming is.[3] To automate a test one must therefore know two things, how the process under test operates, which is a matter of testing, and how to make a machine repeat a person's actions, which is a matter of programming.[3]
Why should developers write unit tests?
The author of Writing Maintainable Unit Tests (2023) argues that the real reason is none of the usual ones, quality or documentation or design, but shipping value faster.[2] The book makes its case with the story of a developer without automated tests who is repeatedly done and not really done, as compiler warnings, a crash at start-up and faults found by walking through the feature by hand each reopen the work.[2] Tests, on this argument, are what make it possible to know.[2]
What are the common mistakes in end-to-end test automation?
End-to-end Test Automation Anti-Patterns catalogues them in groups, among them recording and playing back, tests that depend on one another, suites that take too long, and an excess of low-value tests of unusual paths.[4] Under execution it lists assuming that a test once written will go on passing and running the whole suite only overnight, and under leadership liking the idea without committing time to stabilising and maintaining the tests.[4] How to Fail Your Test Automaton (easily!) (2025) collects more than sixty lessons from failed efforts, offered as a mirror and not as blame.[31]
What is screenshot testing?
Mastering Android Screenshot Testing covers this kind of check for mobile applications: a reference image of a screen is recorded, every run captures the screen again and compares, and any visual change, intended or not, is reported.[9] It complements functional tests, which verify behaviour and cannot verify appearance.[9] The book asks when it should and should not be used, what should be verified and how the checks fit into a delivery pipeline.[9]
What is outside-in test-driven development?
Outside-In React Development (2022) describes it as a form of test-driven development that starts from an end-to-end test of a feature and works inwards to unit tests of components.[7] The author says that it yields tests that cover an application thoroughly while remaining loosely coupled to it.[7] End-to-end tests, the book holds, add a different kind of coverage and keep a developer from building, test first, things that no feature needs.[7]
Sources
Every source is a Leanpub book. The note after each says which part of it was read; where no sample was available, only the public description and table of contents were used.
- 1.Everyday Rails Testing with RSpec, Aaron Sumner: A practical approach to test-driven development Free sample: the introduction, on why the author tests and the book's two goals. 2026. Free sample: PDF · EPUB
- 2.Writing Maintainable Unit Tests, Jan Van Ryswyck: Mastering the art of loosely coupled unit tests Free sample: the outline of the chapters and the opening of chapter one. 2023. Free sample: PDF · EPUB
- 3.Before The Code: First Steps to Automation in Testing, Jim Hazen Free sample: the author's note and the introduction. 2021. Free sample: PDF
- 4.End-to-end Test Automation Anti-Patterns, Zhimin Zhan: Lessons from Real-World Test Automation Failures Free sample: the contents, which list every anti-pattern, and the preface. 2026. Free sample: PDF · EPUB
- 5.The Web App Testing Guidebook, Kevin Lamping: UI Testing of Real World Websites Using WebdriverIO Free sample: the introduction, on the book's purpose and on testing through the interface. 2023. Free sample: PDF · EPUB
- 6.Master Apache JMeter From load testing to DevOps., Antonio Gomes Rodrigues, Philippe Mouawad, Milamber: Prefaced by Alexander Podelko Free sample: the foreword. 2025. Free sample: PDF · EPUB
- 7.Outside-In React Development, Josh Justice: A TDD Primer Free sample: the introduction and the outline of the parts. 2022. Free sample: PDF · EPUB
- 8.Modern Data Pipelines Testing Techniques, Moussa Taifi: A Visual Guide Free sample: the contents and the opening of chapter one. 2023. Free sample: PDF
- 9.Mastering Android Screenshot Testing, Alex Zhukovich Free sample: the introduction, on what screenshot testing is and for whom the book is written. 2026. Free sample: PDF
- 10.Agentic Testing Architectures: Building Autonomous QA Systems, Yuri Syuganov: From Test Scripts to Autonomous Agents That Observe, Reason, and Act Free sample: the introduction. 2026. Free sample: PDF
- 11.API Testing Fundamentals: Postman to Pytest, Yuri Syuganov: From Postman Exploration to Automated REST, GraphQL, and gRPC Pipelines Free sample: the introduction and the opening of chapter one. 2026. Free sample: PDF
- 12.Web Test Automation in Action: Volume 1, Zhimin Zhan: Hands-On Exercises with Selenium WebDriver and Playwright Free sample: the contents and the preface. 2026. Free sample: PDF · EPUB
- 13.Property-Based Testing in a Screencast Editor, Oskar Wickström: Case Studies from Komposition Free sample: the preface. 2019. Free sample: PDF
- 14.Practical Performance and Load Testing, Zhimin Zhan The free sample was read for its table of contents only: otherwise from the description. 2026. Free sample: PDF · EPUB
- 15.Testing in the Sky a Guide to Cloud QA Excellence, Anatolii Tymoshchuk The free sample is a table of contents and introduction: from the contents and the description. 2025. Free sample: PDF
- 16.AI Performance Engineering, David Campbell: How Agentic AI is Transforming Load Testing The free sample is a personal foreword: from the description and table of contents. 2026. Free sample: PDF
- 17.Testing in Python, Noah Gift, Alfredo Deza The free sample is mostly placeholders: from the description and table of contents. 2020. Free sample: PDF · EPUB
- 18.Test-Driven Development, Build Automation, Continuous Integration, Lorenzo Bettini: with Java, Eclipse and friends The free sample is nearly empty: from the description and table of contents. 2026. Free sample: PDF · EPUB
- 19.Testing Rails from Scratch, Aaron Sumner: A practical, (mostly) out-of-the-box approach to test-driven development in Ruby on Rails No sample: from the description and table of contents. 2026.
- 20.Practical Unit Testing with JUnit and Mockito - 2nd edition, Tomek Kaczanowski No sample: from the description. 2019.
- 21.Testing Spring Boot Applications Demystified, Philip Riecks: Write Better Tests, Ship Faster: A Practical Guide to Spring Boot Testing No sample: from the description and table of contents. 2026.
- 22.Testing Spring Boot Applications Masterclass Workbook, Philip Riecks: Achieve Confidence in Every Commit No sample: from the description and table of contents. 2026.
- 23.Java Testing Toolbox, Philip Riecks: 30 Testing Tools and Libraries Every Java Developer Must Know No sample: from the description and table of contents. 2025.
- 24.The Grumpy Programmer's Guide To Testing PHP Applications, Chris Hartjes: 16 years of testing advice to help you learn to test your PHP code no matter what framework you use No sample: from the description and table of contents. 2020.
- 25.Unit Testing con Jest y Testing Library en Angular, Bezael Pérez No sample: from the description of a book in Spanish. 2025.
- 26.Selenium 4 A Quick and Practical Guide, Aditya Garg, Pallavi Sharma: Selenium 4 Practical Guide No sample: from the description. 2021.
- 27.Practical End 2 End Testing with CodeceptJS, Paul Vincent Beigang: A "hands on" approach on modern test automation for the web. No sample: from the description and table of contents. 2020.
- 28.The Performance Testing Handbook, Mohamed Tarek: A practical guide No sample: from the description and table of contents. 2023.
- 29.Continuous Delivery Pipelines, Dave Farley: How to Build Better Software Faster No sample: from the description and table of contents. 2025.
- 30.Modern Manual Software Testing: Embracing the Oxymoron, Jay Graham: A Short Step to Long-Term Quality No sample: from the description and table of contents. 2024.
- 31.How to Fail Your Test Automaton (easily!), Masoud Bahrami: 60+ Lessons I’ve Learned (and Unlearned) from Failed Test Automation No sample: from the description. 2025.
- 32.Implementing Test Automation, M.M. Siteur No sample: from the description and table of contents. 2019.
- 33.Effective Testing in Agile/Scrum: Methodology and Strategy, Anatolii Tymoshchuk The free sample is a table of contents and introduction: from the contents and the description. 2025. Free sample: PDF
- 34.The Software Developers’ Guidebook, David Farley, Bernard McCarty (Editor): A Collection of Modern Engineering Practices No sample: from the description and table of contents. 2025.
- 35.Testing Like a Senior: Patterns & Anti-Patterns Across Software QA Career Levels, Yuri Syuganov: The QA Engineer's Field Manual The free sample was not used: from the description and table of contents. 2026. Free sample: PDF
- 36.Ultimate Productivity Toolkit, Rahul Parwal, Ajay Balamurugadas: 365+ Resources to be a Super Productive Tester The free sample was not used: from the description. 2021. Free sample: PDF
Further reading
Other books and courses in the library on neighbouring ground, not cited above.
- Logic for Programmers, Hillel Wayne Logic for working programmers, applied to the specification and checking of software. 2026. Free sample: PDF
- Designing Evals for Agentic Systems, Rhys Fisher: A Practitioner's Field Guide A method for designing the evaluation of systems built from language model agents. 2026.
- Hands-On Mobile App Testing, Daniel Knott: A GUIDE FOR SOFTWARE TESTERS AND ANYONE INVOLVED IN THE MOBILE APP BUSINESS A guide to testing mobile applications for testers, developers and product managers. 2022.
- The Quality Coach's Handbook, Anne-Marie Charrett: Mastering the Quality Coach Role in Organisations A handbook on the role of the quality coach. 2025.
- Starting Your Software Testing Career, Nicola Lindgren: A guide to finding your first role as a Software Tester, upskilling so you are relevant in the job market and succeeding as a Software Tester once you have landed a role. Finding a first job as a software tester and doing well in it. 2024. Free sample: PDF · EPUB
- ACT 2 LEAD, Marko Rytkönen, Kari Kakkonen: Software Testing Leadership Handbook Questions and answers on testing and test leadership for managers and teams. 2025. Free sample: PDF
- Testing Stories, Melissa Fisher An anthology of stories from software testers round the world. 2021.
- Bug Advocacy, Rahul Parwal, Khushboo: Mindmap & Text Summary on Bug Advocacy Course by: Cem Kaner & James Bach Summaries in mind maps of course material on reporting defects persuasively. 2022. Free sample: PDF