Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K

    Google Testing Blog

    googletesting.blogspot.com · Company blog · on HN since 2008

    Google engineers write about software testing practice, including flaky tests, testable code, code coverage, and end-to-end tests.

    Visit blogHN submissions
    ProgrammingTech Industry
    What HN says

    Commenters recommend it for practical testing techniques, especially Misko Hevery's posts on writing testable Java code, and point to Google's test-heavy engineering culture.

    Stats for nerds
    79HN people shared it
    73linked in comments
    555story points
    Jul 2021last shared
    2009people per year2021

    Top posts on HN

    1. 1
      DOM Snitch: Google's passive in-the-browser reconnaissance tool
      1 person · 116 points · first shared 2011 · 7 comments on HN
    2. 2
      How to write untestable code
      2 people · 76 points · first shared 2009 · 29 comments on HN
    3. 3
      Checked exceptions I love you, but you have to go
      1 person · 39 points · first shared 2009 · 35 comments on HN
    4. 4
      Google Testing Blog: Testing at the speed and scale of Google
      2 people · 38 points · first shared 2011 · 4 comments on HN
    5. 5
      Google Testing Blog: How Google Tests Software - Part Five
      1 person · 34 points · first shared 2011 · 1 comments on HN
    6. 6
      Yet Another JavaScript Testing Framework
      1 person · 24 points · first shared 2009 · 1 comments on HN
    7. 7
      Google's C++ testing framework is now public
      1 person · 23 points · first shared 2008 · Discussion on HN
    8. 8
      Writing Testable Code
      2 people · 21 points · first shared 2008 · 8 comments on HN
    9. 9
      Google Testing Blog: There, but for the grace of testing, go I
      1 person · 20 points · first shared 2010 · 4 comments on HN
    10. 10
      Just Say No to More End-To-End Tests
      6 people · 17 points · first shared 2015 · 2 comments on HN

    What HN people wrote when they linked it

    • bedobiJul 2021

      I'm irrationally passionate about testing. Shameless plug: (rendered version at https://gist.github.com/androidfred/501d276c7dc26a5db09e893bb7c9f3ee)

      # Test your tests

      ## Summary: test interfaces, not implementations

      Tests that pass when something is actually broken, and fail when things actually do work, are worse than useless- they are positively harmful.

      ## The requirement

      Let's say we've been tasked with returning `400` when `GET` `/users/<userId>` is called with a negative `userId`.

      ## The test

      The requirement can be turned into a test that hits the endpoint with a negative `userId` and checks that a `400` is returned:

      ```java
      @Test
      public void getUser_InvalidUserId_400() {
      expect().statusCode(400).when().get("/users/-1");
      }
      ```

      ## Implementation

      A ubiquitous style of implementation may look something like this: (ignore whether you like the style of implementation or not, it's just an example)

      ```java
      public class UserResource {

      @Inject
      private UserService userService;

      @GET
      @Path("/users/{userId}")
      public Response getUser(@PathParam("userId") final Long userId) {
      try {
      return Response.ok(userService.findById(userId)).build();
      } catch (final UserException e) {
      return Response.status(e.getErrorCode()).build();
      }
      }
      }
      ```

      ```java
      public UserService {

      @Inject
      private UserDao userDao;

      public User findById(final Long userId) throws UserException {
      …

    • unhappymsApr 2010

      What I meant by unsustainable is that I feel the retaining talent problem is less related to money. My guess is smart people are leaving mostly because of the environment and not because of pay and benefits. When those smart people leave, theoretically the quality of the product suffers and overtime the competitor with better people wins. If MS profits go down over time, and investing in things like Azure and Bing and Entertainment (all which loose money), I don't see how they can continue to throw money at the talent problem. But man if I could get paid more AND work in a better environment (one where I had an impact) I would go for it in a heart beat. So in that sense money DOES matter. I agree with the rest of what you said though about it being difficult to measure.

      This is what I think of when the subject is talented people leaving MS: http://www.techflash.com/seattle/2008/12/Key_data_center_architect_leaves_Microsoft_for_Amazon36057114.html

      http://googletesting.blogspot.com/2009/06/james-whittaker-joins-google.html

      I think Amazon and Google are better because of it.

    • SmerityJan 2011

      I was spoiled as my internship January last year with Google was my first introduction to the world of corporate IT. Google as a culture really encourages engineers to follow best practices - "Testing on the Toilet"[1] was always a highlight.

      As you say, the emphasis on unit tests is amazing and something not found in a lot of professional companies. When you tell someone you haven't committed your code yet because you're writing unit tests they don't tell you to hurry - it's not considered something you can rush.

      Additionally some of the research that has come out of Google Research [2] is stunning and I suggest if people are interested they can keep tabs on new publications via their feed [3]. A lot of their tools and products really are pushing the boundaries of the field they're in, both in complexity and scale, so the "reports from the front line" offer a unique insight.

      [1] - http://googletesting.blogspot.com/2008/08/tott-100-and-counting.html
      [2] - http://research.google.com/pubs/papers.html
      [3] - http://research.google.com/pubs/atom.xml

    • dgacmuDec 2015

      I think we must be misunderstanding each other. Developers are human. (At least, I think we are.) We respond to the incentives and structure of the environment in which we're developing. A culture of "throw crap over the wall to QA" naturally creates an incentive for quickly writing up features, without balancing that with robustness, because finding the problems "is QA's fault". A culture of "the devs are responsible for the quality of their code" produces better code. The way to treat the devs well is to have the QA folks go off and create or bring in easy-to-use automated testing and CI frameworks, to make it easy for the devs to do the right thing.

      This is not a new observation - it's been happening over the last 10 years. see, for example, http://blogs.forrester.com/mike_gualtieri/11-02-17-want_better_quality_fire_your_qa_team
      or http://product.hubspot.com/blog/the-classic-qa-team-is-obsolete
      and, while it's from 2007, http://googletesting.blogspot.com/2007/03/difference-between-qa-qc-and-test.html

    • pyeekFeb 2013

      I think there is an aspect to this article that won't be understood unless you're really part of the Python community. For a while now, one of Python's selling points to users from other languages has been "you don't need to write all that code" (most likely directed at Java), more specifically you can simply use a function rather than having to define a class just to define static methods etc. Over time, this has grown into the mantra of "You don't need a class just use a function/module". A lot of people seem to follow this viewpoint blindly, so much so that they consider it to be "Pythonic"; the way you "should" write python.

      I think Armin's post is somewhat in line with the following post from the google testing blog.
      http://googletesting.blogspot.com/2008/12/static-methods-are-death-to-testability.html

    • jmathesFeb 2009

      I work at IMVU as well, know the author personally, and can tell you that yes, he unit tests too. In fact, like all of us, writes all code test-first.

      For test strategy in general, you need a whole seminar. There's a good blog on testing over at http://googletesting.blogspot.com/ <- go there!

      As for code:test ratio, I'm not sure what metric you want, but using just php files, there are ~1k active test files and ~7k php files total. So if you take into account that 1k of that 7k is the test, and some is test-setup and obsolete files we no longer use, it's maybe about 5:1 code:test. However, a lot of the code is third party OS software packages. In-house code is about 1.5:1 test:code, in my experience. These, by the way, are very rough estimates.

    Related

    Google Open Source Bloggoogle-opensource.blogspot.com208 people

    Bidding farewell to Google Code

    Google Open Source Blog
    Company · last shared 2016
    Jessitronblog.jessitron.com64 people

    Hitting OKRs vs. Doing Your Job

    Jessitron
    Personal · last shared 2026
    Google Research Bloggoogleresearch.blogspot.com303 people

    Announcing SyntaxNet: The World’s Most Accurate Natural Language Parser

    Google Research Blog
    Company · last shared 2017
    Expedia Group Technologymedium.com/expedia-group-tech17 people

    Package by Feature, Not by Layer

    Expedia Group Technology
    Company · last shared 2026
    Google Security Blogsecurity.googleblog.com680 people

    Announcing the first SHA-1 collision

    Google Security Blog
    Company · last shared 2026
    Blogoscopedblogoscoped.com147 people

    A Chat With Aaron Swartz

    Blogoscoped
    Personal · last shared 2026
    Google Code Bloggooglecode.blogspot.com165 people

    Why should anyone ever use a Google API again?

    Google Code Blog
    Company · last shared 2022
    Netflix Tech Blogtechblog.netflix.com360 people

    Node.js in Flame Graphs

    Netflix Tech Blog
    Company · last shared 2025