Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rest API Testing from commandline

Tags:

rest

testing

I am preparing a SDK, and SDK as of now, does not have CI system separately.

I want to test some REST endpoints which should be available when the user uses SDK to create the software and try to run with our framework.

I have written all the manual steps in shell script and planning to put the script as crontab to run it every few hours.

Now, for rest end point testing, I was thinking of just using curl and checking if we getting data back. but this can turn into a lot of work,as we expand the functionality. I looked into frisby framework which kind of suits my needs.

Is there any recommendation for allowing me to test rest services when the framework software is started.

like image 459
Himz Avatar asked Sep 14 '25 01:09

Himz


1 Answers

Probably swat is exactly what you need. Reasons :

  • This is DSL for web, rest services test automation
  • it uses curl command line API to create http requests
  • it is both DSL and command line tool to run test scenarios written on DSL
  • it is configurable both from bash style scripts and general configs
  • it is very easy to start with
  • probably in your case curl based test cases could be easily converted into swat DSL format

(*) disclosure - I am the author of swat.

like image 68
Alexey Melezhik Avatar answered Sep 15 '25 22:09

Alexey Melezhik