Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Insider News
  4. “Unit” tests?

“Unit” tests?

Scheduled Pinned Locked Moved The Insider News
comtestingbeta-testingquestion
8 Posts 8 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kent Sharkey
    wrote on last edited by
    #1

    Kent Beck[^]:

    On a recent podcast conversation the topic of unit versus integration testing came up. I don’t find the distinction helpful, but I’ve never been able to explain why not, nor what distinctions I do find helpful. This note is my attempt to clear this up.

    How about just "tests"?

    K P J D 4 Replies Last reply
    0
    • K Kent Sharkey

      Kent Beck[^]:

      On a recent podcast conversation the topic of unit versus integration testing came up. I don’t find the distinction helpful, but I’ve never been able to explain why not, nor what distinctions I do find helpful. This note is my attempt to clear this up.

      How about just "tests"?

      K Offline
      K Offline
      Kirk Hawley
      wrote on last edited by
      #2

      The term "unit test" seems to be somewhat flexible. Where I work now, a "unit" is a feature. So a Unit Test is... a test. In one place I worked, I was the "unit" that was going to do the testing.

      D G 2 Replies Last reply
      0
      • K Kent Sharkey

        Kent Beck[^]:

        On a recent podcast conversation the topic of unit versus integration testing came up. I don’t find the distinction helpful, but I’ve never been able to explain why not, nor what distinctions I do find helpful. This note is my attempt to clear this up.

        How about just "tests"?

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #3

        The best developers test their units often. Unit Testing is the testing of a unit -- often one library function. Integration testing is testing to be sure the newly changed unit works within a larger unit. Regression testing is testing performed in production.

        W 1 Reply Last reply
        0
        • K Kent Sharkey

          Kent Beck[^]:

          On a recent podcast conversation the topic of unit versus integration testing came up. I don’t find the distinction helpful, but I’ve never been able to explain why not, nor what distinctions I do find helpful. This note is my attempt to clear this up.

          How about just "tests"?

          J Offline
          J Offline
          Joe Woodbury
          wrote on last edited by
          #4

          If I can put the code in a library, the tests against that code are unit tests. (If not, they are "wishful thinking" tests. :) )

          1 Reply Last reply
          0
          • K Kirk Hawley

            The term "unit test" seems to be somewhat flexible. Where I work now, a "unit" is a feature. So a Unit Test is... a test. In one place I worked, I was the "unit" that was going to do the testing.

            D Offline
            D Offline
            den2k88
            wrote on last edited by
            #5

            Well, that way it was easy to answer to the common question, whodunit?

            GCS d-- s-/++ a- C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- ++>+++ y+++*      Weapons extension: ma- k++ F+2 X

            1 Reply Last reply
            0
            • K Kent Sharkey

              Kent Beck[^]:

              On a recent podcast conversation the topic of unit versus integration testing came up. I don’t find the distinction helpful, but I’ve never been able to explain why not, nor what distinctions I do find helpful. This note is my attempt to clear this up.

              How about just "tests"?

              D Offline
              D Offline
              Dan Neely
              wrote on last edited by
              #6

              IMO if you're going to split tests into different buckets, arguing unit vs integration vs etc as people with too much time on their hands do the useful distinction is how fast they execute and where/when they're run. Unless you're building a huge system using all of these buckets are probably excessive but: 0) Fast enough to run on each developer build. 1) ... on the developers machine before committing. 2) ... by the CI server after commit but before merging. 3) ... by the CI server less frequently (hourly? daily? weekly?) on the CI server and potentially limited to major branches (eg alpha, beta, release)

              Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

              1 Reply Last reply
              0
              • P PIEBALDconsult

                The best developers test their units often. Unit Testing is the testing of a unit -- often one library function. Integration testing is testing to be sure the newly changed unit works within a larger unit. Regression testing is testing performed in production.

                W Offline
                W Offline
                W Balboos GHB
                wrote on last edited by
                #7

                PIEBALDconsult wrote:

                The best developers test their units often.

                Hopefully not as a dry run!

                Ravings en masse^

                "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                1 Reply Last reply
                0
                • K Kirk Hawley

                  The term "unit test" seems to be somewhat flexible. Where I work now, a "unit" is a feature. So a Unit Test is... a test. In one place I worked, I was the "unit" that was going to do the testing.

                  G Offline
                  G Offline
                  GregoryPres
                  wrote on last edited by
                  #8

                  I recall Uncle Bob saying the term "unit" is unfortunate as some might look at classes as units. Some might even look at every method as a unit even non-public ones (in the pursuit of 100% coverage maybe?). At my workplace, we define a "unit" as a behavior. It might be one method, or one method using several auxiliary methods or even one class depends on its size and usage.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups