Loading ...
Sorry, an error occurred while loading the content.

Re: [XP] Re: Could customer acceptance tests be sufficient? TDD Adoption Rate Survey

Expand Messages
  • J. B. Rainsberger
    ... End-to-end tests do not exert enough positive pressure on design decisions to help me see opportunities to improve the design, which explains why I write
    Message 1 of 36 , Nov 1, 2008
    • 0 Attachment
      On Wed, Oct 29, 2008 at 9:59 AM, kentb <kentb@...> wrote:

      > I would guess that this proportion of acceptance/unit tests is unusually
      > high because we are working with a simple API and moderately simple
      > behavior. Maybe not, though. I am working on another project that has been
      > going for ten years and we have learned to drive most development from
      > acceptance-level tests because testing at too low a level and missing
      > something is often more costly than spending extra time writing and running
      > higher level tests.

      End-to-end tests do not exert enough positive pressure on design
      decisions to help me see opportunities to improve the design, which
      explains why I write and recommend highly focused, small, isolated
      object tests. It seems clear to me that the more layers between the
      entry point and the deepest point in the design, the more trouble this
      causes. It also seems clear that in a system with only one layer, one
      probably wouldn't manage to tell the difference between using
      end-to-end tests and isolated object tests.

      It so happens I'll talk about the details in Orlando in my tutorial
      "Avoid Integration Defects Without Integration Tests".

      Take care.
      --
      J. B. (Joe) Rainsberger :: http://www.jbrains.ca
      Your guide to software craftsmanship
      JUnit Recipes: Practical Methods for Programmer Testing
      2005 Gordon Pask Award for contribution Agile Software Practice
    • Rick Mugridge
      ... I believe that it s not the scale of the test that should determine who writes it. It s instead whether the tests expresses stuff that s part of the
      Message 36 of 36 , Nov 8, 2008
      • 0 Attachment
        J. B. Rainsberger wrote:
        > I suggest programmers focus on isolated object tests and testers focus
        > on integration and end-to-end tests. If they do that, then they'll
        > come together pretty well at some point.
        > ----

        I believe that it's not the scale of the test that should determine who
        writes it.

        It's instead whether the tests expresses stuff that's part of the
        problem space or part of the solution space. Of course, where that
        boundary sits is critically dependent on the project and who is
        involved. And it changes as the problem, and solution, are better
        understood.

        And there can be several layers, with a solution space at one level
        being a problem space at another. So, for example, I'm happy to use
        storytests for specifying the technical details of communication with
        another system that is managed by another team. And I'm happy to have
        some storytests that mock out that other system so that we can use
        additive "specification"/testing rather than multiplicative across the
        systems. As always, we still need some end-to-end to ensure it's all
        wired together correctly and that failure modes across them are managed
        correctly.

        So I find the usual distinctions between unit tests and end-to-end tests
        and X, Y, Z tests to be unhelpful. As it's too late and too hard to
        refactor the terminology, I try (unsuccessfully) to avoid it.

        I prefer Brian Marick's distinction between customer-facing and
        programmer-facing tests.

        Cheers, Rick
      Your message has been successfully submitted and would be delivered to recipients shortly.