Test Automation for rest-client

1,619 views
Skip to first unread message

dongjin

unread,
Apr 21, 2011, 12:49:24 PM4/21/11
to rest-client
Hi, I've started to use rest-client for testing some restful
webservice APIs.

Could you advise me the best way to automate tests using rest-
cilent ?

Can I use JUnit for this ? or if that is not possible, or that is not
the best way, please recommend me the best way of automating this kind
of API tests.

Thank you for your help in advance!

Dongjin Son

Subhash Chandran

unread,
Apr 25, 2011, 12:31:58 AM4/25/11
to rest-...@googlegroups.com
The best way to automate:

1. Write the test-request using the RESTClient UI. Also write the JUnit test case as described in http://code.google.com/p/rest-client/wiki/TestingTutorial
2. Execute the above request, and save the request (available in File menu).
3. Save all the requests to a particular directory.

4. Using RESTClient CLI, execute the request files in the saved directory:

java -jar wiztools/restclient-cli-2.3.3-jar-with-dependencies.jar *.rcq -o /tmp/

Subhash.


--
You received this message because you are subscribed to the Google Groups "rest-client" group.
To post to this group, send email to rest-...@googlegroups.com.
To unsubscribe from this group, send email to rest-client...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rest-client?hl=en.




--
Regards,
Subhash Chandran S

Founder http://FileIt.in/

dongjin

unread,
Apr 25, 2011, 7:59:16 PM4/25/11
to rest-client

First of all, thank you for your kind answser :)

Actually, I wanted to know the way of using rest-client together with
something like JUnit/ Groovy
so that I can I can process or mange the test case better.
It might not be possible to use rest-client together with JUnit I
guess.

BTW, when I tried your suggested way, I can only se the total number
of tests executed, total failures, and
total errors.

Is there any way so that I can also see which requests are failed,
and also see the fail message that I've put inside test script ?

If I can get those information, it will be much better.

Thanks again, and please let me know how can I get these extra
information
from the batch test run, if you know the method by any chance.

Dongjin


On Apr 24, 9:31 pm, Subhash Chandran <sub...@gmail.com> wrote:
> The best way to automate:
>
> 1. Write the test-request using the RESTClient UI. Also write the JUnit test
> case as described inhttp://code.google.com/p/rest-client/wiki/TestingTutorial

Chuck Doucette

unread,
Feb 26, 2014, 5:01:30 PM2/26/14
to rest-...@googlegroups.com
I would like to create requests and expected responses interactively, save them, and then run the command line tool to verify that the actual response body matches the original response? Can I do that without writing test code (or using other file comparison tools)?

Thanks,
Chuck

Reply all
Reply to author
Forward
0 new messages