Thanks to Chris, Gabriel for your comments.
I finally got this to work yesterday. A neat solution probably requires
refactoring StrutsTestCase and deriving a new class
(StrutsMultipartTestCase) from it. In the meantime the following changes
will work subject to a couple of limitations: -
This onl
First of all, I assume you're trying to test your own code, not the
framework. With that in mind, by the time the file gets to your action,
it's just a series of parameters (which could be slightly different
depending on which underlying Multipart support you are using). So, my
suggestion would be
Coincidentally, yesterday I was struggling with testing a file upload.
I was not using S2 as web framework but I was using Commons
Fileupload, which IIRC is the default S2 upload component.
I must say that my first strategy was trying to use Spring's
MockMultipartHttpServletRequest and MockMultipa
3 matches
Mail list logo