<div dir="ltr">On Fri, Sep 30, 2016 at 9:40 AM, Tristan Tarrant <span dir="ltr">&lt;<a href="mailto:ttarrant@redhat.com" target="_blank">ttarrant@redhat.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 23/09/16 17:33, Galder Zamarreño wrote:<br>
&gt; ^ I thought about all of this when working on the JS client, and although like you, I thought this was the biggest hurdle, eventually I realised that there are bigger issues than that:<br>
&gt;<br>
&gt; 1. How do you verify that a Javascript client works the way a Javascript program would use it?<br>
&gt; IOW, even if you could call JS from Java, what you&#39;d be verifying is that whichever contorsionate way of calling JS from Java works, which might not necessarily mean it works when a real JS program calls it.<br>
</span>If a specific language API wants to &quot;feel native&quot; in its environment<br>
that is fine, and there should be local tests to exercise that, but from<br>
a protocol compliance point of view this is irrelevant. We need to<br>
verify that:<br>
<br>
- for each Hot Rod operation and variant (e.g. flags, metadata) the<br>
client is sending the correct request.<br>
- the client should also be able to correctly process the response,<br>
again with different variations (result, not found, errors, metadata)<br>
- for the different client intelligence levels the client should be able<br>
to correctly process the returned headers  (topology, hashing, etc)<br>
- the client should correctly react to topology changes and failover<br>
- the client should correctly react to events and fire the appropriate<br>
listeners<br>
- the client should be able to correctly handle encryption handshaking<br>
and report error situations properly<br>
- the client should be able to correctly handle authentication and<br>
report error situations properly for the client-supported mechanisms<br></blockquote><div><br><br></div><div>I wonder if something like Haxe [1] could help here in defining a language agnostic <br></div><div>TCK (maybe an skeleton?) that gets compiled to several platforms. Each platform&#39;s <br>testsuite would them &quot;implement&quot; the spec and of course would be free to add <br>&#39;native&#39; tests as well. There&#39;s also a unit test framework built on top of [1], worth exploring<br></div><div><br>[1] <a href="https://haxe.org/">https://haxe.org/</a><br></div><div>[2] <a href="https://github.com/massiveinteractive/MassiveUnit/">https://github.com/massiveinteractive/MassiveUnit/</a> <br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Additionally client might wish to test for the following, but this is<br>
not part of the protocol specification:<br>
<br>
- marshalling<br>
- async methods<br>
- site failover<br>
- language-specific synctactic sugar<br>
<br>
Also, to provide a common ground for the server configuration used by<br>
both types of tests (TCK and client-specific), we should really use<br>
docker containers with appropriately named configs together with common<br>
scripts that recreate the test scenarios, so that each testsuite doesn&#39;t<br>
have to reinvent the wheel.<br>
<div class="gmail-HOEnZb"><div class="gmail-h5"><br></div></div></blockquote><div><br></div><div>+1 for docker, as it no longer requires the hack of having VirtualBox on non-Linux platforms.<br></div><div>From my experience, most of the testing cases don&#39;t even need huge pre-canned XMLs, all<br></div><div>configurations can be achieved by runtime manipulation of the server model.<br></div><div><br></div><div>Cheers,<br></div><div>Gustavo<br></div><div><br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">
Tristan<br>
<br>
--<br>
Tristan Tarrant<br>
Infinispan Lead<br>
JBoss, a division of Red Hat<br>
<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></div></div></blockquote></div><br></div></div>