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 23 reviews)

Ratings Distribution

  • 5 Stars

     

    (13)

  • 4 Stars

     

    (7)

  • 3 Stars

     

    (2)

  • 2 Stars

     

    (1)

  • 1 Stars

     

    (0)

91%

of respondents would recommend this to a friend.

Pros

  • Helpful examples (19)
  • Easy to understand (18)
  • Well-written (14)
  • Accurate (10)
  • Concise (8)

Cons

    Best Uses

    • Intermediate (15)
    • Novice (13)
    • Student (10)
      • Reviewer Profile:
      • Developer (19), Maker (4), Designer (3), Educator (3), Sys admin (3)

    Reviewed by 23 customers

    Sort by

    Displaying reviews 1-10

    Back to top

    Previous | Next »

    (1 of 2 customers found this review helpful)

     
    3.0

    Transmogrification in Progress

    By Stephen

    from Lawrence, KS

    About Me Developer, Maker, Perl's Evil Ex, Sysadmin

    Verified Reviewer

    Pros

    • Accurate
    • Helpful examples

    Cons

    • The Scope Has Crept

    Best Uses

      Comments about oreilly Test-Driven Development with Python:

      TL;DR: This might not be the droid you are looking for.

      I purchased this book as an Oreilly/pre-release/early-beta volume--python testing and TDD being things that I am interested in as my python skills mature.

      The title indicates that this is (should be) just the volume to seek out for such topics, and, early on, it was. It was also rough--the text walked a bit like Frankenstein's monster; however, it was on topic.

      The text flow has tightened up and I believe this is the 2nd or 3rd (pre) release of this volume since I made the original purchase. That being said, it is now quite entangled with web development and Django.

      These are two topics I am actually interested in; however, there are many good volumes dealing with both topics while there are very few (python-specific) testing volumes. The scope enhancements will undoubtedly appeal to many readers--having such a rich framework to work with while developing testing skills and awareness are not at all the worst idea that has ever been presented.

      I will read this book in-depth when it is released in its final version--I just have no time to do so right now. I was hoping for a more specific treating of TDD in the python world. I believe that book is still within the pages of this volume, I just don't have time just now to deal with its expanded scope.

      At this point I would only strongly recommend this volume if the reader is goal-oriented towards web/framework development.

      I may have cause to write a new review with different opinions later, because these are merely opinions and they very well may change!

      (1 of 1 customers found this review helpful)

       
      5.0

      Great bang for your buck

      By Dave

      from Palmerston North, NZ

      About Me Educator, Maker

      Verified Buyer

      Pros

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

      Cons

        Best Uses

        • Expert
        • Intermediate

        Comments about oreilly Test-Driven Development with Python:

        What a great book! As advertised you'll get a good introduction to TDD principles and applications. But you really get a lot more than that. The working example covers version control of the project with GIT, on top of a pretty good introduction to the Django web framework. The authors writing style is excellent, tight, detailed, and quirky enough to be a fun read!

        (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.

                    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, Web Application
                    Print & Ebook: $49.49
                    Print: $44.99