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


Groups > comp.software.testing > #221

Re: need REST API test automation harness/tool

From Jorgen Grahn <grahn+nntp@snipabacken.se>
Newsgroups comp.software.testing
Subject Re: need REST API test automation harness/tool
Date 2012-08-18 08:12 +0000
Message-ID <slrnk2ujjt.ph6.grahn+nntp@frailea.sa.invalid> (permalink)
References <a4606d64-671f-4d88-a8d5-7b8f030668c6@googlegroups.com> <a2f83514-cd89-4ce0-9a67-db951fe42a29@googlegroups.com>

Show all headers | View raw


On Fri, 2012-08-17, Asher Vilensky wrote:
...
> Jorgen: Yes, I'm already using curl.  I'm looking for a tool to
> automate my curl calls

Ah, sorry. You *did* write about that, but I only saw the part about
using some Firefox extension.  (Curl needs a longer name!)

I don't know ... "a tool to automate my curl calls" means I look into
shell scripting first. Specifically the bash shell, which is a pretty
decent programming language, and almost universally available on Unix.

But I'm rather good at large-scale shell scripting, and I always have
access to Linux machines. Not sure I'd recommend it in other situations.

Anyway, a caveman implementation could look like this. You arrange
your test data in directories, and:

    #!/bin/bash

    run_test() {
      local tc = shift
      curl --something $tc/input > $tc/output || return 1
      diff -q $tc/expected $tc/output || return 1
    }
    
    for tc in tests/* ; do
      run_test $tc || echo "$tc failed"
    done

It would be boring to deal with almost-identical tests, though -- easy
to get lost in the many directories.

/Jorgen

-- 
  // Jorgen Grahn <grahn@  Oo  o.   .     .
\X/     snipabacken.se>   O  o   .

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

csiph-web