<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>James Lorenzen's Blog - Latest Comments in Testing REST Services with Groovy</title><link>http://jlorenzen.disqus.com/</link><description></description><atom:link href="https://jlorenzen.disqus.com/testing_rest_services_with_groovy/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 11 Nov 2009 10:14:41 -0000</lastBuildDate><item><title>Re: Testing REST Services with Groovy</title><link>http://jlorenzen.blogspot.com/2009/01/testing-rest-services-with-groovy.html#comment-22726065</link><description>&lt;p&gt;The groovyx files are a part of the HTTPBuilder library I referenced in my post.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jlorenzen</dc:creator><pubDate>Wed, 11 Nov 2009 10:14:41 -0000</pubDate></item><item><title>Re: Testing REST Services with Groovy</title><link>http://jlorenzen.blogspot.com/2009/01/testing-rest-services-with-groovy.html#comment-22725917</link><description>&lt;p&gt;Looks like you have json dates set to javascript. What I think that means is that only javascript clients can consume that json. Disable that feature in your Config.groovy file and it should work.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jlorenzen</dc:creator><pubDate>Wed, 11 Nov 2009 10:13:48 -0000</pubDate></item><item><title>Re: Testing REST Services with Groovy</title><link>http://jlorenzen.blogspot.com/2009/01/testing-rest-services-with-groovy.html#comment-22658836</link><description>&lt;p&gt;Where are the groovyx libraries? They're not part of the groovy download.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">spasco</dc:creator><pubDate>Tue, 10 Nov 2009 21:52:25 -0000</pubDate></item><item><title>Re: Testing REST Services with Groovy</title><link>http://jlorenzen.blogspot.com/2009/01/testing-rest-services-with-groovy.html#comment-17338628</link><description>&lt;p&gt;Thanks for the example. I would like to see how you pass params and how you get a java object.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Wendy Xi</dc:creator><pubDate>Thu, 24 Sep 2009 20:38:22 -0000</pubDate></item><item><title>Re: Testing REST Services with Groovy</title><link>http://jlorenzen.blogspot.com/2009/01/testing-rest-services-with-groovy.html#comment-5883457</link><description>&lt;p&gt;See this idea plugin that formats JSON.&lt;br&gt;&lt;a href="http://dontmindthelanguage.wordpress.com/2009/02/05/intellij-json-formatter-plugin/" rel="nofollow noopener" target="_blank" title="http://dontmindthelanguage.wordpress.com/2009/02/05/intellij-json-formatter-plugin/"&gt;http://dontmindthelanguage....&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lorenzen</dc:creator><pubDate>Thu, 05 Feb 2009 22:53:39 -0000</pubDate></item><item><title>Re: Testing REST Services with Groovy</title><link>http://jlorenzen.blogspot.com/2009/01/testing-rest-services-with-groovy.html#comment-5418137</link><description>&lt;p&gt;Seems the &lt;a href="http://groovyx.net" rel="nofollow noopener" target="_blank" title="groovyx.net"&gt;groovyx.net&lt;/a&gt;....json class uses a different form of json than grails itself. The json interpreter used by the test doesn't accept the json generated by my grails controller. I get the following error:&lt;/p&gt;&lt;p&gt;Unquotted string 'new Date(1200092400000)'&lt;/p&gt;&lt;p&gt;net.sf.json.JSONException: Unquotted string 'new Date(1200092400000)'&lt;/p&gt;&lt;p&gt;	at net.sf.json.util.JSONTokener.nextValue(&lt;a href="http://JSONTokener.java" rel="nofollow noopener" target="_blank" title="JSONTokener.java"&gt;JSONTokener.java&lt;/a&gt;:445)&lt;/p&gt;&lt;p&gt;	at net.sf.json.JSONObject._fromJSONTokener(&lt;a href="http://JSONObject.java" rel="nofollow noopener" target="_blank" title="JSONObject.java"&gt;JSONObject.java&lt;/a&gt;:1128)&lt;/p&gt;&lt;p&gt;	at net.sf.json.JSONObject._fromString(&lt;a href="http://JSONObject.java" rel="nofollow noopener" target="_blank" title="JSONObject.java"&gt;JSONObject.java&lt;/a&gt;:1317)&lt;/p&gt;&lt;p&gt;	at net.sf.json.JSONObject.fromObject(&lt;a href="http://JSONObject.java" rel="nofollow noopener" target="_blank" title="JSONObject.java"&gt;JSONObject.java&lt;/a&gt;:185)&lt;/p&gt;&lt;p&gt;	at net.sf.json.JSONSerializer.toJSON(&lt;a href="http://JSONSerializer.java" rel="nofollow noopener" target="_blank" title="JSONSerializer.java"&gt;JSONSerializer.java&lt;/a&gt;:139)&lt;/p&gt;&lt;p&gt;	at net.sf.json.JSONSerializer.toJSON(&lt;a href="http://JSONSerializer.java" rel="nofollow noopener" target="_blank" title="JSONSerializer.java"&gt;JSONSerializer.java&lt;/a&gt;:103)&lt;/p&gt;&lt;p&gt;	at net.sf.json.groovy.JsonSlurper.parseText(&lt;a href="http://JsonSlurper.java" rel="nofollow noopener" target="_blank" title="JsonSlurper.java"&gt;JsonSlurper.java&lt;/a&gt;:78)&lt;/p&gt;&lt;p&gt;	at groovyx.net.http.ParserRegistry.parseJSON(&lt;a href="http://ParserRegistry.java" rel="nofollow noopener" target="_blank" title="ParserRegistry.java"&gt;ParserRegistry.java&lt;/a&gt;:185)&lt;/p&gt;&lt;p&gt;Here's the json generated by the controller:&lt;/p&gt;&lt;p&gt;{"id":18,"class":"Kandidaat","aanbiedingenPerPost":false,"achternaam":"Willemsen","dossierNummer":"10","etage":"3","huisletter":"a","huisnummer":"12","inschrijfDatum":new Date(1200092400000),"kamerbehoefte":"4","postcode":"1234 ab","reacties":[],"redenAfvoer":null,"soort":"Geindiceerde","straatnaam":"Nieuwe stationsstraat","voorletters":"AB","voorvoegsel":"","woningNetNummer":"10","woonplaats":"Amsterdam"}&lt;/p&gt;&lt;p&gt;Any idea how to fix this?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andrej</dc:creator><pubDate>Wed, 21 Jan 2009 03:15:47 -0000</pubDate></item><item><title>Re: Testing REST Services with Groovy</title><link>http://jlorenzen.blogspot.com/2009/01/testing-rest-services-with-groovy.html#comment-5251789</link><description>&lt;p&gt;I know Kit. I just like to give you a hard time.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lorenzen</dc:creator><pubDate>Sat, 17 Jan 2009 19:13:52 -0000</pubDate></item><item><title>Re: Testing REST Services with Groovy</title><link>http://jlorenzen.blogspot.com/2009/01/testing-rest-services-with-groovy.html#comment-5240687</link><description>&lt;p&gt;Cool James.  I'm not really that mad either.  ;)&lt;/p&gt;&lt;p&gt;The cool thing about your approach here is that it is super simple to add in non-happy-path testing too.  For example you want to ensure that a PUT to an invalid "id" returns the appropriate error - do so is quick and painless.  &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">kitplummer</dc:creator><pubDate>Sat, 17 Jan 2009 14:01:13 -0000</pubDate></item></channel></rss>