Writing automated tests for Coherence based application is quite challenging. Definitely, you can start single node cluster in your test JVM without too much hassle. Unfortunately, single node cluster will not allow you to replicate some important aspects of cluster (a thus, test wont be able to catch a number of nasty bugs).
Running Coherence cluster with several nodes is a bit trickier (Coherence is using singletons). Idea to use classloader to keep multiple Coherence nodes is not new. I’m using this approach for few years already, and …
Today I’m glad to announce availability of my test library for Coherence at Maven central repo.
ChTest is a third generation of my test framework for Oracle Coherence. Besides ability to run multiple Coherence nodes in different classloader, ChTest offers a bunch of extra features.
To name few:
Below is slide deck outlining features of ChTest.
Add following Maven dependency and you would be able to try ChTest yourself.
<dependency>
<groupId>org.gridkit.coherence-tools</groupId>
<artifactId>chtest</artifactId>
<version>0.2.6</version>
<scope>test</scope>
</dependency>