t;
> > Hi,
> >
> > I was trying to use StrutsTestCase to write a test for a Bean, which has
> a
> > member of String[]. The code runs perfectly in servlet container(Tomcat),
> > but fails as a mock test. In EditActionTest.java, assertNotNull("The
> acti
The method execute has void as a return type, instead of a String.
2016-02-13 2:26 GMT-05:00 小唐 <644282...@qq.com>:
> Hi,
>
> I was trying to use StrutsTestCase to write a test for a Bean, which has a
> member of String[]. The code runs perfectly in servlet container(Tomcat)
Hi,
I was trying to use StrutsTestCase to write a test for a Bean, which has a
member of String[]. The code runs perfectly in servlet container(Tomcat), but
fails as a mock test. In EditActionTest.java, assertNotNull("The action is null
but should not be.", action) still works
Can you publish the whole project at GitHub instead of the gist?
2014-02-23 18:35 GMT+01:00 John Patrick :
> Hi,
>
> Having some issues around automated testing using struts2-junit-plugin
> accessing a jsp via struts2-convention-plugin.
>
> Basically the following two url's;
> http://struts.apache
Hi,
Having some issues around automated testing using struts2-junit-plugin
accessing a jsp via struts2-convention-plugin.
Basically the following two url's;
http://struts.apache.org/release/2.3.x/docs/convention-plugin.html
http://struts.apache.org/release/2.3.x/docs/struts-2-junit-plugin-tutoria
:09 +0100, Steve Higham wrote:
>
> > Hi Miguel,
> >
> > I haven't used the StrutsSpringTestCase however I have made use of the
> StrutsTestCase.
> >
> > This only tests the interceptor stack / Action / Result. There is no web
> server involved and no attem
You can try to use Jetty as an embedded server, take a look on
BasePortletTest in Portlet Plugin
Regards
--
Łukasz http://www.lenart.org.pl/
mobile +48 606 323 122, office +27 11 0838747
Warszawa JUG conference - Confitura http://confitura.pl/
---
Hi Steve,
On Mon, 2012-05-14 at 11:09 +0100, Steve Higham wrote:
> Hi Miguel,
>
> I haven't used the StrutsSpringTestCase however I have made use of the
> StrutsTestCase.
>
> This only tests the interceptor stack / Action / Result. There is no web
> server involve
Hi Miguel,
I haven't used the StrutsSpringTestCase however I have made use of the
StrutsTestCase.
This only tests the interceptor stack / Action / Result. There is no web server
involved and no attempt to render the resulting page. Therefore I would be
surprised if anything from web.x
Dear all,
I am using StrutsSpringTestCase (which extends StrutsTestCase) to
perform some acceptance tests (under the skin). I am also using
Displaytag (www.displaytag.org/1.2/ ) to build some tables in the view.
This tag supports excel/pdf export, which uses a filter you configure in
web.xml [1
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
"Content-Disposition: form-data; name=\"id\"\r\n" +
>"\r\n" +
>"1\r\n" +
>"--AaB03x--\r\n").getBytes("US-ASCII"));
>
> simulating the following form:
>
> enctype="multipart/form-data&quo
: respect the \r\n's and the final boundary with the extra
"--" at the end of the form.
commons upload version: 1.2.2.
HTH,
Gabriel
2012/4/25 Steve Higham :
> I'm currently using StrutsTestCase and jUnit to component test my Actions
> within the Struts context u
I'm currently using StrutsTestCase and jUnit to component test my Actions
within the Struts context using a Mockito mock as my Model.
This is working fine. I can call request.setParamater ("paramName",
"paramValue") from the test class and, when executed, Struts wi
2-01-27 at 17:35 +, Miguel Almeida wrote:
> Hi there,
>
> I trying to test an application with the help of StrutsTestCase (a class
> that extends from StrutsSpringTestCase, to be more precise).
> StrutsTestCase (which is in the struts junit plugin) involves proxied
> acti
Hi there,
I trying to test an application with the help of StrutsTestCase (a class
that extends from StrutsSpringTestCase, to be more precise).
StrutsTestCase (which is in the struts junit plugin) involves proxied
actions to make tests more light.
I have used the same method in another
Hi,
the setup is unit testing with maven + spring + struts using
StrutsSpringTestCase super class
(which is an extended org.apache.struts2.StrutsTestCase with access to
spring config).
So this is working well with actions not having the methodname configured.
Whenever I do configure such a
Ah, ok. So the SourceForge one is not the one I'm using then. I'm
extending org.apache.struts2.StrutsTestCase in the test I'm having
problems with. Thanks for your input!
On Fri, Apr 29, 2011 at 1:47 PM, Dave Newton wrote:
> On Fri, Apr 29, 2011 at 1:35 PM, Justin Robbin
On Fri, Apr 29, 2011 at 1:35 PM, Justin Robbins wrote:
> Lastly, can anyone explain what the deal is with StrutsTestCase?
> There's a tutorial page for using it with Struts 2 on
> struts.apache.org but the SourceForge page
> (http://strutstestcase.sourceforge.net/) for it ha
Hi Folks,
This is my first post to user@struts.apache.org. I yesterday posed
this same question on stackoverflow but haven't garnered any responses
so I figured I'd give this list a try. Hope that's cool.
http://stackoverflow.com/questions/5823709/npe-in-strutstestcase-after
Thanks bro! I think I hated annotations until today. Was the
StrutsTestCase moved into a plug-in recently?
On Thu, Jun 11, 2009 at 10:41 AM, Wes Wannemacher wrote:
> Scott, it is just complaining because you are trying to do something
> Spring-ish in your unit test, but Spring
Struts
> interceptors. I have added the struts2-junit-plugin-2.1.2.jar and also
> spring-test.jar. When I run my subclass test of StrutsTestCase I get the
> following exception:
>
> SEVERE: [20:44.438] ** FATAL ERROR STARTING UP STRUTS-SPRING
> INTEGRATION ***
I am on a project with a new combination of jars and testing Struts
interceptors. I have added the struts2-junit-plugin-2.1.2.jar and also
spring-test.jar. When I run my subclass test of StrutsTestCase I get the
following exception:
SEVERE: [20:44.438] ** FATAL ERROR STARTING UP
Thanks Dave, they are there. I failed to guess that all were using JWebUnit.
/Enric
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
Enric Jaen wrote:
Hello, I'd to test the StrutsTestCase's version for Struts2 [1] but I have not found any example. There are plenty of examples for Struts1, however.
Any idea how to use it?
Have you looked at any of the existing tests for S2?
Dave
-
Hello, I'd to test the StrutsTestCase's version for Struts2 [1] but I have not
found any example. There are plenty of examples for Struts1, however.
Any idea how to use it?
Regards,
/Enric
ps. I have found examples of testing Struts2 with JWebUnit, but what I want is
to test the controller.
n that it's not that simple at all.
I put some work into using the StrutsTestCase class as base class for my
tests, but I've run into some problems that I can't really understand.
1. There is hardly any documentation regarding the StrutsTestCase or the
XWorkTestCase base classes. No
e" locale="true" />
or
processorClass="org.apache.struts.tiles.TilesRequestProcessor"
nocache="true" locale="true" />
what is the difference??
I got strutsTestcase almost working with spring wired actions. On that
front I have one qu
tier above.
StrutsTestCase offers alot. I haven't used it but I believe it's easy
enough to set up and run to mock the MVC part.
Then something like Spring could instantiate stubbed business objects
instead of real ones, so that the actions can run happily against a back
end. For that
Hi
If you are thinking of unit tests for action i do not think it is great
idea.
For me actions should be as dumb as possible and just delegate business
processing to another layer.
2006/5/5, Stasica, Grzegorz <[EMAIL PROTECTED]>:
hi,
Basically I'm interested in testing struts actions (forw
hi,
Basically I'm interested in testing struts actions (forwards, messages
etc). Most of the actions perform some actions on my database which I'd
like to speed up. My idea is to isolate database tests from struts
action test. There is only one way to achieve it which I see at the
moment (mock ob
Does anyone know if StrutsTestCase works with the Struts Validator? ie.
If I make a test case and set up the request parameters for a FormBean,
will the FormBean be validated using the Validator Configuration in my
struts-config.xml file.
Thanks,
Richard
Brett, you were right, and I thought I had added the jar. I had mistyped
it, however. Once I got the name right (cactus-ant-1.7.jar instead of
cactus-ant.jar), it worked. Funny how computers only do what you said, not
what you meant.
Thanks for taking the time to reply. Much appreciated.
Hyru
Brett, you were right, and I thought I had added the jar. I had mistyped
it, however. Once I got the name right (cactus-ant-1.7.jar instead of
cactus-ant.jar), it worked. Funny how computers only do what you said, not
what you meant.
Thanks for taking the time to reply. Much appreciated.
Hyru
Hyrum wrote:
I am trying to use the Ant 'cactus' optional task in my build.xml. This
fails because Eclipse must have the optional task set in the preferences,
but I can't figure out how to do this.
If I have understood your issue correctly, you need add the jar with the
optional task to t
I'm trying to do some in-container testing of my Actions using
CactusStrutsTestCase. I realize this may be a bit off topic, since it deals
with Ant, the Eclipse IDE, JUnit, and Struts, but I'm hoping there is a
Struts user who has experience something like this and can point me in the
right direct
I'm trying to do some in-container testing of my Actions using
CactusStrutsTestCase. I realize this may be a bit off topic, since it deals
with Ant, the Eclipse IDE, JUnit, and Struts, but I'm hoping there is a
Struts user who has experience something like this and can point me in the
right direct
Thanks to this list I just found the StrutsTestCase package. I think its
a great tool. Testing my forms and actions OUTSIDE the container has
increased my velocity 10 fold.
But it seems that not many Struts people talk about this package (aside
from page 510 of J.B.'s book). Is
Bill Siggelkow wrote:
Laurent Duperval wrote:
Hello,
Does anyone have experience using (Mock)StrutsTestCase to test
wildcard actions (actions that end in *) and MappingDispatchActions?
Does it work? Are there any particular issues to be aware of?
Thanks,
L
I haven't tested mapping dis
Laurent Duperval wrote:
Hello,
Does anyone have experience using (Mock)StrutsTestCase to test wildcard
actions (actions that end in *) and MappingDispatchActions?
Does it work? Are there any particular issues to be aware of?
Thanks,
L
I haven't tested mapping dispatch action with StrutsTes
Hello,
Does anyone have experience using (Mock)StrutsTestCase to test wildcard
actions (actions that end in *) and MappingDispatchActions?
Does it work? Are there any particular issues to be aware of?
Thanks,
L
-
To unsubscribe
Thanks Duncan, i`ll check it out!
--- Duncan Mills <[EMAIL PROTECTED]> escreveu:
> Leandro - a good article has just been published on
> the Oracle
> Technology Network on using JUnit, Cactus and
> StrutsTestCase - the setup
> portions relate to setting up these up with
Leandro - a good article has just been published on the Oracle
Technology Network on using JUnit, Cactus and StrutsTestCase - the setup
portions relate to setting up these up with JDeveloper, but the basic
flow and tutorial portions provide a good kickstart even if you use
another IDE - check
[EMAIL PROTECTED]
Subject: Re: Help with Cactus StrutsTestCase
Is your LookupDispatchAction implementing getKeyMethodMap()?
[EMAIL PROTECTED] wrote:
I am trying to write test cases for my Struts app, but can't seem to figure it out.
I have used the examples, but I don't seem to get the co
= ( String )keys.nextElement();
map.put( key, methods.getString( key ) );
}
return map;
}
-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow
Sent: Thursday, August 26, 2004 10:53 AM
To: [EMAIL PROTECTED]
Subject: Re: Help with Cactus Stru
Is your LookupDispatchAction implementing getKeyMethodMap()?
[EMAIL PROTECTED] wrote:
I am trying to write test cases for my Struts app, but can't seem to figure it out.
I have used the examples, but I don't seem to get the correct outcome when I run them.
I am using LookupDispatchAction's exclusiv
Check out "Struts The Complete Reference" by James Holmes -- I hear the
chapter on Testing absolutely ROCKS ;)
Bill Siggelkow
Leandro Melo wrote:
Sorry for the confusing sentence.
I meant to say that i don`t know the answer, but i`d
like to use the opportunity and also ask a basic
question.
Whe
Users Mailing List
Subject: Re: Help with Cactus StrutsTestCase
Doesn`t know the answer, where can i find a good
tutorial do test struts applications?
Is it true that for good testing the actions must
delegate their work to POJOs ??
--- [EMAIL PROTECTED] escreveu:
> I am trying to write t
Sorry for the confusing sentence.
I meant to say that i don`t know the answer, but i`d
like to use the opportunity and also ask a basic
question.
Where can i find a good
tutorial do test struts applications?
Is it true that for good testing the actions must
delegate their work to POJOs ??
---
Doesn`t know the answer, where can i find a good
tutorial do test struts applications?
Is it true that for good testing the actions must
delegate their work to POJOs ??
--- [EMAIL PROTECTED] escreveu:
> I am trying to write test cases for my Struts app,
> but can't seem to figure it out.
> I h
I am trying to write test cases for my Struts app, but can't seem to figure it out.
I have used the examples, but I don't seem to get the correct outcome when I run them.
I am using LookupDispatchAction's exclusively.
So here is the method I am testing:
==
public void
Is there a way to get strutstestcase (mock) to work with the new 2.4
web.xml. Currently when we try this it bombs on the digesting of the
web.xml file with this:
Digester.error(1439) | Parse Error at line
6 column 104: Document root element "web-app", must match DOCTYPE r
52 matches
Mail list logo