aviaviavi / curl-runnings

A declarative test framework for quickly and easily writing integration tests against JSON APIs.
MIT License
158 stars 13 forks source link

HTTP support #64

Open meiremans opened 4 years ago

meiremans commented 4 years ago

I'm currently writing a workaround to be able to do an HTTP request, with the test JSON in the body piping it to a file, run curl runnings and then piping the output back to the result of the call.

This way curl runnings could integrate with my front end to select test cases.

Would it be possible to support this natively?

in case you are interested, I just wrote a small node wrapper around it. You can find it here:

https://github.com/meiremans/curl-runnings-http

aviaviavi commented 4 years ago

Interesting! It certainly could be done. On the other hand now that you've made a separate repo, keeping that separated might actually be the better way to go. The concerns of running curl-runnings itself and this is web service are nicely decoupled here, so I might lean towards keeping it way. Open to suggestions though!

Now that you've written curl-runnings-http, do you think it would be advantageous to merge them / add this server functionality? What are those advantages?

meiremans commented 4 years ago

The disadvantage -for now- is that i just write the input to json file, start curl runnings, write to output file and then read that file.

So it's not multi threaded, only 1 test can be run at the same time. but so is the original curl runnings.

Anyway I proposed the functionality because I needed it and it didn't exist. If somebody else needs it too a, he has to go through the hassle of installing docker or nodejs.