Skip to content

MG-RAST/API-testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a7e1fdd · May 16, 2019
Dec 13, 2016
Dec 13, 2016
May 15, 2019
Sep 1, 2016
Mar 2, 2018
Feb 26, 2018
Feb 27, 2018
Feb 26, 2018
Feb 8, 2019
Feb 5, 2019
Feb 15, 2018
Feb 8, 2019

Repository files navigation

API-testing

test script and data for MG-RAST API tests

This script harvests example API calls from the MG-RAST API at http://api.mg-rast.org/1, invokes them with curl, and compares the outputs to previously saved outputs in the data directory.

API-testing.py -t   # generates a list of the example API calls

This invokation runs tests and puts output in word directoery genereates files

API-testing.py -f -w work
f7f488249d0fbc943fa0c9ca27707a1c.call  # contains the URI
f7f488249d0fbc943fa0c9ca27707a1c.err   # HTTP headers
f7f488249d0fbc943fa0c9ca27707a1c.test  # judgement pass/fail
f7f488249d0fbc943fa0c9ca27707a1c.time  # time to return (s)
f7f488249d0fbc943fa0c9ca27707a1c.out   # output from API server
additionally, if the test fails, the script generates 
f7f488249d0fbc943fa0c9ca27707a1c.out1  and 
f7f488249d0fbc943fa0c9ca27707a1c.out2  
to facilitate debugging the differences.

build & run

docker build -t mgrast/api-testing .
docker run -ti --rm --name api-testing mgrast/api-testing