"Test Driven Development of Web Applications" -- the book exists, and is available on Early Release

Front cover of book

I can't quite believe this is actually happening, but I have not only signed a contract with O'Reilly, but i have actually written the first four chapters, or at least a first draft of the first four chapters!

For anyone new, the idea is to provide an introduction to TDD for web app development, for beginners -- whether it's people who've never done web development and Django before, or just people who've never done TDD.

I'm releasing the book as early as possible to try and gather feedback, so please, please do get yourself a copy, and tell me what I'm doing right and wrong! What would you change? Am I pitching it at the right level? Is the pace right or wrong? Should I spend more or less time on explaining the basics of Django, more or less time on the basics of TDD, more or less time with detailed examples?

Here's the book on the O'Reilly Early Release program:

Buying direct from O'Reilly is probably the best option, they have DRM-free versions you can download in all sorts of formats (MOBI/epub/pdf)...

Alternatively, if you have an account on Safari, you can

Remember, this is an early draft, so expect the occasional rough edges... But I really, really want your feedback folks, so do let me know what you think -- here in the comments, in the comments on either site, or just by email to .

Thanks to everyone for your kind words of support, and thanks in advance for your help!

[update] -- in case it's not clear: if you buy this book now, either via O'Reilly or via Safari, you'll get updates from now on, as each new chapter is released, until the final version is released and you get the full copy. Anyone that provides feedback is totes getting a credit in the final book!

[update 2] -- naturally I assume you're all more than keen to pay for this book, but just as a matter of principle, there will be a Creative Commons, "try-before-you-buy", free version of the early drafts, released sometime in the near future. The final version of the book will also have a Creative Commons (NC-ND) digital version released on publication. And after 10 years, it will automatically revert to CC-0 Public Domain. But I (and my publishers) very much appreciate every single early sale!

[update 3] -- follow me on twitter or sign up for this blog's updates to find out more about progress with the book, including when the CC version comes out... And, just let me know you're interested!

View full article and comments

Meta

Published: March 26, 2013

Author: harry

Comments:  

Word Count: 438

Previous: The next stage: writing a book

Tags

book, buy early it now release, tdd test

Article Links


The next stage: writing a book

I've decided to try and develop this tutorial into an actual book on test-driven development for web apps. Have a look at the chapter outline I've posted as part 6:

https://tdd-django-tutorial.com/tutorial/6/

I'd love to hear what you think! Am I completely mad?

View full article and comments

Meta

Published: Jan. 28, 2013

Author: harry

Comments:  

Word Count: 42

Next: "Test Driven Development of Web Applications" -- the book exists, and is available on Early Release

Previous: Common problems with Selenium: cannot find elements due to page not loading fast enough

Tags

tdd test

Article Links

  1. Obey the Testing Goat!

Common problems with Selenium: cannot find elements due to page not loading fast enough

(With massive apologies to everyone that attended my talk, I totally failed to teach the ``implicitly_wait`` api correctly, how embarassing!)

You may occasionally see errors like this:

AttributeError: 'NoneType' object has no attribute 'text'

In this case, I was trying to look at body.text to check whether a page contained some text. What goes wrong is that, sometimes, selenium tries to look at the page before it's finished loading. Thankfully, there's a solution: the implicitly_wait function

It should be called like this:

self.browser.implicitly_wait(3)

where self.browser is a webdriver instance, the implicitly_wait is a function call (not an attribute!). The parameter is in seconds.

Once you've set that, selenium will automatically keep polling for up to 3 seconds, if it can't find a DOM element you're asking for.

More info at:

http://seleniumhq.org/docs/04_webdriver_advanced.html

View full article and comments

Meta

Published: July 9, 2012

Author: harry

Comments:  

Word Count: 125

Next: The next stage: writing a book

Previous: Tutorial discussion on Hacker News

Tags

None

Article Links

  1. WebDriver: Advanced Usage — Selenium Documentation

Tutorial discussion on Hacker News

someone submitted me to HN - thanks!

Some interesting discussions on there. And a justly deserved kick up the a*se for needing to make the site look more attractive!

https://news.ycombinator.com/item?id=3996328

View full article and comments

Meta

Published: May 21, 2012

Author: harry

Comments:  

Word Count: 29

Next: Common problems with Selenium: cannot find elements due to page not loading fast enough

Previous: The difference between mocking and stubbing

Tags

None


The difference between mocking and stubbing

Apparently, there is one! Here's one of the original TDDers talking about it:

http://martinfowler.com/articles/mocksArentStubs.html

View full article and comments

Meta

Published: April 29, 2012

Author: harry

Comments:  

Word Count: 14

Next: Tutorial discussion on Hacker News

Previous: Tutorials updated to django 1.4, and its weird new folder structure

Tags

mock tdd

Article Links

  1. Mocks Aren't Stubs