rest assured and spock

406 views
Skip to first unread message

Federico Piazza

unread,
Apr 7, 2018, 5:25:10 PM4/7/18
to rest-a...@googlegroups.com
Hi guys,

We were using rest assured with junit and decided to give up junit and use spock.

Its data driven test made our test looking much more elegant and we reduce 10 cases in just 1 test with @Unroll.

However, I wanted your opinion about using rest assured with spock. Is it recommended to keep using Rest Assured. The reason I ask this is that spock uses the blocks given:, when: and then:   and Rest Assured also uses the same.

Regards,
Federico

Todd Bradley

unread,
Apr 8, 2018, 11:36:23 AM4/8/18
to rest-a...@googlegroups.com
I can't really address your question directly, but my path was sort of the opposite. We started writing tests in Groovy, using Spock and Groovy's built-in REST testing support. We quickly tired of Groovy, so switched to Java and TestNG, and found REST-assured to be a good Java-compatible substitute for Groovy's REST testing stuff.

I guess my question is this: If you're writing tests in Groovy, where do the built-in REST client and Spock fall short for what you need? As far as the confusion of two different sets of given/when/then statements, it would be hard to mix them up because they're used so differently between Spock and REST-assured. But I agree the names are weird. That said, in REST-assured, they're mostly there just to make the code read more like English.


Todd.


--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages