[searchisko-dev] First arquillian test in PR

Jason Porter jporter at redhat.com
Tue Oct 15 22:36:04 EDT 2013


I have the first, yes it's somewhat basic, Arquillian test in my Pull Request now. Before I continue and move forward, I'm seriously considering pulling in Groovy and Spock (BDD style tests) for some of these functional tests as we're dealing with (or could be) large json strings being returned. Groovy would make it very easy to parse and traverse the json (taken from the Groovydoc):

   def slurper = new JsonSlurper()
   def result = slurper.parseText('{"person":{"name":"Guillaume","age":33,"pets":["dog","cat"]}}')

   assert result.person.name == "Guillaume"
   assert result.person.age == 33
   assert result.person.pets.size() == 2
   assert result.person.pets[0] == "dog"
   assert result.person.pets[1] == "cat"

That really makes it easy to verify the return of a json object. You can see a basic Spock test at https://code.google.com/p/spock/. I'd like to hear your thoughts before I move forward.


More information about the searchisko-dev mailing list