<p dir="ltr">I was actually planning to start a similar topic, but from the point of view of user&#39;s testing needs. </p>
<p dir="ltr">I&#39;ve recently created Hibernate OGM support for Hot Rod, and it wasn&#39;t as easy as other NoSQL databases to test; luckily I have some knowledge and contact on Infinispan ;) but I had to develop several helpers and refine the approach to testing over multiple iterations. </p>
<p dir="ltr">I ended up developing a JUnit rule - handy for individual test runs in the IDE - and with a Maven life cycle extension and also with an Arquillian extension, which I needed to run both the Hot Rod server and start a Wildfly instance to host my client app. </p>
<p dir="ltr">At some point I was also in trouble with conflicting dependencies so considered making a Maven plugin to manage the server lifecycle as a proper IT phase - I didn&#39;t ultimately make this as I found an easier solution but it would be great if Infinispan could provide such helpers to end users too.. Forking the ANT scripts from the Infinispan project to assemble and start my own (as you do..) seems quite cumbersome for users ;) </p>
<p dir="ltr">Especially the server is not even available via Maven coordinates. </p>
<p dir="ltr">I&#39;m of course happy to contribute my battle-tested Test helpers to Infinispan, but they are meant for JUnit users. </p>
<p dir="ltr">Finally, comparing to developing OGM integrations for other NoSQL stores.. It&#39;s really hard work when there is no &quot;viewer&quot; of the cache content.</p>
<p dir="ltr">We need some kind of interactive console to explore the stored data, I felt like driving blind: developing based on black box, when something doesn&#39;t work as expected it&#39;s challenging to figure if one has a bug with the storage method rather than the reading method, or maybe the encoding not quite right or the query options being used.. sometimes it&#39;s the used flags or the configuration properties (hell, I&#39;ve been swearing a lot at some of these flags!) </p>
<p dir="ltr">Thanks, <br>
Sanne <br>
</p>
<div class="gmail_extra"><br><div class="gmail_quote">On 15 Sep 2016 11:07, &quot;Tristan Tarrant&quot; &lt;<a href="mailto:ttarrant@redhat.com">ttarrant@redhat.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Recently I&#39;ve had a chat with Galder, Will and Vittorio about how we<br>
test the Hot Rod server module and the various clients. We also<br>
discussed some of this in the past, but we now need to move forward with<br>
a better strategy.<br>
<br>
First up is the Hot Rod server module testsuite: it is the only part of<br>
the code which still uses Scala. Will has a partial port of it to Java,<br>
but we&#39;re wondering if it is worth completing that work, seeing that<br>
most of the tests in that testsuite, in particular those related to the<br>
protocol itself, are actually duplicated by the Java Hot Rod client&#39;s<br>
testsuite which also happens to be our reference implementation of a<br>
client and is much more extensive.<br>
The only downside of removing it  is that verification will require<br>
running the client testsuite, instead of being self-contained.<br>
<br>
Next up is how we test clients.<br>
<br>
The Java client, partially described above, runs all of the tests<br>
against ad-hoc embedded servers. Some of these tests, in particular<br>
those related to topology, start and stop new servers on the fly.<br>
<br>
The server integration testsuite performs yet another set of tests, some<br>
of which overlap the above, but using the actual full-blown server. It<br>
doesn&#39;t test for topology changes.<br>
<br>
The C++ client wraps the native client in a Java wrapper generated by<br>
SWIG and runs the Java client testsuite. It then checks against a<br>
blacklist of known failures. It also has a small number of native tests<br>
which use the server distribution.<br>
<br>
The Node.js client has its own home-grown testsuite which also uses the<br>
server distribution.<br>
<br>
Duplication aside, which in some cases is unavoidable, it is impossible<br>
to confidently say that each client is properly tested.<br>
<br>
Since complete unification is impossible because of the different<br>
testing harnesses used by the various platforms/languages, I propose the<br>
following:<br>
<br>
- we identify and group the tests depending on their scope (basic<br>
protocol ops, bulk ops, topology/failover, security, etc). A client<br>
which implements the functionality of a group MUST pass all of the tests<br>
in that group with NO exceptions<br>
- we assign a unique identifier to each group/test combination (e.g.<br>
HR.BASIC.PUT, HR.BASIC.PUT_FLAGS_SKIP_LOAD, etc). These should be<br>
collected in a &quot;test book&quot; (some kind of structured file) for comparison<br>
with client test runs<br>
- we refactor the Java client testsuite according to the above grouping<br>
/ naming strategy so that testsuite which use the wrapping approach<br>
(i.e. C++ with SWIG) can consume it by directly specifying the supported<br>
groups<br>
- other clients get reorganized so that they support the above grouping<br>
<br>
I understand this is quite some work, but the current situation isn&#39;t<br>
really sustainable.<br>
<br>
Let me know what your thoughts are<br>
<br>
<br>
Tristan<br>
--<br>
Tristan Tarrant<br>
Infinispan Lead<br>
JBoss, a division of Red Hat<br>
______________________________<wbr>_________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/infinispan-<wbr>dev</a><br>
</blockquote></div></div>