Geode is tested with a combination of tests written with JUnit and DUnit. JUnit tests are written as with any other project while DUnit tests use a multi-JVM environment (see DistributedTest).

JUnit tests are divided into two main categories: UnitTest and IntegrationTest.

1. UnitTest: is a test with very narrow and well defined scope. Any complex dependencies and interactions are stubbed or mocked.

2. IntegrationTest: a test involving inter-operation of components or subsystems.

DUnit tests are a special type of JUnit test involving multiple JVMs. This supports writing tests for a Geode cluster.

3. DistributedTest: a test involving multiple members of a distributed system.

Regression tests are typically an IntegrationTest or DistributedTest written to reproduce a specific bug and verify the fix of that bug.

4. RegressionTest: a UnitTest, IntegrationTest or DistributedTest that reproduces a specific bug and verifies its fix.

The primary testing frameworks and libraries used in Geode tests (all of the above test categories) are:

Always write unit tests for new functionality and always ensure that all unit tests pass before submitting a pull request. Try to make sure new functionality is covered by unit tests, whether or not there are also integration tests as well.

The main build target will execute UnitTests only:

./gradlew build

Our ultimate goal is to have the highest quality product for our users. There are multiple ways of slicing this issue, but if we go all the way back to when the code is being developed, we find unit tests. Unit tests are the foundation in continuous software testing, with the top characteristic of being automated. Good unit testing can save a lot of time and energy later on in the software development lifecycle.

Possible goals to strive for when creating our tests: (from http://artofunittesting.com/definition-of-a-unit-test/)

Good sites for getting ideas: