Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.software.testing > #308

Re: need REST API test automation harness/tool

Newsgroups comp.software.testing
Date 2013-07-18 03:06 -0700
References <a4606d64-671f-4d88-a8d5-7b8f030668c6@googlegroups.com> <e95b675d-acd9-4db1-859f-4e15abe4e291@googlegroups.com>
Message-ID <91e96dfd-6151-4aa9-8823-e5ccc18d8b14@googlegroups.com> (permalink)
Subject Re: need REST API test automation harness/tool
From leonardaye@gmail.com

Show all headers | View raw


On Monday, May 27, 2013 10:49:24 AM UTC+2, frank.s...@gmail.com wrote:
> On Thursday, August 16, 2012 2:33:39 PM UTC+2, Asher Vilensky wrote:
> 
> > Does anybody know of a tool to automate REST API testing?  Let me give a brief example of what I'm looking for.  Right now I'm using both Poster (FireFox add-on) or curl to do something like this:
> 
> > 
> 
> > 
> 
> > 
> 
> > Post:  http://host:8080/<some path>/<API name>/<parameters>
> 
> > 
> 
> > 
> 
> > 
> 
> > Content to send (json):
> 
> > 
> 
> > {
> 
> > 
> 
> > "Name":"Asher-1",
> 
> > 
> 
> > "Address1":"some St",
> 
> > 
> 
> > "City":"some city",
> 
> > 
> 
> > "Zipcode":"00000",
> 
> > 
> 
> > "ContactPhone":"11231231234"
> 
> > 
> 
> > }
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > I'm doing this manually.  What I'd like to do is automate the above with different parameters and different json's.  Also, I have many different API's to test.  So the question is if anybody knows of an automated test tool that can do this.  I'm already familiar with things like Selenium and other GUI-based tools.  I'm NOT looking for that.
> 
> > 
> 
> > Thanks.
> 
> 
> 
> What we've done is to write the tests in Python using the requests module, nosetest for the test runner and GNU parallel to run tests in parallel from a Jenkins job. We have a handful of helper methods which deal with authentication and also extended the nosetest asserts to handled additional cases (e.g. StringInDictNotEmpty). Pythons' default values on methods are really helping here.
> 
> 
> 
> The code is simple and easy to maintain. It gives you full control on the error reporting and you can make writing the tests as simple as you can by adding more helper methods. You can also write lots of very simple and very complex tests in the same framework, e.g. tests that need to create entries, wait 5 seconds, check 3 other systems and so forth. PyCharm from JetBrains is an invaluable tool for debugging the tests for us.
> 

Hi Frank

I'm looking for a way to tests REST APIs, using Python as well and I'm intrigued by your solution. Can you shed some more light on the subject? Alternately, you can send me email directly to leonardaye @ gmail dot com.

Thanks
 

Back to comp.software.testing | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

need REST API test automation harness/tool Asher Vilensky <dorfa1@gmail.com> - 2012-08-16 05:33 -0700
  Re: need REST API test automation harness/tool jasnow1@gmail.com - 2012-08-16 06:03 -0700
    Re: need REST API test automation harness/tool Asher Vilensky <dorfa1@gmail.com> - 2012-08-16 11:54 -0700
      Re: need REST API test automation harness/tool jasnow1@gmail.com - 2012-08-16 12:28 -0700
  Re: need REST API test automation harness/tool Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-08-16 21:17 +0000
  Re: need REST API test automation harness/tool jasnow1@gmail.com - 2012-08-16 14:58 -0700
  need REST API test automation harness/tool "dumitru.corobceanu" <dumitru.corobceanu@gmail.com> - 2012-08-16 15:49 -0700
  Re: need REST API test automation harness/tool Asher Vilensky <dorfa1@gmail.com> - 2012-08-17 04:40 -0700
    Re: need REST API test automation harness/tool Asher Vilensky <dorfa1@gmail.com> - 2012-08-17 05:54 -0700
    Re: need REST API test automation harness/tool Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-08-18 08:12 +0000
    Re: need REST API test automation harness/tool "dumitru.corobceanu" <dumitru.corobceanu@gmail.com> - 2012-08-23 13:37 -0700
      Re: need REST API test automation harness/tool merrin.kurian@gmail.com - 2012-12-19 05:14 -0800
      Re: need REST API test automation harness/tool srinidhi23@gmail.com - 2013-09-09 04:51 -0700
        Re: need REST API test automation harness/tool matti.hjelm@gmail.com - 2013-10-06 15:03 -0700
          Re: need REST API test automation harness/tool yashwanthpanji@gmail.com - 2014-03-21 01:40 -0700
  Re: need REST API test automation harness/tool markdrury <markdrury@gmail.com> - 2013-01-02 14:34 -0800
  Re: need REST API test automation harness/tool frank.schroeder@gmail.com - 2013-05-27 01:49 -0700
    Re: need REST API test automation harness/tool leonardaye@gmail.com - 2013-07-18 03:06 -0700
  Re: need REST API test automation harness/tool srinidhi23@gmail.com - 2013-09-09 04:52 -0700
    Re: need REST API test automation harness/tool TomKes <tomkessler3@gmail.com> - 2013-10-03 17:20 -0700
  Re: need REST API test automation harness/tool huntgathergrow@gmail.com - 2014-04-08 14:52 -0700
  Re: need REST API test automation harness/tool brandonwanamaker.emma@gmail.com - 2014-04-08 14:55 -0700
  Re: need REST API test automation harness/tool Fletcher Wason <minottech@gmail.com> - 2015-03-30 18:47 -0700

csiph-web