• 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 A Java Web Application

 
Ranch Hand
Posts: 240
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi;

How are people out there testing web applications?

Something that could submit data to a server and than analyze what the server returns. I have heard of Load Runner. I'm looking for an open source Java option.

Anyone know of anything?

Thanks,

Luke
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have done this with HttpClient - Apache Software Foundation open source.
Here is the base web page.
There is also the HTTPUnit approach if you like JUnit based testing.
Bill
 
Luke Shannon
Ranch Hand
Posts: 240
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perfect! Thanks.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For a JUnit based tool, I'd rather use jWebUnit or HtmlUnit.

A good non-JUnit alternative might be FitNesse.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to Testing...
 
Luke Shannon
Ranch Hand
Posts: 240
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wow. A testing section, cool!

Anyway, I'm checking all the various testing packages for a simple API to login into a site (form login) and submit some requests.

Submitting requests is easy. Its the loggin in that is frustrating me.

I have been unable to get it working with HTTPClient, I'm currently looking through the documentation of jWebUnit for code examples.

Can anyone help me with this? I don't care what package I use. I just want to be able to test this secure site.

Thanks,

Luke
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HttpClient is an API for making HTTP requests and getting back the response. That's why you really should be looking at HttpUnit, jWebUnit or HtmlUnit which also let you make assertions against the pages.

Regarding user input, this is (roughly) how you'd do it with HttpUnit:
reply
    Bookmark Topic Watch Topic
  • New Topic