0

I am a pretty naive programmer looking forward to test my web app with Fitnesse + (HttpUnit/ServletUnit). The idea is to test the action/representation layer in completeness, I do not intend to test/assert on the final HTML response received rather I am interested in testing the data at the point where my action code forwards the response to JSP. Is there a way I can achieve this ? . Using HttpUnit when I receive the response it contains the final HTML, can I do better and test on httpresponseobject ? Moreover what exactly is the difference between using HttpUnit vs ServletUnit , I mean for what testing behavior in mind would one go for the one over other ?

I'll appreciate the Help.

Tyler Hyndman
  • 1,402
  • 3
  • 17
  • 24
Bhuvnesh Pratap
  • 437
  • 1
  • 5
  • 16

1 Answers1

0

According ServletUnit's documentation, it's used for testing servlet. HttpUnit is used for testing web page, I think it's mainly for verifying HTML content after I read its several test case examples.

If you only want to verify the transferred data and parameter between HTTP request and response, you should adopt ServletUnit. It also allows you to get Http session.

Hawk
  • 897
  • 7
  • 14