aspose file tools*
The moose likes Web Services and the fly likes Webservice mockito testing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Webservice mockito testing" Watch "Webservice mockito testing" New topic
Author

Webservice mockito testing

Sameer Nagarhalli
Greenhorn

Joined: Oct 31, 2011
Posts: 1

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
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
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!


My free books and tutorials: http://www.slideshare.net/krizsan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Webservice mockito testing