I'd like to test a servlet that is used for handling requests posted from html forms. What I'd like to do is test the funtioning of this servlet using HttpUnit. Is it possible to do this without having to first use something like:
WebForm form = response.getForms()[0];?
What I need to do is configure a request with the proper parameters ( i.e. request.setParameter( "blah", "blah" ) ) and then post this request to my servlet. But what I can't work out is how to simulate the form submission. Any hints appreciated.
Ben
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there,
I'd like to test a servlet that is used for handling requests posted from html forms. What I'd like to do is test the funtioning of this servlet using HttpUnit. Is it possible to do this without having to first use something like:
WebForm form = response.getForms()[0];?
What I need to do is configure a request with the proper parameters ( i.e. request.setParameter( "blah", "blah" ) ) and then post this request to my servlet. But what I can't work out is how to simulate the form submission. Any hints appreciated.
Ben