1

In my app, I've developed an automated testing strategy where each layer has some unit tests and some integration tests.

It seems to me that "integration test" is a fairly sweeping term, which is applicable whenever a test involves more than one unit.

For my integration tests, I felt like I had two options:

  • "test the combination of units in a single layer, and fake out everything else" (e.g in-memory databases or stubbing out the data access layer). Useful to confirm that DI and messaging is wired up correctly.

or

  • "tests for a given layer should operate against real instances of lower layers" (e.g. hit the database). Useful to gain confidence that the app as a whole will work.

My question is, are there different terms in common use for each scenario? I've started calling the layer-and-below tests "Jenga tests" because they make sure that each layer aligns or stacks properly on the layer below, and the whole tower doesn't fall over.

(p.s. I'm not interested in discussing the pro's and con's of unit tests vs integration tests, or faking the database - just terminology).

dbruning
  • 5,042
  • 5
  • 34
  • 35

1 Answers1

0

I am also confused when people call xUnit test for more than 1 class integration testing.

Wikipedia definition says Integration testing

occurs after unit testing and before validation testing.

On StackOverflow definition is the same.

So the questions becomes "If layer testing a unit test or an integration test?"

I think it is part of unit testing.

Currently I have just one point of reference:

Apache Maven project defines integration test as those after you get your package.

  • package - take the compiled code and package it in its distributable format, such as a JAR.

  • integration-test - process and deploy the package if necessary into an environment where integration tests can be run

(To get full list of phases try mvn abracadabra)

phases

For you question, I would suggest to say layer testing and layers stack testing. I have not come across standard sort terms for that.

Community
  • 1
  • 1
Paul Verest
  • 60,022
  • 51
  • 208
  • 332