In firefox, I can exectue "http://XXXXXXXXXXXXXX:8080/myapp/INTEGRATIONSERVLETTEST/INTEGRATIONSERVLETTEST?foo=hello&bar=world&action=TESTACTION" All looks ok, I get the response back that I expect.
output from hitting action
my tcpip monitor is showing that I am pulling myForm.html When I run the unitest.
When I add debug statements for any param they show up correctly.
my ethernet sniffer shows no request to myapp/INTEGRATIONSERVLETTEST/INTEGRATIONSERVLETTEST
I get a null pointer exception at the testform.submit().
My reading of the WebForm api is that WebForm.submit() will submit the form to the server at the address in the form action attribute. Any idea what I am doing wrong???
CIAO Peter M. Cooke
Joined: Mar 16, 2004
The test started working when I put in values for all html inputs.
So if I have a html form and it does not require all inputs to have data. Why does httpunit?
Is there somehting wrong with the form or my testcode that says "yes I know the form does not have values for all input. submit it anyways"
HMMMM my ethernet sniffer confirms that unless my form has all of it's input elements populated it will not go accross the wire.
If I have assignments for both everything works and I see the request/response in my ethernet sniffer.
I remove the assignment of the value from either "some_param" or "another_param" my ethernet sniffer does NOT detect the request from the submit, and submit fails with a null pointer exeception in
Joined: Sep 06, 2012
Agree with Ulf that you are passing Null values in these 2 fields which may be the source of the exception.
I dont see any other reason for throwing this NullPointerException