Re: How to set up the conditions to test web pages for HTTP status codes 403, 404, 500, 503

2021-06-21 Thread Lukasz Lenart
pt., 18 cze 2021 o 14:11 albert kao napisał(a): > > Following "Exception mapping" at: > https://struts.apache.org/getting-started/exception-handling.html > > Something like: > public class HttpIOException extends Exception { > private static final long serialVersionUID = -4261703341L; > > public H

Re: How to set up the conditions to test web pages for HTTP status codes 403, 404, 500, 503

2021-06-18 Thread albert kao
ic 12c server. > > When any one of the HTTP status codes 403, 404, 500, 503 occurs, my web > > application will display a corresponding web page. > > e.g. When the HTTP status code 503 occurs, my web application will > display > > the web page 503.html. > > How to se

Re: How to set up the conditions to test web pages for HTTP status codes 403, 404, 500, 503

2021-06-17 Thread Lukasz Lenart
503 occurs, my web > application will display a corresponding web page. > e.g. When the HTTP status code 503 occurs, my web application will display > the web page 503.html. > How to set up or simulate the conditions to test my web application web > pages for HTTP status codes 403,

How to set up the conditions to test web pages for HTTP status codes 403, 404, 500, 503

2021-06-17 Thread albert kao
. When the HTTP status code 503 occurs, my web application will display the web page 503.html. How to set up or simulate the conditions to test my web application web pages for HTTP status codes 403, 404, 500, 503? i.e. simulate the HTTP status codes 503, etc so as to test my web application UI to

Re: NPE when running unit test with struts rest plugin

2020-11-09 Thread Lukasz Lenart
pon., 9 lis 2020 o 14:38 Paul Zepernick napisał(a): > > Thank you very much, this has resolved the issue! I have created a ticket in > Jira. > > https://issues.apache.org/jira/browse/WW-5095 Great, thanks a lot! Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ --

RE: NPE when running unit test with struts rest plugin

2020-11-09 Thread Paul Zepernick
: Saturday, November 7, 2020 8:51 AM To: Struts Users Mailing List Subject: Re: NPE when running unit test with struts rest plugin NOTICE: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. śr

Re: NPE when running unit test with struts rest plugin

2020-11-07 Thread Lukasz Lenart
śr., 4 lis 2020 o 17:29 Paul Zepernick napisał(a): > I have posted an example project that reproduces the error in the junit test > > https://github.com/zepernick/struts25-rest-junit I think I have found the problem, mapping is not set in getActionProxy(), you can fix it by overridin

RE: NPE when running unit test with struts rest plugin

2020-11-04 Thread Paul Zepernick
Lukasz, I have posted an example project that reproduces the error in the junit test https://github.com/zepernick/struts25-rest-junit Paul R Zepernick | Sr Programmer Analyst HealthSmart paul.zepern...@healthsmart.com | www.HealthSmart.com -Original Message- From: Paul Zepernick

RE: NPE when running unit test with struts rest plugin

2020-11-03 Thread Paul Zepernick
To: Struts Users Mailing List Subject: Re: NPE when running unit test with struts rest plugin NOTICE: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. wt., 3 lis 2020 o 13:24 Paul

Re: NPE when running unit test with struts rest plugin

2020-11-03 Thread Lukasz Lenart
wt., 3 lis 2020 o 13:24 Paul Zepernick napisał(a): > Yes, I am using the struts2-junit plugin and extending > StrutsSpringJUnit4TestCase from the plugin. Would you mind preparing a small example and put it on Github? Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ --

RE: NPE when running unit test with struts rest plugin

2020-11-03 Thread Paul Zepernick
, November 3, 2020 1:16 AM To: Struts Users Mailing List Subject: Re: NPE when running unit test with struts rest plugin NOTICE: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. pon., 2 lis 2020

Re: NPE when running unit test with struts rest plugin

2020-11-02 Thread Lukasz Lenart
pon., 2 lis 2020 o 14:48 Paul Zepernick napisał(a): > Struts: 5.2.25 > > Plugins: struts2-rest, struts2-spring, struts2-convention > junit 4 > > Did you try to use struts2-junit plugin and based your tests on StrutsJUnit4TestCase? https://struts.apache.org/plugins/junit/ Regards -- Łukasz + 48

NPE when running unit test with struts rest plugin

2020-11-02 Thread Paul Zepernick
Struts: 5.2.25 Plugins: struts2-rest, struts2-spring, struts2-convention junit 4 The test below is currently failing in the RestWorkflowInterceptor 205 @Test public void testValidation() throws Exception { // the login uses the create() which expects the POST method

Re: why the code passes Servlet container test but fails in StrutsTestCase

2016-02-14 Thread Dave Newton
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

Re: why the code passes Servlet container test but fails in StrutsTestCase

2016-02-13 Thread JOSE L MARTINEZ-AVIAL
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)

why the code passes Servlet container test but fails in StrutsTestCase

2016-02-12 Thread ????
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

Re: Howw to test RegisterTest in unit_testing ?

2014-01-06 Thread Chris
It's OK now. I added in ProjectProperties / Test Package Folder / test.java All 3 tests passed Le Lundi 6 janvier 2014 22h39, Chris a écrit : The sample unit-testing works with Struts2.3.16 http://struts.apache.org/development/2.x/docs/unit-testing.html and https://svn.apache.org/repo

Howw to test RegisterTest in unit_testing ?

2014-01-06 Thread Chris
The sample unit-testing works with Struts2.3.16 http://struts.apache.org/development/2.x/docs/unit-testing.html and https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples/unit_testing/ But without running RegisterTest.java I don't how I can run this "RegisterTest extends StrutsTest

Re: Test with StrutsJUnit4TestCase

2013-08-26 Thread Lukasz Lenart
2013/8/17 Alireza Fattahi : > I forgot to merntion: > When I extend StrutsJUnit4TestCase the assertTrue method is not found ! You must import them statically Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To un

Re: Test with StrutsJUnit4TestCase

2013-08-26 Thread Lukasz Lenart
Please register an issue in JIRA 2013/8/17 Alireza Fattahi : > Hi, > > Regarding to page: > http://struts.apache.org/release/2.2.x/docs/struts-2-junit-plugin-tutorial.html > > I could not find the getConfigPath() method in StrustTestCase class > I searched the javadocs and I found that only the St

Re: Test with StrutsJUnit4TestCase

2013-08-17 Thread Alireza Fattahi
I forgot to merntion: When I extend StrutsJUnit4TestCase the assertTrue method is not found ! ~Regards, ~~Alireza Fattahi From: Alireza Fattahi To: Struts Users Mailing List Sent: Saturday, 17 August 2013, 13:18 Subject: Test with StrutsJUnit4TestCase Hi

Test with StrutsJUnit4TestCase

2013-08-17 Thread Alireza Fattahi
Hi,   Regarding to page: http://struts.apache.org/release/2.2.x/docs/struts-2-junit-plugin-tutorial.html   I could not find the getConfigPath() method in StrustTestCase class  I searched the javadocs and I found that only the StrutsJUnit4TestCase class has the getcinfigpath() method. So I should s

[S1] Trouble writing a unit test

2013-01-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 All, I'm trying to write a unit test to test my fix(es) for but I keep getting this exception during the test: java.lang.NullPointerException at org.apache.struts.util.ModuleUtils.getModuleConfig(ModuleUtils.java:93)

Test

2012-11-13 Thread Lukasz Lenart
Sorry for that but I have a problem sending mails to dev@struts.a.o -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@str

Re: Does the StrutsTestCase test filters defined in web.xml?

2012-05-15 Thread J. Garcia
I recommend you use canoo webtest. This is not a unit test tool, but integration test tool. This is the tool used for instance in AppFuse. It has specific pdf verification steps. Cheers, J. On Mon, May 14, 2012 at 5:33 PM, Miguel Almeida wrote: > Hi Steve, > > On Mon, 2012-05-14 at 11

Re: Does the StrutsTestCase test filters defined in web.xml?

2012-05-14 Thread Łukasz Lenart
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/ ---

RE: Does the StrutsTestCase test filters defined in web.xml?

2012-05-14 Thread Miguel Almeida
d and no attempt to render the resulting page. Yes, that's what I thought. > You could try looking at Apache Cactus or Apache HttpClient to test this > behaviour? Alternatively if you generate the file within Struts then the > StrutsTestCase will suffice. I've generated

RE: Does the StrutsTestCase test filters defined in web.xml?

2012-05-14 Thread Steve Higham
ml is called. You could try looking at Apache Cactus or Apache HttpClient to test this behaviour? Alternatively if you generate the file within Struts then the StrutsTestCase will suffice. I've generated exports from Struts this way. Cheers, Steve -Original Message- From: Migu

Does the StrutsTestCase test filters defined in web.xml?

2012-05-14 Thread Miguel Almeida
] The way the filter works is, in short: a (odd looking, numerical) parameter is added to the request. The filter checks for the existence of that parameter and, if it exists, creates the pdf/excel. I want to test the creation of this file (and its contents). However, when I debug the

Re: Need Help On Writing JUnit / Http Unit test case for Struts 2 Application

2012-04-11 Thread Maurizio Cucchiara
://plus.google.com/107903711540963855921 Linkedin    :http://www.linkedin.com/in/mauriziocucchiara Maurizio Cucchiara On 11 April 2012 09:19, wrote: > > Hi All - > > My Team is using Struts 2 to build a web application. As a part of writing > unit test case for web application ,

Need Help On Writing JUnit / Http Unit test case for Struts 2 Application

2012-04-11 Thread chiranjib.das
Hi All - My Team is using Struts 2 to build a web application. As a part of writing unit test case for web application , I need a small favour. Can Anyone provide me any small POC or Sample code to run JUNIT for Struts2 Application[Using Security Interceptor etc ]or any Http Unit test Case

Unit Test Exception

2011-12-18 Thread 叶伟平
Hi, I am attempting to unit test my actions with struts2-junit-plugin-2.2.1, but I keep getting the follow exception: WARN [main] o.s.m.w.MockServletContext - Couldn't get resource paths for class path resource [WEB-INF/content/admin/] java.io.FileNotFoundException: class path resource [WE

Re: Message lookup (from key) in Test

2011-11-17 Thread Li Ying
ing it from Cucumber, but that's another > story). > > How do you get the value of your message from within the test? The > assertion I'm trying is: > > assertEquals(expectedMessage, > action.getActionErrors().iterator().next()); > > But actionErrors() contains the

Message lookup (from key) in Test

2011-11-16 Thread Miguel Almeida
Dear all, I am unit-testing an application under the skin using SpringStrutsTestCase as base (actually, things are a bit more complicated because I'm doing it from Cucumber, but that's another story). How do you get the value of your message from within the test? The assertion I&#

Re: how do you test your action classes?

2011-10-14 Thread jaredtims
Can anyone confirm that the Struts2 Convention Plugin will not work with the Struts2 jUnit Plugin? I am attempting to unit test my actions, but I keep getting the following error: 2011-10-14 14:15:42,380 WARN org.springframework.mock.web.MockServletContext.getResourcePaths:212 - Couldn'

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-30 Thread Dave Newton
On Fri, Sep 30, 2011 at 11:21 AM, Carl Ballantyne wrote: > I had a User-conversion.properties file in the same package as the > User.java > file. However when the project was being built with maven it was not > copying > over the .properties files from the src/main/java folder. I opted to put it >

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-30 Thread Carl Ballantyne
omorrow and see what I can come up with. I am >>> sure it >>> > is something silly I am doing. >>> > >>> > >>> > >>> > On Wed, Sep 21, 2011 at 5:47 PM, Maurizio Cucchiara >>> > wrote: >>> > >>> >

Re: Can Struts Junit plugin be used to test the redirect result of an action

2011-09-24 Thread Carl Ballantyne
gin > > > ( > http://struts.apache.org/2.2.3.1/docs/struts-2-junit-plugin-tutorial.html), > extending the StrutsSpringTestCase for a regression test of an action in > my application. > > > > > > (Optional reading: > > > Long story short on the proble

Re: Can Struts Junit plugin be used to test the redirect result of an action

2011-09-24 Thread miguel
ocs/struts-2-junit-plugin-tutorial.html > > ), extending the StrutsSpringTestCase for a regression test of an action in > > my application. > > > > (Optional reading: > > Long story short on the problem, the action adds a record to a database > > via hibernate. The

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-22 Thread Carl Ballantyne
oing. >> > >> > >> > >> > On Wed, Sep 21, 2011 at 5:47 PM, Maurizio Cucchiara >> > wrote: >> > >> >> What Struts version are you using? >> >> Could you give a try to the nightly version [1] and tell me if it >> >> works

Re: Can Struts Junit plugin be used to test the redirect result of an action

2011-09-22 Thread Maurizio Cucchiara
Cucchiara On 21 September 2011 17:25, Miguel Almeida wrote: > I am using the Struts Junit plugin > (http://struts.apache.org/2.2.3.1/docs/struts-2-junit-plugin-tutorial.html ), > extending the StrutsSpringTestCase for a regression test of an action in my > application. > > (Option

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-22 Thread Carl Ballantyne
rsion are you using? > >> Could you give a try to the nightly version [1] and tell me if it > >> works as you expect? > >> Be aware that you can write your test as follow: > >> > >> public void testValidationRequired(

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-21 Thread Maurizio Cucchiara
nd see what I can come up with. I am sure it > is something silly I am doing. > > > > On Wed, Sep 21, 2011 at 5:47 PM, Maurizio Cucchiara > wrote: > >> What Struts version are you using? >> Could you give a try to the nightly version [1] and tell me if it >> wo

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-21 Thread Miguel Almeida
On Wed, 2011-09-21 at 17:55 +0200, Carl Ballantyne wrote: > How can I try the nightly build if using Maven? I do not see it listed as an > option. Would be nice if Struts released SNAPSHOT versions into maven. Does it? > > Be aware that you can write your test as follow: > &g

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-21 Thread Carl Ballantyne
d tell me if it > works as you expect? > Be aware that you can write your test as follow: > > public void testValidationRequired() throws Exception { >request.setParameter("user.roles", ""); > executeAction("/your_package/your_action.a

Re: Unit Test Struts2 Action - Custom type converters not being run?

2011-09-21 Thread Maurizio Cucchiara
What Struts version are you using? Could you give a try to the nightly version [1] and tell me if it works as you expect? Be aware that you can write your test as follow: public void testValidationRequired() throws Exception { request.setParameter("user.

Unit Test Struts2 Action - Custom type converters not being run?

2011-09-21 Thread Carl Ballantyne
Hi All, I have an action that I am trying to unit test. However it seems the converters I have set for the User object that is being create by the action are not being applied at all when running the unit test. The converters are run when running the application. For example I have a test class

Can Struts Junit plugin be used to test the redirect result of an action

2011-09-21 Thread Miguel Almeida
I am using the Struts Junit plugin (http://struts.apache.org/2.2.3.1/docs/struts-2-junit-plugin-tutorial.html ), extending the StrutsSpringTestCase for a regression test of an action in my application. (Optional reading: Long story short on the problem, the action adds a record to a database

Re: How do i test Struts 2 jsp page rendering time.

2011-09-13 Thread Maurizio Cucchiara
n rao wrote: > Hi, > >    I want to test jsp page rendering time used struts-tags. I put a log > message at the end of the action class before returning result and again at > first calling interceptor because it will be executed last. And after result > is sending all the intercept

How do i test Struts 2 jsp page rendering time.

2011-09-13 Thread mohan rao
Hi, I want to test jsp page rendering time used struts-tags. I put a log message at the end of the action class before returning result and again at first calling interceptor because it will be executed last. And after result is sending all the interceptors will be executed in reverse order

DISC test

2011-08-10 Thread Frans Thamura
hi all can check? http://m.mervpolis.com, our psychological test apps, using jqm, server s2-spring-hibernate if u using non web, will be redirect to full page web, at www.mervpolis.com, we still not ready to make the mobile user people, redirect from www to m. stay tune :0 we also create REST

Re: Where's the best way to test session timeout?

2011-05-23 Thread Eric Lentz
> 1) Can we test it with a struts integration test? > 2) How can we mock the time span (ie, we obviously don't want to wait 5 > minutes for the test to finish...). Are you testing what happens when a session is no longer a session? Invalidate the session in your test: http://str

RE: Where's the best way to test session timeout?

2011-05-23 Thread Biesbrock, Kevin
1 ? Beez - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Where's the best way to test session timeout?

2011-05-23 Thread Miguel
Dear all, Today's question is on the borderline between Struts and general "good testing practises". I have an application requirement "users must re-login after 5 minutes of inactivity". Now, the way to do this is to add to the web.xml: 5 However, how does one t

RE: S2 TEst Best Practices

2011-05-20 Thread Dave Newton
On May 20, 2011 9:40 AM, "Ilya Kazakevich" wrote: > That is action logic, not view itself. Sure, unless there's a bug in the view layer, which is why it gets tested. Dave

RE: S2 TEst Best Practices

2011-05-20 Thread Miguel
On Fri, 2011-05-20 at 09:29 -0400, Dave Newton wrote: > On May 20, 2011 9:26 AM, "Ilya Kazakevich" wrote: > > There should not be logic in view. If there is no logic -- there is > nothing > > to test:) > > Sure there is, and I'm not even including JavaScri

RE: S2 TEst Best Practices

2011-05-20 Thread Ilya Kazakevich
- From: Dave Newton [mailto:davelnew...@gmail.com] Sent: Friday, May 20, 2011 5:29 PM To: Struts Users Mailing List Subject: RE: S2 TEst Best Practices On May 20, 2011 9:26 AM, "Ilya Kazakevich" wrote: > There should not be logic in view. If there is no logic -- there is nothing >

Re: S2 TEst Best Practices

2011-05-20 Thread Frans Thamura
We move all our struts2 app to all json We extend current json plugins And we play around with interceptor We want to test this So, Our apps is json server based on s2 Dunno Is this best Still seeking a way to test Fyi the return still http post -Original Message- From: "

RE: S2 TEst Best Practices

2011-05-20 Thread Dave Newton
On May 20, 2011 9:26 AM, "Ilya Kazakevich" wrote: > There should not be logic in view. If there is no logic -- there is nothing > to test:) Sure there is, and I'm not even including JavaScript-based functionality. Are the right things displayed? Does the UI reflect prop

RE: S2 TEst Best Practices

2011-05-20 Thread Ilya Kazakevich
to view (written in jsp for example): "display user name" or "hide cancel button". There should not be logic in view. If there is no logic -- there is nothing to test:) Ilya Kazakevich, Developer JetBrains Inc http://www.jetbrains.com "Develop with pleasure!" -

[OT] RE: S2 TEst Best Practices

2011-05-20 Thread Dave Newton
On May 20, 2011 9:18 AM, "Miguel" wrote: > An interesting view on this from Gojko Adzic seems to almost suggest > these tests should be avoided: I read it more as "do them right". Dave

RE: S2 TEst Best Practices

2011-05-20 Thread Miguel
On Fri, 2011-05-20 at 15:38 +0400, Ilya Kazakevich wrote: > Hello, > > In pure struts your action is just a presenter (see MVP pattern). So you can > test it using unit testing engines like testNG and jUnit. > > For GUI testing you can use selenium. Ilya, what kind of tests

RE: S2 TEst Best Practices

2011-05-20 Thread Ilya Kazakevich
Hello, In pure struts your action is just a presenter (see MVP pattern). So you can test it using unit testing engines like testNG and jUnit. For GUI testing you can use selenium. Ilya Kazakevich, Developer JetBrains Inc http://www.jetbrains.com "Develop with pleasure!" -Origin

Re: S2 TEst Best Practices

2011-05-20 Thread Frans Thamura
; Subject: Re: S2 TEst Best Practices On Fri, 2011-05-20 at 16:41 +0700, Frans Thamura wrote: > my idea to setup jenkins/hudson server > > so we can test it there > > can TDD do this? > TDD stands for test driven development. It is a development methodology. The end result

Re: S2 TEst Best Practices

2011-05-20 Thread Miguel
On Fri, 2011-05-20 at 16:41 +0700, Frans Thamura wrote: > my idea to setup jenkins/hudson server > > so we can test it there > > can TDD do this? > TDD stands for test driven development. It is a development methodology. The end result is (better and working) code and (

Re: S2 TEst Best Practices

2011-05-20 Thread Frans Thamura
my idea to setup jenkins/hudson server so we can test it there can TDD do this? F On Fri, May 20, 2011 at 4:38 PM, Miguel wrote: > Hi Frans, > On Fri, 2011-05-20 at 14:52 +0700, Frans Thamura wrote: > >> >> and i have several question, and i think that is good if

Re: S2 TEst Best Practices

2011-05-20 Thread Miguel
Hi Frans, On Fri, 2011-05-20 at 14:52 +0700, Frans Thamura wrote: > > and i have several question, and i think that is good if we can share it here > > i want to know, the test mechanisme , best practices of testing in Struts2 > world > I work in TDD, which means I write t

S2 TEst Best Practices

2011-05-20 Thread Frans Thamura
hi all thx to john geppe that gave us a lot of example based on his jquery, esp to change the cimande project with total jquery plugins and i have several question, and i think that is good if we can share it here i want to know, the test mechanisme , best practices of testing in Struts2 world

Re: How to test json output from json plugin?

2011-05-10 Thread Frans Thamura
we have full json=struts-spring-hibernate apps please checkout from http://cimande.java.net it is using maven, but little tricky use mysql F - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands

How to test json output from json plugin?

2011-05-10 Thread Jim Talbut
Hi, I've got an action declared as: @Results( { @Result( name="success", type="json", params={ "root", "schools" } ) }) @Namespace("/json") @ParentPackage("json-default") public class SchoolSearchAction extends ActionSu

Re: Incorrect test syntax

2010-09-24 Thread Li Ying
Hi Michael: Or you can use another simple solution: Convert the value to String(by invoke the [toString] method), before you can compare it to the String constant. In your case, it should be: ... 2010/9/24 Li Ying > Hi Michael: > > I think changing the return type from Enum to String is n

Re: Incorrect test syntax

2010-09-24 Thread Li Ying
Hi Michael: I think changing the return type from Enum to String is not a very good solution. It maybe make your JSP get work,but your Java code will become a little ugly. I think the better way is: (1)do not chang the return type of config.getProject(). (2)in tag , compare it to an enum constant

Re: Incorrect test syntax

2010-09-24 Thread Dave Newton
s, i saw many times that syntax, and tried it, but I never knew what it > was for. > > > Date: Fri, 24 Sep 2010 09:39:38 -0400 > > Subject: Re: Incorrect test syntax > > From: davelnew...@gmail.com > > To: user@struts.apache.org > > > > First I'd t

RE: Incorrect test syntax

2010-09-24 Thread Michaël JERUSALMI
cause, searching on forums, i saw many times that syntax, and tried it, but I never knew what it was for. > Date: Fri, 24 Sep 2010 09:39:38 -0400 > Subject: Re: Incorrect test syntax > From: davelnew...@gmail.com > To: user@struts.apache.org > > First I'd try wrapping the e

Re: Incorrect test syntax

2010-09-24 Thread Li Ying
think i need see what the property "config.project" exactly is to find out what's going wrong. 2010/9/24 Michaël JERUSALMI > > Sorry, it didn't change a thing. It still goes by the else... > > > Date: Fri, 24 Sep 2010 22:32:04 +0900 > > Subject: Re: In

Re: Incorrect test syntax

2010-09-24 Thread Dave Newton
> Sorry, it didn't change a thing. It still goes by the else... > > > Date: Fri, 24 Sep 2010 22:32:04 +0900 > > Subject: Re: Incorrect test syntax > > From: liying.cn.2...@gmail.com > > To: user@struts.apache.org > > > > Hi Michael: > > > >

RE: Incorrect test syntax

2010-09-24 Thread Michaël JERUSALMI
Sorry, it didn't change a thing. It still goes by the else... > Date: Fri, 24 Sep 2010 22:32:04 +0900 > Subject: Re: Incorrect test syntax > From: liying.cn.2...@gmail.com > To: user@struts.apache.org > > Hi Michael: > > Maybe you can not check if a String has sam

Re: Incorrect test syntax

2010-09-24 Thread 李颖
de for several projects, > and I'm trying to write a test to display (or not) a tab in case of a > particular project. > > I wrote a test, which positive result should be to add a new tab, and which > negative result is to write the content of the ProjectName property. > > H

Incorrect test syntax

2010-09-24 Thread Michaël JERUSALMI
Hi, I'm working on a web application with Struts, made for several projects, and I'm trying to write a test to display (or not) a tab in case of a particular project. I wrote a test, which positive result should be to add a new tab, and which negative result is to write the cont

Re: s:if test condition

2010-06-27 Thread Bill Bohnenberger
Yes, that is why I said "Since 'activated' is a String,..." On Sun, Jun 27, 2010 at 3:47 PM, Dale Newfield wrote: > lucas owen wrote: > >> Bill Bohnenberger >> >>> Since 'activated' is a String, try swapping your single& double quotes, >>> e.g. >>> >> > > > that was it!!! > > The key is unders

Re: s:if test condition

2010-06-27 Thread Dale Newfield
lucas owen wrote: Bill Bohnenberger Since 'activated' is a String, try swapping your single& double quotes, e.g. > > that was it!!! The key is understanding *why* it makes a difference. The reason is that a single character demarcated by single quotes is not a String, it is a character. T

Re: s:if test condition

2010-06-27 Thread lucas owen
> > > Hi Struts 2 users: > > > > I was wondering if you can use a s:if test based on a pojo's > > attribute value: > > > > POJO: > > > > public class Warning{ > > > > String text; > > String activated; // Y or N

Re: s:if test condition

2010-06-26 Thread Bill Bohnenberger
Since 'activated' is a String, try swapping your single & double quotes, e.g. -Bill On Sat, Jun 26, 2010 at 11:28 AM, lucas owen wrote: > Hi Struts 2 users: > > I was wondering if you can use a s:if test based on a pojo's > attribute value: > > POJO: >

s:if test condition

2010-06-26 Thread lucas owen
Hi Struts 2 users: I was wondering if you can use a s:if test based on a pojo's attribute value: POJO: public class Warning{ String text; String activated; // Y or N } JSP: --> *Warning* null! --> *Warning* not null! --> Activated: --> *Warning* *activated*.

Re: unit test the service layer (aka data access layer)

2010-06-21 Thread Jake Vang
where it talks about extending > AbstractTransactionalJUnit4SpringContextTests for your unit test and the like > > Cheers > > James > > > -Original Message- > From: Jake Vang [mailto:vangj...@googlemail.com] > Sent: 21 June 2010 17:27 > To: Struts Users Mailing List > Subject:

RE: unit test the service layer (aka data access layer)

2010-06-21 Thread James Cook
AbstractTransactionalJUnit4SpringContextTests for your unit test and the like Cheers James -Original Message- From: Jake Vang [mailto:vangj...@googlemail.com] Sent: 21 June 2010 17:27 To: Struts Users Mailing List Subject: Re: unit test the service layer (aka data access layer) james

Re: unit test the service layer (aka data access layer)

2010-06-21 Thread Jake Vang
james, would setting up the unit test in that way load up the service class as if it would in in the J2EE container? the reason why i asked is because in the tutorial, as far as i understand, they have wired in using Spring a transaction manager. that means in my service object, when i call

RE: unit test the service layer (aka data access layer)

2010-06-21 Thread James Cook
Get involved with: Junit 4.4 Spring-test libs And started your service test class like such: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "classpath:/testConfigXML.xml") public class MyServiceImplTest extends AbstractJUnit4SpringContextTests {

unit test the service layer (aka data access layer)

2010-06-20 Thread Jake Vang
hi, i've been following this code here at http://struts.apache.org/2.0.14/docs/struts-2-spring-2-jpa-ajax.html. what i want to know is how to unit test the service layer (or data access object layer). in the case of the link, it would be the PersonServiceImpl

Re: How to test optimization of a application in struts 1.x

2010-06-03 Thread Rupali Gupta
Hello Abhishek You can do a performance testing on ur local system to check this. There are open source performance testing tools like Apache JMeter, Allmon, DBMonster, Database Opensource Test Suite etc with which you can test database driven applications under heavy load. -Rupali On 6/3

Re: How to test optimization of a application in struts 1.x

2010-06-02 Thread abhishek jain
Hello Rupali , thanks for the links and advice, Can i also ask, is there a way i can simulate the code in my local system as it will work on the server. As i feel that the Desktop i am using is a bit fast then the server i use, i need to test that the code is not consuming more resources mainly

Re: How to test optimization of a application in struts 1.x

2010-06-01 Thread Rupali Gupta
web directory there's a file called .htaccess. This file lets you tweak the server settings without having to touch the REAL server configuration files. A feature of the .htaccess file is a system known as the rewrite engine. Basically this lets you use regular expressions to test and m

Re: How to test optimization of a application in struts 1.x

2010-05-31 Thread Rupali Gupta
cally this lets you use regular expressions to test and modify the url before the web server ever gets around to actually serving the file. The trick is that with just a few lines put into our .htaccess file we can check to see if the browser can accept compressed files (almost all of the

Re: How to test optimization of a application in struts 1.x

2010-05-31 Thread abhishek jain
Hi, Ok,thanks, how can i zip and send every page from the website. to reduce the size of HTMLs thanks abhishek On Mon, May 31, 2010 at 5:12 PM, Rupali Gupta wrote: > Hi Abhishek > 1. You can do memory profiling by doing performance testing on your code. > 2. You can use memcache server and cac

Re: How to test optimization of a application in struts 1.x

2010-05-31 Thread Rupali Gupta
Hi Abhishek 1. You can do memory profiling by doing performance testing on your code. 2. You can use memcache server and cache data from db once the server is started to save the db hits every time. It will make application fast. 3. Try to follow Coding guidelines to save memory and load time whe

How to test optimization of a application in struts 1.x

2010-05-31 Thread abhishek jain
Dear friends, I have recently developed an application in struts 1.x and i am thinking is there a way i can get to know that is the load time (in browser) as per the standard or competitive with other applications / websites, Can anyone give me some pointers? I do would like to know the time graph

Re: Error in running juit test case for struts2 action class

2010-05-03 Thread rameshbabu
i, > > I am getting error when i am running my junit test case for struts2 action > class. Here is the code. > > > > public class RoleMasterNewActionTest extends StrutsTe

Re: Error in running juit test case for struts2 action class

2010-04-30 Thread Wes Wannemacher
pring components know where to find it. Since a unit test runs in the unit test context, it's not going to find the application context where it expects to. The StrutsSpringTestCase adds some extra bootstrap plumbing to make it work. -Wes On Fri, Apr 30, 2010 at 6:07 AM, rameshbabu wrote: >

Error in running juit test case for struts2 action class

2010-04-30 Thread rameshbabu
Hi, I am getting error when i am running my junit test case for struts2 action class. Here is the code. public class RoleMasterNewActionTest extends StrutsTestCase { public

How to Test Struts 2 Actions Without a Container

2010-01-27 Thread Shane Witbeck
Hi all, I put together a blog post explaining how to test Struts actions using Spring integration without using a container: http://www.digitalsanctum.com/2010/01/25/how-to-test-struts-2-actions-without-a-container/ I thought this might be a helpful resource for those using Struts and Spring

  1   2   3   4   5   6   >