Test-Driven Development with Python
Obey the Testing Goat: Using Django, Selenium, and JavaScript
Publisher: O'Reilly Media
Final Release Date: June 2014
Pages: 480

By taking you through the development of a real web application from beginning to end, this hands-on guide demonstrates the practical advantages of test-driven development (TDD) with Python. You’ll learn how to write and run tests before building each part of your app, and then develop the minimum amount of code required to pass those tests. The result? Clean code that works.

In the process, you’ll learn the basics of Django, Selenium, Git, jQuery, and Mock, along with current web development techniques. If you’re ready to take your Python skills to the next level, this book clearly demonstrates how TDD encourages simple designs and inspires confidence.

  • Dive into the TDD workflow, including the unit test/code cycle and refactoring
  • Use unit tests for classes and functions, and functional tests for user interactions within the browser
  • Learn when and how to use mock objects, and the pros and cons of isolated vs. integrated tests
  • Test and automate your deployments with a staging server
  • Apply tests to the third-party plugins you integrate into your site
  • Use a Continuous Integration environment to run your tests automatically
Product Details
About the Author
Colophon
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyTest-Driven Development with Python
 
4.4

(based on 21 reviews)

Ratings Distribution

  • 5 Stars

     

    (12)

  • 4 Stars

     

    (7)

  • 3 Stars

     

    (1)

  • 2 Stars

     

    (1)

  • 1 Stars

     

    (0)

90%

of respondents would recommend this to a friend.

Pros

  • Easy to understand (17)
  • Helpful examples (17)
  • Well-written (13)
  • Accurate (8)
  • Concise (7)

Cons

    Best Uses

    • Intermediate (14)
    • Novice (13)
    • Student (10)
      • Reviewer Profile:
      • Developer (18), Designer (3), Sys admin (3)

    Reviewed by 21 customers

    Sort by

    Displaying reviews 1-10

    Back to top

    Previous | Next »

    (4 of 4 customers found this review helpful)

     
    5.0

    not only about py, bdd, tdd

    By lascar

    from madrid

    About Me Developer

    Verified Reviewer

    Pros

    • Accurate
    • Concise
    • Easy to understand
    • Helpful examples
    • Well-written

    Cons

      Best Uses

      • Intermediate
      • Novice
      • Student

      Comments about oreilly Test-Driven Development with Python:

      it is not only about testing py, it's about what to test, how and in which context.
      you have to read it!
      No matter your level. It's about writing good sofware.

       
      5.0

      Great introduction to TDD & Django

      By troybetz

      from Austin, Texas

      About Me Designer, Developer, Maker

      Verified Reviewer

      Pros

      • Concise
      • Easy to understand
      • Helpful examples
      • Well-written

      Cons

        Best Uses

        • Intermediate

        Comments about oreilly Test-Driven Development with Python:

        I've been putting off picking up Django for a while now, but this book changed all of that. Great introduction to Django, and TDD if you're not already into it.

        (2 of 2 customers found this review helpful)

         
        4.0

        a great book but can be better

        By Tholapz

        from Los Angeles,CA

        About Me Developer, Educator, Maker

        Verified Buyer

        Pros

        • Accurate
        • Concise
        • Easy to understand
        • Helpful examples
        • Well-written

        Cons

        • Too basic

        Best Uses

        • Expert
        • Intermediate
        • Novice
        • Student

        Comments about oreilly Test-Driven Development with Python:

        A great book full of detailed information I need to develop my mindset for TDD. It would be nice however, if there is a cheat sheet page that list all of the useful commands, procedures, or tips for references.

        (3 of 3 customers found this review helpful)

         
        5.0

        Great book on TDD, Django Dev, and more!

        By Sceva

        from Omaha, NE

        About Me Developer

        Verified Buyer

        Pros

        • Accurate
        • Easy to understand
        • Helpful examples
        • Well-written

        Cons

          Best Uses

          • Intermediate
          • Student

          Comments about oreilly Test-Driven Development with Python:

          I have been learning Python and Django for a web application, and had been frustrated trying to learn how to include testing. TDD, Selenium, models, views, controllers, html, JavaScript, ... all of these together were overwhelming me. Harry's book does a great job introducing all these concepts and more. His minimalist style (YAGNI) has been illuminating also. Did I mention that the code in the book has no errors - the most accurate programming book I have ever read.

           
          5.0

          Best web developement book I've read

          By Jarmelias

          from Helsinki, Finland

          About Me Developer

          Verified Buyer

          Pros

          • Easy to understand
          • Helpful examples
          • Well-written

          Cons

            Best Uses

            • Intermediate
            • Novice
            • Student

            Comments about oreilly Test-Driven Development with Python:

            Simply great book that guides you through the entire process of creating web applications. Also serves as a great introduction to test driven developement.

            (4 of 4 customers found this review helpful)

             
            5.0

            This is how it should be done.

            By Oddcog

            from Netherlands

            Verified Reviewer

            Pros

            • Easy to understand
            • Helpful examples
            • Well-written

            Cons

              Best Uses

              • Novice

              Comments about oreilly Test-Driven Development with Python:

              For me, this is technical exposition at its best, with an informal and engaging tone, good organization structured around a project, and clear sentences. The rate of information delivery and the level of detail is perfect for a beginner. The author takes care over little details, such as which directory files should be created in, which other writers often neglect. I have tried other books on Django and had to give up on them because of errors and lack of clarity in the text. It is aimed at beginners to TTD and to Django but be warned that it is quite challenging because a lot of other technologies are explained as well (eg version control, Selenium, and others).

              (4 of 4 customers found this review helpful)

               
              4.0

              Takes you through the thought-process

              By mcg

              from Sydney, Australia

              About Me Developer

              Verified Buyer

              Pros

              • Accurate
              • Easy to understand
              • Helpful examples

              Cons

                Best Uses

                • Intermediate

                Comments about oreilly Test-Driven Development with Python:

                Being a Web programmer that's struggled to stick with TDD and abandoned it out of frustration several times, this is exactly the book that I needed: one long example of a practical Web application detailing the fail-pass-refactor cycle every step of the way. A lot of the "but what if...?" questions I had when previously attempting TDD were answered and I finally feel like I might be able to actually develop this way.

                If you understand the idea of TDD but have struggled to use it practically, this might well be the book for you.

                (0 of 6 customers found this review helpful)

                 
                2.0

                All over the map

                By gc

                from va

                About Me Hobbyist

                Pros

                • It's Okay

                Cons

                • There Are Better Books

                Best Uses

                • Intermediate

                Comments about oreilly Test-Driven Development with Python:

                The concept is good, but the author seems to miss the point of where's he is trying to lead. A lot of extraneous details in the middle of an explanation and then a sudden jump back to the concept.

                Not necessarily boring, but without clear directions as each piece was added, I did not enjoy the journey and put the book aside for others.

                (6 of 6 customers found this review helpful)

                 
                5.0

                A classic in the making...

                By gsv

                from Sydney, Australia

                About Me CEO, Developer, Sys Admin

                Verified Buyer

                Pros

                • Accurate
                • Comprehensive
                • Concise
                • Easy to understand
                • Helpful examples
                • Well-written

                Cons

                • Still A Work In Progress

                Best Uses

                • Intermediate
                • Novice
                • Student

                Comments about oreilly Test-Driven Development with Python:

                I purchased this book as I was keen to explore the world of TDD, and it does an excellent job of introducing the reader to this subject.

                What surprised me were the unexpected side benefits that I received... it serves as so much more for people who are new to Python and/or the Django framework.

                In particular...

                Deployment: DEPLOYING Django is a pain for any newcomer thus the first 7 Chapters alone are worth the asking price for the clear and comprehensive path that is laid out for them, literally deployment becomes mundane after this... right now this is the definitive book on Django deployment.

                Resources: Want to know about Forms... Fabric... South... Git... Javascript integration... it's all here and whilst not exhaustive on any one subject it serves as a clear introduction to the topic and along with the references to find out more will get you started in the right direction...

                References: The authors references made along the way are comprehensive, pertinent and incredibly valuable... finding them by yourself would take many many, hours of googling (if you were lucky)... having gone through the book once (to the point that it is currently completed) I now find myself returning to earlier parts and following the references supplied to raise my skill level in each discipline...

                The bottom line is simple... If you are learning Python, Django or TDD this is already a must have!

                I will add a further review upon the books completion.

                (2 of 10 customers found this review helpful)

                 
                3.0

                Too many moving parts

                By kracekumar

                from Bangalore, India

                About Me Developer

                Verified Reviewer

                Pros

                  Cons

                    Best Uses

                      Comments about oreilly Test-Driven Development with Python:

                      I felt there is too much rewrite of code. It is hard to write code knowing this assumption will be invalid after few pages. After chapter 6 I lost interest to code, because changing single line view will make me change code in unit tests, functional test, at some point more than application logic test logic was present.

                      TDD for web development is vast. Touching too many parts makes too hard to hold interest. It would be really nice if TDD was followed for server side logic alone.

                      Displaying reviews 1-10

                      Back to top

                      Previous | Next »

                       
                      Buy 2 Get 1 Free Free Shipping Guarantee
                      Buying Options
                      Immediate Access - Go Digital what's this?
                      Ebook: $35.99
                      Formats:  DAISY, ePub, Mobi, PDF
                      Print & Ebook: $49.49
                      Print: $44.99