From: "Gustavo Fernandes" <gustavo@infinispan.org>
To: "infinispan -Dev List" <infinispan-dev@lists.jboss.org>
Sent: Friday, September 30, 2016 5:58:27 AM
Subject: Re: [infinispan-dev] Hot Rod testing



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

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
It takes 6 steps to profit?!

I think the idea of writing the TCK once and being able to generate the code in the native language of the client is a great idea. The issue will be when we have a Hot Rod client in a language that Haxe doesn't support. (Go?)

Thanks,
Alan


My 2p,
Gustavo



Tristan

--
Tristan Tarrant
Infinispan Lead
JBoss, a division of Red Hat

_______________________________________________
infinispan-dev mailing list
infinispan-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev



_______________________________________________
infinispan-dev mailing list
infinispan-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev