Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Should use JUnit 4 syntax
  • File name ends with *IntegrationTest
  • Should use Category annotation of type IntegrationTest
  • May take longer than a UnitTest but should generally complete in seconds
  • May test a single class or any combination of classes including end-to-end testing of Geode
  • Typically uses black-box testing but may include some white-box testing and helps guarantee external quality (feature delivers value to User)
  • An IntegrationTest may do any of the following:
    • communicate across the network
    • access the file system
    • require anything special in the environment (such as editing config files or running an external process)
  • Good examples in Geode:
    • RegionExpirationIntegrationTest

You would typically write an IntegrationTest if you want to test the interaction of real dependencies in a class or if you want to perform functional testing of any feature that requires more than a single class. Any testing that requires any kind of file access or networking should be done in an IntegrationTest instead of a UnitTest. Most of our IntegrationTests use either the file system or create an actual Cache for functional testing.

...

  • RegionExpirationIntegrationTest.java

Examples of good RegressionTests which are IntegrationTests:

...