• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Web Application Testing require your suggestions please?

 
Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Friends

My app : Struts2/Tiles/Spring/Hibernate

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


Regards
Mohamed
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there something that you are confused about or don't understand?

 
blacksmith
Posts: 979
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Frank Bennett wrote:omitted reply



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

Mohamed, have you tried StrutsTestCase
 
Mohamed Farouk
Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 249
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 979
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your study results.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 249
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
He does not suffer fools gladly. But this tiny ad does:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic