AW: [Seaside] SeasideTesting: Access session from component

Schwarz, Jan-Felix Jan-Felix.Schwarz at
Mon Jan 14 10:07:04 UTC 2008

I am familiar with your nice tutorial. I don't get it to run anyway. So here is an excerpt of my test code:

SCComponentTestCase subclass: #WWComponentTestCase>>
configureApplicationForComponent: aComponentClass

	super configureApplicationForComponent: aComponentClass.
	app preferenceAt: #sessionClass put: WWSession.

WWComponentTestCase subclass: #WWStartComponentTest>>
        self newApplicationWithRootClass: WWStartComponent.
	self establishSession.
        self component session isLoggedIn.

This raises an OndefinedObject(Object)>>doesNotUnderstand: #isLoggedIn exception.

Thank you for your help.

-----Ursprüngliche Nachricht-----
Von: seaside-bounces at im Auftrag von C. David Shaffer
Gesendet: So 13.01.2008 22:08
An: Seaside - general discussion
Betreff: Re: [Seaside] SeasideTesting: Access session from component
Schwarz, Jan-Felix wrote:
> Hello,
> I want to use SeasideTesting to test my components. I have overriden the Session class and access the customized session class from my components. Application runs fine in web browser.
> While excecuting the test cases I get errors because calling session from the component returns UndefinedObject. I know I get the session by calling 'self session' from the test class. But for reasonable unit testing I need my component's methods to work properly. Anyone knows how to fix this problem?
> Sorry for my bad English. Thanks for your help.
> Felix

Then just search for the text "sessionClass".  If that doesn't help, let 
me know.


seaside mailing list
seaside at

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3752 bytes
Desc: not available
Url :

More information about the seaside mailing list