• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Testing restful web service

 
Dan King
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've recently added upload capabilities to a restful web service. However, I'm unsure as to how I can test this capability. Anyone have suggestions?
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
What kind of testing do you want to do? Unit testing?
Have you tried testing with soapUI, which not only allows for testing of SOAP web services, but also REST web services.
Best wishes!
 
Dan King
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ivan Krizsan wrote:Hi!
What kind of testing do you want to do? Have you tried testing with soapUI, which not only allows for testing of SOAP web services, but also REST web services.
Best wishes!


Hi Ivan,

I'd like to do "integration" testing -- essentially I want to test whether my web service 1. accepts the request 2. processes the multipart post.

No, I haven't tried soapUI since it has no support for multipart post. Thanks.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I can only think of the following way:
- Mock out all subsystems used by the RESTful web service.
- Start the RESTful web service.
If you do not want to start it in the container it is to run in, then you may want to consider Jetty.
- Have a client, either an existing one or one specially implemented for the test, issue requests to the service.
- Assert the usage of the mocked subsystems by the RESTful web service for each request.

If not entirely suitable for your needs, then the above will hopefully provide some inspiration.
Best wishes!
 
kri shan
Ranch Hand
Posts: 1473
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
junit moght help for Testing restful web service
 
Dan King
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ivan Krizsan wrote:Hi!
I can only think of the following way:
- Mock out all subsystems used by the RESTful web service.
- Start the RESTful web service.
If you do not want to start it in the container it is to run in, then you may want to consider Jetty.
- Have a client, either an existing one or one specially implemented for the test, issue requests to the service.
- Assert the usage of the mocked subsystems by the RESTful web service for each request.

If not entirely suitable for your needs, then the above will hopefully provide some inspiration.
Best wishes!


Thanks for the suggestions. I ended up using jetty to start the service and then a ruby script to send multipart posts to the service.
 
kri shan
Ranch Hand
Posts: 1473
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jersey client supports the Restful WebServices testing.
 
Anurag Verma
Ranch Hand
Posts: 168
Hibernate Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can try AdvancedRestClient plugin of chrome.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic