• 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

Webservice and JUnit

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would like to know if JUnit is the right tool for testing webservices. I have a webservice and I create a JUnit class to test it. I can not understand why it takes forever and I mean forever to run the test suite. If anyone has any idea, please respond to this.

TIA.
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You cannot use Junit to test the whole webservice, instead you can write junit test cases to test the individual methods of the service / test the operations of the service.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are two approaches to testing a WS. Either you can test the individual service methods. That is trivial to do if the class that implements them has no dependencies on other classes, in particular not on a runtime WS engine. The other way is test a deployed WS by sending it a request and parsing the response. That depends on the WS being deployed somewhere, and could thus introduce network latencies.

Having said that, it's not clear from your post which of the two ways you're going. Can you be more specific?
 
Bob Green
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you so much for all your inputs. My webservice calls another webservice. One thing I forgot to mention in my previous note was my webservice has security on it. I tested my webservice with JUnit and as I said before it takes forever to run. Yesterday, I decided to remove the security on my webservice and gave it another try. Guess what, it did not take that long to run at all. I've used SSL for the security. I am wondering does this make any sense to any of you or am I doing something wrong.

I am confused....

TIA
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic