Primarily for the sake of learning the inner mechanics of the struts2 framework, and unit testing, I took some time to study and experiment with the code published at: http://depressedprogrammer.wordpress.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/
When testing (junit 4) an action implementing the Sessionaware interface (my login and register classes) I noticed that the session object is set to null by BaseStrutsTestCase. This was mentioned before in the author's blog, but not sure if ever addressed. I added a new comment over there but the discussion could be inactive. I was wondering if anyone who is using the BaseStrutsTestCase, or used it in the past, came across this issue and if by any chance managed to resolve it. Perhaps Haroon might have a comment on this? Also, a couple of more general questions: 1) Is there a recommended way to check during testing which interceptors are firing and when? 2) If one with general knowledge of servlets & jsp wants to dive into the struts2 source code, to get better understanding of the basic mechanics, what would be the starting point? So should I start lets say with the struts.core package?, which would be the entry point class Despatcher, then ActionProxy? -- To the untrained eye (myself), when looking the code from a distance (http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/), it looks somewhat like a ball of twine, so where should I look for the piece of string that sticks out and will help me untangle it? Well, the primary objective is testing our struts2 application, so I will probably try other approaches mentioned in this discussion. So, I would like to take a deeper look at Selenium next. Kind regards and I appreciate all the input. On Sun, Jul 19, 2009 at 4:35 PM, Dave Newton<newton.d...@yahoo.com> wrote: > Paweł Wielgus wrote: >> >> Hi Dave, >> when i record my tests with selenium ide, >> all click or assert alements takes various loactor addresses, >> very often they contain DOM paths, >> so when layout is changed from tables to divs, >> all these addresses are no longer valid. > > On the rare occasions I use the IDE to generate the script I find I always > modify it pretty heavily--since I am pretty good about marking up my HTML > it's almost easier to just write the tests by hand so I can target only the > most-specific elements I'm looking for. > > I'm rarely bitten by layout changes since the important stuff doesn't change > much regardless of its surroundings. > > YMMV :) > > Dave > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org