aspose file tools*
The moose likes Testing and the fly likes How to get request scope attribute values thru HttpUnit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "How to get request scope attribute values thru HttpUnit" Watch "How to get request scope attribute values thru HttpUnit" New topic
Author

How to get request scope attribute values thru HttpUnit

saritha Reddy
Greenhorn

Joined: Jan 12, 2005
Posts: 6
My application is built using struts 1.1. We are also using tiles concept.I'm trying to execute some Unit test case using HttpUnit & JUnit. At Java layer I set one ArrayList to request using request.setAttribute().How can i retrive this attribute values in my HttpUnit TestCase.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
You can't, because httpUnit actually isn't a unit testing framework. It's a system testing framework simulating a web client, so all you can do is make assertions about information available at the client side (HTML, cookies etc.).

HttpUnit is coming with ServletUnit that you could possibly be used for this. I'm not totally sure, though. Take a look at the documentation on the httpUnit homepage...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get request scope attribute values thru HttpUnit