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

Re: [XP] Benefits of automated builds and continuous integration

Expand Messages
  • Steven Smith
    The single biggest reason for tests to be slow is that they are using too much infrastructure. Make sure you are decoupling your systems and are able to test
    Message 1 of 14 , Jan 29, 2013
    • 0 Attachment
      The single biggest reason for tests to be slow is that they are using too
      much infrastructure. Make sure you are decoupling your systems and are
      able to test them as small units, without a database, file system, or other
      dependencies involved. True unit tests (some call these micro tests)
      should be able to run on the order of 1000 per second. If you have so many
      tests of this kind that your build is taking hours, then you must have some
      amazing test coverage or a truly massive application.

      Also, it's not a bad idea to separate fast tests from slow tests. In my
      projects, this usually looks like "Unit Tests" and "Integration Tests",
      with the latter testing things like round-tripping to a database, etc. You
      should have lots more of the former than the latter tests, but of course
      the latter ones are also valuable.

      In terms of resources, I have some articles on my blog about dependencies
      and how to avoid them (ardalis.com). Also there is some great content on
      testing, and many other things, at Pluralsight.com. For books, Feathers'
      Working Effectively With Legacy Code is great for this, too.

      Steve




      On Tue, Jan 29, 2013 at 11:39 AM, JackM <jack@...> wrote:

      > **
      >
      >
      > Hi Adam,
      >
      > I would appreciate if you could recommend some resources on how to write
      > faster tests.
      >
      > Thanks
      > jack
      >
      >
      > --- In extremeprogramming@yahoogroups.com, Adam Sroka wrote:
      > >
      > > This is not the answer you want, but I think it is a bad idea for you to
      > > stop delivering features to improve the build, and if I were your VP I
      > > would not let you either.
      > >
      > > You need to build a culture of continually improving your automation to
      > > make it faster and easier to use. Otherwise, you're going to be right
      > back
      > > where you are in a few months asking for another chance to stop and fix
      > it.
      > >
      > > I suspect the tests you are writing are not really microtests, and that
      > is
      > > a big part of the problem. I could recommend some resources to help you
      > > learn how to write faster tests if you'd like.
      > >
      > >
      > > On Mon, Jan 28, 2013 at 5:32 PM, JackM wrote:
      > >
      > > > **
      > > >
      > > >
      > > > Can anyone point me to some real numbers on the benefits of automating
      > the
      > > > builds and continuous integration.
      > > >
      > > > Perhaps there's a good white paper on this topic.
      > > >
      > > > I don't need to be convinced, but trying to make a case to our VP on
      > doing
      > > > this first rather than working on new features.
      > > >
      > > > We do have automated builds but the unit tests take forever to run and
      > > > often times the build fails due to unit test failures.
      > > >
      > > > We want to make a substantial effort to get to builds in 12 hours from
      > 3
      > > > or 4 days.
      > > >
      > > > Just hard to quantify the benefits.
      > > >
      > > > Thanks
      > > > jack
      > > >
      > > >
      > > >
      > >
      > >
      > > [Non-text portions of this message have been removed]
      > >
      >
      >
      >



      --
      Steve Smith
      http://Ardalis.com/
      http://twitter.com/ardalis


      [Non-text portions of this message have been removed]
    • Michael Hill
      Jack... By way of blowing my own horn, I can strongly recommend Industrial Logic s 6-album set called The Testing and Refactoring Workshop. Four albums are
      Message 2 of 14 , Jan 29, 2013
      • 0 Attachment
        Jack...

        By way of blowing my own horn, I can strongly recommend Industrial Logic's
        6-album set called The Testing and Refactoring Workshop. Four albums are
        about microtesting, and give a great deal of info on practical techniques.
        (The other two focus on Code Smells and Refactoring.)

        The key to learning this test driven development business is in learning
        how to make tests cheap. If they're not cheap, they won't be run or
        maintained, and that guarantees they'll never be of benefit. We give lots
        of attention to the very most basics of writing those cheap microtests.

        Go here to see the first microtesting album:
        http://www.industriallogic.com/elearning/ If you click through one of the
        images you can browse samples of the album.

        Seeya,
        Hill

        P.S. Apologies for the mercenary posting. I'd just say it's not about IL,
        it's about the *author* of several of those. I'm egotistical, not greedy.


        [Non-text portions of this message have been removed]
      • Adam Sroka
        What language(s) are you working in? ... [Non-text portions of this message have been removed]
        Message 3 of 14 , Jan 29, 2013
        • 0 Attachment
          What language(s) are you working in?


          On Tue, Jan 29, 2013 at 8:39 AM, JackM <jack@...> wrote:

          > **
          >
          >
          > Hi Adam,
          >
          > I would appreciate if you could recommend some resources on how to write
          > faster tests.
          >
          > Thanks
          > jack
          >
          >
          > --- In extremeprogramming@yahoogroups.com, Adam Sroka wrote:
          > >
          > > This is not the answer you want, but I think it is a bad idea for you to
          > > stop delivering features to improve the build, and if I were your VP I
          > > would not let you either.
          > >
          > > You need to build a culture of continually improving your automation to
          > > make it faster and easier to use. Otherwise, you're going to be right
          > back
          > > where you are in a few months asking for another chance to stop and fix
          > it.
          > >
          > > I suspect the tests you are writing are not really microtests, and that
          > is
          > > a big part of the problem. I could recommend some resources to help you
          > > learn how to write faster tests if you'd like.
          > >
          > >
          > > On Mon, Jan 28, 2013 at 5:32 PM, JackM wrote:
          > >
          > > > **
          > > >
          > > >
          > > > Can anyone point me to some real numbers on the benefits of automating
          > the
          > > > builds and continuous integration.
          > > >
          > > > Perhaps there's a good white paper on this topic.
          > > >
          > > > I don't need to be convinced, but trying to make a case to our VP on
          > doing
          > > > this first rather than working on new features.
          > > >
          > > > We do have automated builds but the unit tests take forever to run and
          > > > often times the build fails due to unit test failures.
          > > >
          > > > We want to make a substantial effort to get to builds in 12 hours from
          > 3
          > > > or 4 days.
          > > >
          > > > Just hard to quantify the benefits.
          > > >
          > > > Thanks
          > > > jack
          > > >
          > > >
          > > >
          > >
          > >
          > > [Non-text portions of this message have been removed]
          > >
          >
          >
          >


          [Non-text portions of this message have been removed]
        • Limbu
          Hi Adam, I am interested, how to write faster test in any programming language such as Java, C#, PHP etc. Can you recommend some resources please ? Thank you
          Message 4 of 14 , Feb 13, 2013
          • 0 Attachment
            Hi Adam,

            I am interested, how to write faster test in any programming language such as Java, C#, PHP etc. Can you recommend some resources please ?

            Thank you

            Regards and Metta,
            Bhagi

            --- In extremeprogramming@yahoogroups.com, Adam Sroka wrote:
            >
            > What language(s) are you working in?
            >
            >
            > On Tue, Jan 29, 2013 at 8:39 AM, JackM wrote:
            >
            > > **
            > >
            > >
            > > Hi Adam,
            > >
            > > I would appreciate if you could recommend some resources on how to write
            > > faster tests.
            > >
            > > Thanks
            > > jack
            > >
            > >
            > > --- In extremeprogramming@yahoogroups.com, Adam Sroka wrote:
            > > >
            > > > This is not the answer you want, but I think it is a bad idea for you to
            > > > stop delivering features to improve the build, and if I were your VP I
            > > > would not let you either.
            > > >
            > > > You need to build a culture of continually improving your automation to
            > > > make it faster and easier to use. Otherwise, you're going to be right
            > > back
            > > > where you are in a few months asking for another chance to stop and fix
            > > it.
            > > >
            > > > I suspect the tests you are writing are not really microtests, and that
            > > is
            > > > a big part of the problem. I could recommend some resources to help you
            > > > learn how to write faster tests if you'd like.
            > > >
            > > >
            > > > On Mon, Jan 28, 2013 at 5:32 PM, JackM wrote:
            > > >
            > > > > **
            > > > >
            > > > >
            > > > > Can anyone point me to some real numbers on the benefits of automating
            > > the
            > > > > builds and continuous integration.
            > > > >
            > > > > Perhaps there's a good white paper on this topic.
            > > > >
            > > > > I don't need to be convinced, but trying to make a case to our VP on
            > > doing
            > > > > this first rather than working on new features.
            > > > >
            > > > > We do have automated builds but the unit tests take forever to run and
            > > > > often times the build fails due to unit test failures.
            > > > >
            > > > > We want to make a substantial effort to get to builds in 12 hours from
            > > 3
            > > > > or 4 days.
            > > > >
            > > > > Just hard to quantify the benefits.
            > > > >
            > > > > Thanks
            > > > > jack
            > > > >
            > > > >
            > > > >
            > > >
            > > >
            > > > [Non-text portions of this message have been removed]
            > > >
            > >
            > >
            > >
            >
            >
            > [Non-text portions of this message have been removed]
            >
          • Steve Smith
            Write your tests without tight coupling to external dependencies. File systems, databases, etc. all make tests slow. I have a number of articles on this
            Message 5 of 14 , Feb 14, 2013
            • 0 Attachment
              Write your tests without tight coupling to external dependencies. File
              systems, databases, etc. all make tests slow. I have a number of articles
              on this topic here:
              http://ardalis.com/avoid-entrenched-dependencies

              Steve


              On Thu, Feb 14, 2013 at 2:06 AM, Limbu <ichirohang@...> wrote:

              > **
              >
              >
              >
              > Hi Adam,
              >
              > I am interested, how to write faster test in any programming language such
              > as Java, C#, PHP etc. Can you recommend some resources please ?
              >
              > Thank you
              >
              > Regards and Metta,
              > Bhagi
              >
              > --- In extremeprogramming@yahoogroups.com, Adam Sroka wrote:
              > >
              > > What language(s) are you working in?
              > >
              > >
              > > On Tue, Jan 29, 2013 at 8:39 AM, JackM wrote:
              > >
              > > > **
              > > >
              > > >
              > > > Hi Adam,
              > > >
              > > > I would appreciate if you could recommend some resources on how to
              > write
              > > > faster tests.
              > > >
              > > > Thanks
              > > > jack
              > > >
              > > >
              > > > --- In extremeprogramming@yahoogroups.com, Adam Sroka wrote:
              > > > >
              > > > > This is not the answer you want, but I think it is a bad idea for
              > you to
              > > > > stop delivering features to improve the build, and if I were your VP
              > I
              > > > > would not let you either.
              > > > >
              > > > > You need to build a culture of continually improving your automation
              > to
              > > > > make it faster and easier to use. Otherwise, you're going to be right
              > > > back
              > > > > where you are in a few months asking for another chance to stop and
              > fix
              > > > it.
              > > > >
              > > > > I suspect the tests you are writing are not really microtests, and
              > that
              > > > is
              > > > > a big part of the problem. I could recommend some resources to help
              > you
              > > > > learn how to write faster tests if you'd like.
              > > > >
              > > > >
              > > > > On Mon, Jan 28, 2013 at 5:32 PM, JackM wrote:
              > > > >
              > > > > > **
              > > > > >
              > > > > >
              > > > > > Can anyone point me to some real numbers on the benefits of
              > automating
              > > > the
              > > > > > builds and continuous integration.
              > > > > >
              > > > > > Perhaps there's a good white paper on this topic.
              > > > > >
              > > > > > I don't need to be convinced, but trying to make a case to our VP
              > on
              > > > doing
              > > > > > this first rather than working on new features.
              > > > > >
              > > > > > We do have automated builds but the unit tests take forever to run
              > and
              > > > > > often times the build fails due to unit test failures.
              > > > > >
              > > > > > We want to make a substantial effort to get to builds in 12 hours
              > from
              > > > 3
              > > > > > or 4 days.
              > > > > >
              > > > > > Just hard to quantify the benefits.
              > > > > >
              > > > > > Thanks
              > > > > > jack
              > > > > >
              > > > > >
              > > > > >
              > > > >
              > > > >
              > > > > [Non-text portions of this message have been removed]
              > > > >
              > > >
              > > >
              > > >
              > >
              > >
              > > [Non-text portions of this message have been removed]
              > >
              >
              >
              >



              --
              Steve Smith
              http://Ardalis.com/
              http://twitter.com/ardalis


              [Non-text portions of this message have been removed]
            Your message has been successfully submitted and would be delivered to recipients shortly.