Over a million developers have joined DZone.

Integration testing and unit testing

· Agile Zone

Learn more about how DevOps teams must adopt a more agile development process, working in parallel instead of waiting on other teams to finish their components or for resources to become available, brought to you in partnership with CA Technologies.

Also known as, “An exercise in Twitter opinionating”:

Sitting in a meeting, I heard one of the other meeting participants say, “You should do your integration testing before your unit testing in your code.”

Now, I wasn’t (and I’m still not) sure I agree with this or not, and when in doubt, I like to get data points. Twitter to the rescue!

The responses that came back were fascinating, and all over the map:


Mark Freedman MarkFreedman

Why? Disagree, unless I'm missing something => RT @tedneward: OH: "You should do your integration testing before your unit testing."

Kiran Hatti kiranhatti

@tedneward disagree! How could an unstable code (not unit tested)be ready for integration testing

Brad Wilson bradwilson

@tedneward Write acceptance tests, so we're all on the same page, then use TDD to get components in place until acceptance tests pass.

Brad Wilson bradwilson

@tedneward There is value on an agile team for starting with automated acceptance tests, as a stopping function for development effort.

Maxim Zaks iceX33

@tedneward mostly agree integration first helps to focus on feature, not losing in details

Jason Barile JasonBarile

@tedneward Depends on the intent of the integration testing. If it's to find gaps in the feature set, maybe. Otherwise, disagree.

Justin Chase justncase80

@tedneward disagree. The order depends on what you're creating.

Rockford Lhotka RockyLhotka

@tedneward I continually intermix them; can't say I care a lot about the distinction either in most cases

Matt Secoske secos

@tedneward in the sense that you may want to have some of the integration work done before you write the internals, yes.

My next thought was “how do I capture this for further discussion”, so here we go.

Couple of thoughts that occur to me as I read through the responses:

  • Are acceptance tests the same as integration tests?
  • Are either of these at the same level of scope as unit tests?
  • Does it make a difference which order you approach them?

Love to hear your thoughts.

Discover the warning signs of DevOps Dysfunction and learn how to get back on the right track, brought to you in partnership with CA Technologies.

Topics:

Published at DZone with permission of Ted Neward, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}