aspose file tools*
The moose likes Testing and the fly likes Web Application Testing require your suggestions please? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Web Application Testing require your suggestions please?" Watch "Web Application Testing require your suggestions please?" New topic
Author

Web Application Testing require your suggestions please?

Mohamed Farouk
Ranch Hand

Joined: Jun 08, 2005
Posts: 249
Hello Friends

My app : Struts2/Tiles/Spring/Hibernate

Now what is the framework you recommend for testing struts action using tiles ?


Regards
Mohamed


SCJP, SCWCD, SCBCD, SCEA 5
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Is there something that you are confused about or don't understand?

Gian Franco
blacksmith
Ranch Hand

Joined: Dec 16, 2003
Posts: 977
Frank Bennett wrote:omitted reply


@Frank...what's this all about?

Mohamed, have you tried StrutsTestCase


"Eppur si muove!"
Mohamed Farouk
Ranch Hand

Joined: Jun 08, 2005
Posts: 249
Hello Frank

I dont want to argue in reply to your comments. It is a moderators task to ensure this kind of replies(offensive) are not acceptable. Please do not underestimate anyone knowledge just because you have the right to speak, It has got nothing to do with my certifications. This is a friendly forum which i have been a member for years.

I know all the different test frameworks and would like to hear from the community the ones they use day in and out for use in their web development process. I have been away from web development but involved quite agreesively in core development projects hence this question in regards to testing on struts2/spring is on the web layer

I find quite a few ways of doing testing. Just as a matter of usage, I want to find out best ways of doing this.

Gian: Thanks for your inputs, Yes I have tried StrutsTestCase, but yet again I find many other method using Spring included in the testing phase as for service layer integration. Your thaughts please.


Regards
Mohamed
Mohamed Farouk
Ranch Hand

Joined: Jun 08, 2005
Posts: 249
Hello Guys

After a days study on available frameworks and methods , I am happy with StrutsTestCase and StrutsSpringTestCase provided by Struts 2 Junit Plugin 2.1.8 is the best.

Going through the blogs of http://www.brucephillips.name/blog/ is really an eye opener which would show you the evolution of the testing of Struts 2. I would recommend these as gem of testing material with very simple clear instructions and usage of testing methods.

Evolution:
Custom Methods of Struts2-Spring testing by : Zarar Siddiqi and Arsenalist (Depressed Programmer) and fassisrosa
http://glindholm.wordpress.com/2008/06/30/unit-testing-struts-2-actions/
http://depressedprogrammer.wordpress.com/2007/06/18/unit-testing-struts-2- actions-spring-junit/
http://fassisrosa.blogspot.com/2007/09/unit-testing-struts-20-part-3.html

Article 1 by Bruce Phillips combining the above 3 methods with source code and test codehttp://www.brucephillips.name/blog/index.cfm/2009/9/4/Unit-Testing-Struts-2-Action-Classes
Example: struts2_junit_example_2

Article 2 by Bruce Phillips using Strut2 JUnit Plugin
http://www.brucephillips.name/blog/index.cfm/2009/9/5/Unit-Testing-A-Struts-2-Action-Class--Struts-2-JUnit-Plugin
Example: struts2_junit_example_3

Article 3 by Bruce Phillips using Strut2 and Spring JUnit Plugin
http://www.brucephillips.name/blog/index.cfm/2009/12/2/Using-JUnit-To-Test-A-Struts-2-Action-Class-In-An-Application-That-Also-Uses-Spring
Example: LoveKUSurvey
Example: struts2_junit_example_3

Hope these references will help friends of this community.

Regards
Gian Franco
blacksmith
Ranch Hand

Joined: Dec 16, 2003
Posts: 977
Thanks for your study results.
Alfred Peterson
Greenhorn

Joined: Aug 17, 2010
Posts: 12
I had been sorting some bugs that i came across while doing testing...

Can some one please solve it for me...


1.Navigation of application problems
2.Crashing of the whole application seems to be happen..how much load can application bear.
3.inconsistency in the flow of the site.
4.Interface is not easy to understand,application is not user friendly and ,navigate and is not extractive.


How to deal with such bugs..in most simplistic way's

Thanks:
Alfred.
James Gadbury
Greenhorn

Joined: Mar 20, 2009
Posts: 24
Hi Mohamed,

I too have started exploring StrutsTestCase so thanks for your substantial feedback - it's a great help. I will have a look through the articles you posted.

Looking through various documentation and examples, it appears the Struts 2 JUnit plugin's StrutsTestCase class is missing some functionality of the older StrutsTestCase project (hosted on SourceForge). For example, methods such as verifyNoActionErrors(), verifyActionErrors(), verifyForwardPath() and setConfigFile() are not available (as far as I can see) in the Struts 2 plugin version. I'm not sure how to perform this functionality with the Struts 2 plugin - perhaps I'm missing something but it seems limited compared with the functionality of the older SourceForge version of the project.

Using Struts 2's Junit plugin (StrutsTestCase 2.1.8.1), do you know how to...

- test that after execution of an action, control is passed to a particular page ?

- test for ActionError messages ?

- specify a different struts config file. I have many other struts config files besides my default struts.xml ?

Any help would be greatly apreciated! Kind regards,

James
Mohamed Farouk
Ranch Hand

Joined: Jun 08, 2005
Posts: 249
Hello James
Sorry for late reply,
I use in general: StrutsSpringTestCase

The following code should lead you in the right direction. Let me know if I can be of any more help!


Using Struts 2's Junit plugin (StrutsTestCase 2.1.8.1), do you know how to...

- test that after execution of an action, control is passed to a particular page ?



- test for ActionError messages ?


- specify a different struts config file. I have many other struts config files besides my default struts.xml ?
James Gadbury
Greenhorn

Joined: Mar 20, 2009
Posts: 24
Mohamed Farouk wrote:Hello James
Sorry for late reply,
I use in general: StrutsSpringTestCase

The following code should lead you in the right direction. Let me know if I can be of any more help!

No worries - thanks for replying.

Mohamed Farouk wrote:
Using Struts 2's Junit plugin (StrutsTestCase 2.1.8.1), do you know how to...

- test that after execution of an action, control is passed to a particular page ?


Yes, I've been checking the result name with the above method. But what about a forward or redirect URL? I guess I can use response.getDestinationUrl() or response.getRedirectUrl() to ensure I am forwarded to result.jsp or redirected to somethingelse.action, for example.

Mohamed Farouk wrote:
- test for ActionError messages ?

Perfect!

Mohamed Farouk wrote:
- specify a different struts config file. I have many other struts config files besides my default struts.xml ?

What about Struts configuration files? Did you misread as Spring or am I missing something? I have my interceotors, actions and their results defined in various xml files. By default, StrutsTestCase uses struts.xml but what about other struts configuration xml files?

Thanks again for your help - much appreciated! Kind regards,

James
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web Application Testing require your suggestions please?