JSON API using cucumber and watir webdriver

437 views
Skip to first unread message

watir webdriver

unread,
Apr 9, 2013, 12:08:24 PM4/9/13
to watir-...@googlegroups.com
Hi,

I've to test JSON API using cucumber and watir webdriver.Are there any links or docs available ?

Thanks in-advance..

Chuck van der Linden

unread,
Apr 9, 2013, 1:13:18 PM4/9/13
to watir-...@googlegroups.com
I would not test an API with Watir.   Watir is made for driving web browsers and interacting with a website as a user would, it is not designed or intended for API testing in any way shape or form.

What I've used for testing an API (in my case a REST based API) was

   Cucumber
    Rest-client gem  (for doing requests and dealing with responses)
    JSON-Spec gem (for validation steps)

The code I wrote was very similar to the example of API testing given in "The Cucumber Book" from Pragmatic Programmers

A recording of a presentation I gave on this about a year ago can be found here  https://github.com/watir/watir-bazaar/wiki/Presentations 

watir webdriver

unread,
Apr 11, 2013, 4:48:47 AM4/11/13
to watir-...@googlegroups.com

Thanks for your reply Chunk...I'm afraid,the presentation for REST API on github is no longer available.
I've tested few REST API scenarios using cucumber and watir webdriver.
Apart from that we've few JSON integration scenarios to be tested...Is there any way to automate JSON Integration ?
Thanks in-advance.

Oscar Rieken

unread,
Apr 11, 2013, 8:02:25 AM4/11/13
to watir-...@googlegroups.com
I agree with chuck
to me it seems testing a webservice with a tool made for automating the browser is like using the back of a screwdriver to drive a nail in. yes it works but it might not be the best way to do it.

I would suggest just sending requests directly to the api using something like http-client or something similar, it wont cost you the time of launching the browser which will save you lots of time in the long run. 




--
--
Before posting, please read http://watir.com/support. In short: search before you ask, be nice.
 
watir-...@googlegroups.com
http://groups.google.com/group/watir-general
watir-genera...@googlegroups.com
 
---
You received this message because you are subscribed to the Google Groups "Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to watir-genera...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Chuck van der Linden

unread,
Apr 15, 2013, 6:26:35 PM4/15/13
to watir-...@googlegroups.com
Thanks for the heads up on that... (dammit)  I think Z is already checking with the Kondoot folks to try and figure out what happened to our videos

Željko Filipin

unread,
Apr 16, 2013, 3:39:42 AM4/16/13
to watir
On Tue, Apr 16, 2013 at 12:26 AM, Chuck van der Linden <cvande...@climate.com> wrote:
I think Z is already checking with the Kondoot folks to try and figure out what happened to our videos

Yes, but no reply so far.

Željko

watir webdriver

unread,
Apr 17, 2013, 6:06:36 AM4/17/13
to watir-...@googlegroups.com
Thanks a lot for the response....Plz let me know if you hear anything from Kondoot guys.




On Tuesday, April 9, 2013 5:08:24 PM UTC+1, watir webdriver wrote:
Reply all
Reply to author
Forward
0 new messages