• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Testing restful web service

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 1491
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
jersey client supports the Restful WebServices testing.
 
Ranch Hand
Posts: 171
Hibernate Spring Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can try AdvancedRestClient plugin of chrome.
 
Skool. Stay in. Smartness. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic