Error trying to load SeasideTesting bundle

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Error trying to load SeasideTesting bundle

Mattias Poppe

Hello,

 

I’m trying to load the SeasideTesting bundle from the Cincom public repository using VW 7.7, but I can’t seem to get it working.

 

I get the following error: WAAttributeNotFound (#sessionExpirySeconds)

 

It comes from: Seaside.WAUserConfiguration(Seaside.WAConfiguration)>> attributeAt: aSymbol ifAbsent: aBlock

                ^ self allAttributes at: aSymbol ifAbsent: aBlock

 

Which spawns: ^ self attributeAt: aSymbol ifAbsent: [ WAAttributeNotFound signalWithKey: aSymbol ]

 

This attribute doesn’t appear to exist.

 

I use the following setup:

·         VisualWorks 7.7

·         SeasideTesting (3.0 1.22)

·         Seaside (3.0 - 85)

·         Seaside-examples

·         Scriptaculous (7.7 lr 250)

·         XMLParserShafferFixes

·         sMock (1.3 mlq)

·         sMock and Sunit (1.3, davidsh)

 

Thanks in advance for any advice that may help me fix this problem.

Mattias


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Error trying to load SeasideTesting bundle

cdavidshaffer
On 10/18/10 10:01, Mattias Poppe wrote:

Hello,

 

I’m trying to load the SeasideTesting bundle from the Cincom public repository using VW 7.7, but I can’t seem to get it working.

 

I get the following error: WAAttributeNotFound (#sessionExpirySeconds)

 

It comes from: Seaside.WAUserConfiguration(Seaside.WAConfiguration)>> attributeAt: aSymbol ifAbsent: aBlock

                ^ self allAttributes at: aSymbol ifAbsent: aBlock

 

Which spawns: ^ self attributeAt: aSymbol ifAbsent: [ WAAttributeNotFound signalWithKey: aSymbol ]

 


I started looking into this problem, even published a fix.  In the process, though, I noticed that loading SeasideTesting is a major pain.  If you have the Seaside-all parcel loaded the loader still asks you to try to load Seaside from the Cincom repo.  You can, of course, just hit "cancel" (for Seaside and Scriptaculous).  I tried actually loading these but I got a walkback which seemed to go away if I disabled atomic loading.  I'll try to deploy a version that is cleaner over the next week or two.  Your adventurous you'll be able to get through the load process by skipping over problematic code in the debugger.

David


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Error trying to load SeasideTesting bundle

Mattias Poppe

Hello,

 

I think I got the SeasideTesting bundle running by loading it from the repository. So I tried to run the simple ‘HelloComponentTest’ from the SeasideTesting tutorial but I get a “Collection is empty” exception.

 

Tutorial can be found here: http://www.shaffer-consulting.com/david/Seaside/TestingComponents/TestingComponents.html. There’s a component that renders an element with the ID = “main”. The test will try to initialize the component and look if it really contains an element with that ID.

 

The problem lies in the STBrowserSimulator and in particular the following line:

hostTokens := tokens second findTokens: ':'.

 

Tokens is a orderedCollection  with 5 elements:

OrderedCollection ('http:' '' 'localhost:7777' '' 'activeTests' 'HelloComponent_testMainElementContainsHello').

The second element is indeed empty but it seems that the third entry is desirable.

 

 After changing the word “second” to “third” I get a “No such element error()” spawned by “self lastResponse stringWithId: 'main'” in the testcase itself. I can view the test in my browser (via /activeTests) without any problems, it just shows the Component and the element .

 

 

Regards,

Mattias


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Error trying to load SeasideTesting bundle

cdavidshaffer
On 10/19/10 06:11, Mattias Poppe wrote:

Hello,

 

I think I got the SeasideTesting bundle running by loading it from the repository. So I tried to run the simple ‘HelloComponentTest’ from the SeasideTesting tutorial but I get a “Collection is empty” exception.

 

Tutorial can be found here: http://www.shaffer-consulting.com/david/Seaside/TestingComponents/TestingComponents.html. There’s a component that renders an element with the ID = “main”. The test will try to initialize the component and look if it really contains an element with that ID.

 

The problem lies in the STBrowserSimulator and in particular the following line:

hostTokens := tokens second findTokens: ':'.




 

Tokens is a orderedCollection  with 5 elements:

OrderedCollection ('http:' '' 'localhost:7777' '' 'activeTests' 'HelloComponent_testMainElementContainsHello').

The second element is indeed empty but it seems that the third entry is desirable.

 

 After changing the word “second” to “third”


#second is right here so it looks like a bad version of #findTokens:.  Have a look at find out what package/version you're getting this from.  In my image this method is in the package Squeak-Extensions of which I have version 7.7 - 4 loaded from the Cincom repo.  For me:

'foo://bar.com/dog/cat' findTokens: '/' 

produces

OrderedCollection ('foo:' 'bar.com' 'dog' 'cat')

which is the correct behavior based on Squeak 3.9 and I assume the same in newer squeaks.

I'm guessing the problem you're having here is an artifact of loading the wrong version of a prereq.  Maybe Squeak-Extensions loaded from a parcel?



I get a “No such element error()” spawned by “self lastResponse stringWithId: 'main'” in the testcase itself. I can view the test in my browser (via /activeTests) without any problems, it just shows the Component and the element .



Do SeasideTesting's test cases pass?  In my image all but six of the tests pass.  Five of these failures are an artifact of changes to error handling in Seaside3.0.  I haven't decided how to fix them yet so I've just learned to live with a red test bar :-(

David


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Error trying to load SeasideTesting bundle

Mattias Poppe

Hello,

 

I finally got it working. It appeared that I didn’t have the squeak-extensions parcel loaded. It used the ‘SequenceableCollection >> findTokens:’ in the ‘Grease-VisualWorks-Core’. So I loaded squeak-Extensions from the repository (wasn’t even in the parcel manager) and fixed some other small requirements problems. Now it works like a charm. I find it bizarre that the Squeak-Extensions wasn’t loaded, is it possible that the parcel  isn’t a required prereq?

 

Many thanks,

Mattias

 

From: C. David Shaffer [mailto:[hidden email]]
Sent: dinsdag 19 oktober 2010 19:56
To: Mattias Poppe; [hidden email]
Subject: Re: [vwnc] Error trying to load SeasideTesting bundle

 

On 10/19/10 06:11, Mattias Poppe wrote:

Hello,

 

I think I got the SeasideTesting bundle running by loading it from the repository. So I tried to run the simple ‘HelloComponentTest’ from the SeasideTesting tutorial but I get a “Collection is empty” exception.

 

Tutorial can be found here: http://www.shaffer-consulting.com/david/Seaside/TestingComponents/TestingComponents.html. There’s a component that renders an element with the ID = “main”. The test will try to initialize the component and look if it really contains an element with that ID.

 

The problem lies in the STBrowserSimulator and in particular the following line:

hostTokens := tokens second findTokens: ':'.





 

Tokens is a orderedCollection  with 5 elements:

OrderedCollection ('http:' '' 'localhost:7777' '' 'activeTests' 'HelloComponent_testMainElementContainsHello').

The second element is indeed empty but it seems that the third entry is desirable.

 

 After changing the word “second” to “third”


#second is right here so it looks like a bad version of #findTokens:.  Have a look at find out what package/version you're getting this from.  In my image this method is in the package Squeak-Extensions of which I have version 7.7 - 4 loaded from the Cincom repo.  For me:

'foo://bar.com/dog/cat' findTokens: '/' 

produces

OrderedCollection ('foo:' 'bar.com' 'dog' 'cat')

which is the correct behavior based on Squeak 3.9 and I assume the same in newer squeaks.

I'm guessing the problem you're having here is an artifact of loading the wrong version of a prereq.  Maybe Squeak-Extensions loaded from a parcel?




I get a “No such element error()” spawned by “self lastResponse stringWithId: 'main'” in the testcase itself. I can view the test in my browser (via /activeTests) without any problems, it just shows the Component and the element .

 


Do SeasideTesting's test cases pass?  In my image all but six of the tests pass.  Five of these failures are an artifact of changes to error handling in Seaside3.0.  I haven't decided how to fix them yet so I've just learned to live with a red test bar :-(

David


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc