• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Webservice mockito testing

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi to all,

I need some help on Webservice unit testing.
My requirement is to test the functionality for sync and async calls to the webservice.
for sync i need to verify for 200 Ok response and for async i should expect null.
The implementation is done for this, only the testing part is remaining and that should be done thru mockito/powermock.
I need your help on how to begin this.....

thanks
Sameer
 
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 am not entirely sure, but it sounds like you want to test the client of the web service.
If that is the case and assuming you are using generated client artifacts of some sort, then you should have no problem mocking the web service client stub using your favourite mocking framework.
Generated artifacts usually contain a service interface, which I would use to create a mock stub. There are no details in your questions, so I cannot give a more in-depth answer, I am afraid.
Best wishes!
reply
    Bookmark Topic Watch Topic
  • New Topic