H
Harry Percival
obeythetestinggoat.com · Personal blog · on HN since 2013
Harry Percival writes about test-driven development in Python and Django, and is the author of the 'Testing Goat' book.
What HN saysCommenters repeatedly recommend his free TDD book as a great, funny, practical introduction to testing, even for people outside Python and Django.
28HN people shared it
20linked it in comments
9stories submitted
269story points
7 months agolast shared
2013people per year2026
Most-shared posts
- 1Obey the Testing Goat12 people · 1 points · first shared 2015 · discussion on HN
- 2Test-Driven Web Development with Python – The Book9 people · 262 points · first shared 2017 · 42 comments on HN
- 3Chapter purist unit tests2 people · first shared 2018
- 4Chapter philosophy and refactoring2 people · first shared 2018
- 5Obey the Testing Goat: Plans for the Second Edition1 people · 2 points · first shared 2016 · discussion on HN
- 6Cosmic Python1 people · 2 points · first shared 2020 · discussion on HN
- 7Fast tests are useless1 people · 1 points · first shared 2013 · 1 comments on HN
- 8TDD for the Web, with Python, Selenium, Django, JavaScript and Pals – 2nd Ed Out1 people · 1 points · first shared 2017 · discussion on HN
- 9Tdd workshop.zip1 people · first shared 2015
- 10Chapter hot lava1 people · first shared 2018
- 11Preface1 people · first shared 2017
- 12Appendix bdd1 people · first shared 2018
- 13Book1 people · first shared 2018
- 14Chapter mocking1 people · first shared 2019
What HN people wrote when they linked it
serial_dev · 2022-04-26
Another great resource that influenced my thinking on TDD even outside Python is the "testing goat" book (aka "Test-Driven Development with Python" by Harry Percival) https://www.obeythetestinggoat.com/
ctippett · 2021-09-10
I can highly recommend Test-Driven Development with Python[0]. The book has you build and deploy a web application, with emphasis on writing tests at each stage of development. The author has a great sense of humour and the whole book is a fun read-through.
[0] https://www.obeythetestinggoat.com/
jamesliudotcc · 2026-04-01
There is this free book, https://www.obeythetestinggoat.com/, which is also available in print for O'Reilly.
Manning has https://www.manning.com/books/unit-testing.
afarrell · 2021-05-22
Automated tests.
The books by Harry Percival on this are good.
https://www.obeythetestinggoat.com/
moksly · 2020-08-28
I’d recommend you stop, but if you’re really going to go through with it. One of the best resources is the testing goat book. It’s tool specific (django/python) but it’s so good I think it’s worth it just to get into the subject.
https://www.obeythetestinggoat.com/pages/book.html#toc
sn9 · 2019-05-15
My recommended route: Harvard's CS50x on edx -> Think Python 2ed -> https://www.obeythetestinggoat.com/pages/book.html#toc
You don't need to take CS50, but it's the probably the best introduction to programming available online and will give you a strong foundation that will make the later books easier to work through.
bah0 · 2017-12-12
If you want to have a nice introduction into Django with web, a great place to start ist the open source book:
Test Driven Development with Python
https://www.obeythetestinggoat.com/book/preface.html
larc · 2017-04-28
Obey the Testing Goat (http://www.obeythetestinggoat.com/) will take you through creating a small web app (python/django) using test driven development. The language choice may not match up with what you're using, but the concepts are useful across many domains. This book made a huge impact in how I think about writing tests, and in turn how I think about writing code.
sdfin · 2017-03-28
I think this is the link for the site of the last edition of the 2nd book you mention http://www.obeythetestinggoat.com/
yhoiseth · 2017-02-25
I'd suggest http://www.obeythetestinggoat.com/ if you're looking to use Python for web development.
felipegalvao · 2017-02-21
Obey The Testing Goat is good. It follows TDD and is pretty complete
http://www.obeythetestinggoat.com/pages/book.html#toc
mcbetz · 2015-04-10
The script is available on his website - http://www.obeythetestinggoat.com/static/tdd-workshop.zip
The great book on the same topic can be read online as well - http://chimera.labs.oreilly.com/books/1234000000754/index.html
hjwp3 · 2015-05-06
http://www.obeythetestinggoat.com/ for the curious...
gt565k · 2015-04-10
Let me weigh in here. I've worked with Rails, ported a php application to Django, currently working with Spring MVC and Angular JS.
PHP is a scripting language, Django is a framework. I think you are comparing 2 different things.
If you want to get into web development, there are 2 major concepts/skills you need to get down. First, understanding of MVC, or "MTV"[0], as in Django's case, or whatever other variation of said design pattern (MVP, MVVC, etc..). Second, writing and consuming REST APIs. The frameworks will handle or at least guide you through the rest. CSS, HTML, and JS will help you with the front end, but I think as someone who works in ops, you'd be more comfortable establishing a solid back-end first. You can always bootstrap the front-end.
Personally, I try to stay away from anything PHP based. I don't think anyone in their right mind would start a new project with a PHP stack. Frameworks like Django, Rails, and other JS frameworks are much more mature, in terms of utility, than anything you'll find in PHP.
Since you already have experience with it, it would be fairly easy to work with Django after running through a few tutorials.
IMO if you go the PHP route, you'll get stuck with old technologies, as in your job prospects would involve maintaining legacy php apps. I haven't heard of anyone starting a new project with PHP.
A developer should be concerned with building applications to meet requirements, writing and consuming REST APIs, and implementing…
sss111 · 2021-07-28
1. Introduction to Software Testing: https://cs.gmu.edu/~offutt/softwaretest/
2. Obey the testing goat online book: http://www.obeythetestinggoat.com/
3. Neal Ford on test driven design (Requires a oreilly subscription): https://www.oreilly.com/library/view/neal-ford-on/9781449314439/ Here's the free PDF of the slides though, https://github.com/nealford/presentations/blob/master/Test%20Driven%20…
Threads on if(why) testing is overrated:
https://news.ycombinator.com/item?id=23778878
https://news.ycombinator.com/item?id=20309815
Xunjin · 2021-06-01
Harry Percival, famous by "Obey the Goat" also his new book "Cosmic Python" this guy is a genius at teaching :) both books available at the respective sites
https://www.obeythetestinggoat.com/pages/book.html#toc
http://www.cosmicpython.com/
If you feel that TDD is too much there is a book about pytest, tho never really focused on it.
Hope it helps,
PS: Ty Harry :)
olah_1 · 2019-08-16
Probably Test-Driven Development with Python.
http://www.obeythetestinggoat.com/pages/book.html
a_c · 2019-05-14
It depends on your background. Having written web app before let's you quick grasp the ideas laid in the book.
To me, the most important chapters are
- https://www.obeythetestinggoat.com/book/chapter_mocking.html
- https://www.obeythetestinggoat.com/book/chapter_purist_unit_tests.html
Having said that, the concepts are universal.
projektfu · 2018-06-28
https://www.obeythetestinggoat.com/book/chapter_philosophy_and_refacto…
That might be a better link to the same material.
teddyh · 2018-06-28
See for yourself:
https://www.obeythetestinggoat.com/book/chapter_philosophy_and_refacto…