This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to test struts action class

 
sush dod
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
i am trying to write a test case for a struts action call.
in the action call i am trying to send a file on the response output stream.
when i get the output stream using response.getOutputstream i get a object of ServletOurtputStream.
which is a abstract class..
i then write a byte stream on the output stream and fluch it to close
i am confused as to how to write a test case.
can sombody help me here?
any example?

regards,

Sush
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sush,
The first thing to decide is if you want to write a unit test (with mock objects) to test the action class directly or an integration test through the GUI. I recommend a unit test.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic