Testable JavaScript
Publisher: O'Reilly Media
Final Release Date: January 2013
Pages: 274

One skill that’s essential for any professional JavaScript developer is the ability to write testable code. This book shows you what writing and maintaining testable JavaScript for the client- or server-side actually entails, whether you’re creating a new application or rewriting legacy code.

From methods to reduce code complexity to unit testing, code coverage, debugging, and automation, you’ll learn a holistic approach for writing JavaScript code that you and your colleagues can easily fix and maintain going forward. Testing JavaScript code is complicated. This book helps experienced JavaScript developers simply the process considerably.

  • Get an overview of Agile, test-driven development, and behavior-driven development
  • Use patterns from static languages and standards-based JavaScript to reduce code complexity
  • Learn the advantages of event-based architectures, including modularity, loose coupling, and reusability
  • Explore tools for writing and running unit tests at the functional and application level
  • Generate code coverage to measure the scope and effectiveness of your tests
  • Conduct integration, performance, and load testing, using Selenium or CasperJS
  • Use tools for in-browser, Node.js, mobile, and production debugging
  • Understand what, when, and how to automate your development processes
Table of Contents
Product Details
About the Author
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyTestable JavaScript
 
4.3

(based on 4 reviews)

Ratings Distribution

  • 5 Stars

     

    (2)

  • 4 Stars

     

    (1)

  • 3 Stars

     

    (1)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (0)

100%

of respondents would recommend this to a friend.

Pros

  • Easy to understand (4)
  • Helpful examples (4)
  • Accurate (3)
  • Concise (3)

Cons

    Best Uses

    • Intermediate (4)
    • Expert (3)
      • Reviewer Profile:
      • Developer (4)

    Reviewed by 4 customers

    Sort by

    Displaying reviews 1-4

    Back to top

    (1 of 1 customers found this review helpful)

     
    3.0

    Practical introduction

    By hu

    from Boston

    About Me Developer

    Verified Reviewer

    Pros

    • Concise
    • Easy to understand
    • Helpful examples

    Cons

      Best Uses

      • Intermediate
      • Novice

      Comments about oreilly Testable JavaScript:

      The author was in charge of Yahoo! Mail and some of tools introcuded here are also Yahoo!'s development tools.
      This book contains not only Java Script specific testable technic but also how we should manager code quality in daily development
      with many introductions of tools.
      Therefore, some of readers who know fundamental testable technics very well already will be bored to read the parts.
      For examples, agile development, test-driven development, coverage, complexity, why/what/how testable/maintainable/understandable...
      This parts are so boring.

      However, regarding tool introduction parts, they are practical and understandable how we set up environment and use with code/command examples and how our applications become more stable with testing tools.Figures are also helpful to understand the look&feel of each tools.
      The tool introduction part is consolidated and helpful for every developer who would like to integrate JS test tools and automation for building/testing/analyzing JS applications and improve their current development environment.

      (1 of 1 customers found this review helpful)

       
      4.0

      Fulfill the goal expected

      By produke

      from madrid, spain

      About Me Developer

      Verified Reviewer

      Pros

      • Accurate
      • Easy to understand
      • Good Tips
      • Helpful examples

      Cons

        Best Uses

        • Expert
        • Intermediate

        Comments about oreilly Testable JavaScript:

        This post about the book "Testable JavaScript" from O'Reilly editor which i got as an exchange from their blogger reviewer program.

        I cannot start the analysis of the book without saying that is really more about testing and software engineering good rules to get a nice readable, maintainable, efficient, clear, reusable and high quality code.

        The language is really a second layer. What you will learn the first chapters is about how you could (SHOULD!) improve your code and the author, Mark Ethan Trostler, is really clear on showing the reader how you reach the goal with the help of several tools specifically for JavaScript! That's the JavaScript part which i was interested in as i come from the software development engineering world using Java as main language so i wanted to get some tips about what to use in the JavaScript case.

        Traversing the client side framework PhantomJS and the server side Jasmine, the author shape the testing world in JavaScript in a good, concise and clear sentences with the code samples as proof of concept.

        Then the following chapters are about code coverage and integration that can be done also with Selenium which i use in my current work to test jsps code and i knew that you can also test JavaScript code.

        Selenium is great and powerful API client/server testing environment! - I use it even to test the JSP compilation very easily without any deployment setting or embedded jetty! -

        Debugging javascript is a chapter on tis own and covered what you probably expect already that you can use add-on in Mozilla or Chrome to debug you JavaScript code.

        The last part is about the favorite part of QA people which is the automation and continuous integration testing. Jenkins and Hudson are both mentioned of course! Personally i use Hudson but they are really similar ;-)

        Great book for better coding, better life! It really accomplish the goal i was expecting!

        Disclaimer: The book was given as part of the blogger review scheme from O'Reilly.

         
        5.0

        Book worth recommendation

        By gziolo

        from Wroclaw, Poland

        About Me Developer

        Verified Reviewer

        Pros

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

        Cons

          Best Uses

          • Expert
          • Intermediate

          Comments about oreilly Testable JavaScript:

          Nicely explained all aspects of assuring good quality of code written in JavaScript. Lots of valuable hints, samples and references.

          (2 of 2 customers found this review helpful)

           
          5.0

          Test Your JavaScript

          By Przemysław

          from Kraków

          About Me Developer

          Verified Reviewer

          Pros

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

          Cons

            Best Uses

            • Expert
            • Intermediate

            Comments about oreilly Testable JavaScript:

            The beginning of Testable JavaScript covers whys, whats & hows of testable, maintainable and understandable code. After that, there is the chapter about complexity and possible solutions to make code less complex. Serious testing starts from Chapter 4.

            Testable JavaScript gave me overview of available tools. If you interested in testing JavaScript, check these projects: CasperJS and PhantomJS, Jasmine.

            I guess the most interesting stuff for me was performance testing. It is really valuable to know how fast your page is loading or what part of code is taking too much of execution time.

            Testable JavaScript is written in a good solid way. Some part may be less interesting, but it is worth knowing about available solutions for specific problems concerning JavaScript.

            Displaying reviews 1-4

            Back to top

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