I always test against my real production struts.xml because I need to be sure
it is correct. I want my test to ensure the Actions, Results, and
Interceptors are all configured correctly.
I see your struts-test package does NOT extends="struts-default", so you
are missing all the default configur
Hi Greg / all,
I've gone back to Greg's example and I'm getting the stack trace below.
From what I've read, it is because I'll need to define an object factory
for my test to run. My application is using a combination of Struts 2
and Spring 2. I've created a struts-test.xml that bypasses so
I found an article on how to statically load Tiles to get past the
container issue. I found a web site that explained how to initialize
the tiles container. See below:
protected void setUp() throws Exception {
if (applicationContext == null) {
// this is the first time s
Thanks for the tip Greg. I quickly went through the debugger based on
the example here:
http://depressedprogrammer.wordpress.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/
and I learned two things.
1. execute() does call getSettings(). All that CRUD nonsense was me
not being su
You can take a look at this:
http://glindholm.wordpress.com/2008/06/30/unit-testing-struts-2-actions/
I've used it to unit test actions all the way through interceptors,
validation, actions, and results including freemarker result types.
Timothy Astle wrote:
>
> I had tried using proxy.execut
I had tried using proxy.execute(), which will use Struts. Maybe that's
where I'm a bit lost. I don't implement execute() because of my CRUD
approach.
Can someone point me to some appropriate struts 2 junit tests so I can
figure this out?
Musachy Barroso wrote:
you are creating an action
you are creating an action and invoking a method on it, Struts is not
involved at all in that. You might want to look at the struts junits
to see how you can invoke an action.
musachy
On Mon, Feb 23, 2009 at 12:57 PM, Timothy Astle wrote:
> I'm following the approach given here for writing unit
7 matches
Mail list logo