[infinispan-dev] Hot Rod testing

Gustavo Fernandes gustavo at infinispan.org
Fri Sep 30 05:58:27 EDT 2016


>
>
>
> I wonder if something like Haxe [1] could help here in defining a language
> agnostic
> TCK (maybe an skeleton?) that gets compiled to several platforms. Each
> platform's
> testsuite would them "implement" the spec and of course would be free to
> add
> 'native' tests as well. There's also a unit test framework built on top of
> [1], worth exploring
>
> [1] https://haxe.org/
> [2] https://github.com/massiveinteractive/MassiveUnit/
>
>
This is an idea of how to use it:

1) Define an interface using the Haxe language (just assume syntax is
correct):

interface IHotRodClient {
   get(Object k)
   put(Object k, Object value)
   etc
}

2) Write the TCK in terms of that interface. The Haxe language has lots of
libraries, including unit tests:

class TCK {

   test1( ) { ... }
   test2( ) { ... }
   etc

   void Main(IHotRodClient client)
        new TCK(client).run()
}

3) Cross compile the TCK and distribute it as jar, dll, js, etc
4) Each Hot Rod client consumes the artifact above
5) Each Hot Rod runs the TCK passing its implementation of IHotRodClient
6) Profit

My 2p,
Gustavo



>
>>
>> Tristan
>>
>> --
>> Tristan Tarrant
>> Infinispan Lead
>> JBoss, a division of Red Hat
>>
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20160930/2cf4fc15/attachment.html 


More information about the infinispan-dev mailing list