[Zope3-Users] testbrowser hangs

Darryl Cousins darryl at darrylcousins.net.nz
Thu Aug 17 03:21:52 EDT 2006


Cheers for the reply,

I still think it might be me. I rolled back to the zope3 revision I had
and it still hangs. Same with the 33 branch you suggested.

This time I have attached the files that will cause the browser test to
hang.

I should just keep looking I guess.

Regards,
Darryl

On Thu, 2006-08-17 at 11:57 +0530, Baiju M wrote:
> On 8/17/06, Darryl Cousins <darryl at darrylcousins.net.nz> wrote:
> > Hi All,
> >
> > Just updated today to zope3 svn revision the latest trunk and my browser
> > tests are hanging. After hunting for a while within my own package
> > (assuming my own fault) I finally came up with a test that fails using a
> > clean zope3 install with none of my own configuration.
> >
> > It hangs on getControl (but not on every test). Seems that I can open
> > browser instance and do a few things before it hangs. I can return
> > self.mech_browser from getControl and I think it hangs on forms().
> >
> > The hanging is determined btw, Ctrl-C isn't enough, it takes `kill -s 15
> > $PIDTEST`.
> >
> > I'm still not convinced that the problem doesn't lie with me and would
> > like to know if I'm alone with it.
> >
> > For now I'll try an earlier revision (I was using rev 69228 prior to the
> > update).
> 
> Today (Thursday, August 17 2006) is bugday to make 3.3 beta2, so
> please report this in collector.  Also try 3.3 branch.
> 
>   svn co svn://svn.zope.org/repos/main/Zope3/branches/3.3 Zope33
> 
> Regards,
> Baiju M
> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ftests.py
Type: text/x-python
Size: 1131 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20060817/cc7dc1bc/ftests.py
-------------- next part --------------

Get a browser started using the ftesting Manager

    >>> from zope.testbrowser.testing import Browser
    >>> browser = Browser()
    >>> browser.addHeader('Authorization', 'Basic mgr:mgrpw')

Add a folder

    >>> browser.open('http://localhost/@@contents.html?type_name=BrowserAdd__zope.app.folder.folder.Folder')
    >>> browser.getControl(name='new_value').value = u'test'
    >>> browser.getControl('Apply').click()

    >>> browser.open('http://localhost/test/EditMetaData.html')
    >>> browser.getControl(name='dctitle').value = 'Test'
    >>> browser.getControl(name='dcdescription').value = 'Test folder'
    >>> browser.getControl(name='save').click()
    >>> print browser.getControl(name='dctitle').value
    Test

So far so good. Try another folder.

    >>> browser.open('http://localhost/@@contents.html?type_name=BrowserAdd__zope.app.folder.folder.Folder')
    >>> browser.getControl(name='new_value').value = u'test2'
    >>> browser.getControl('Apply').click()

    >>> browser.open('http://localhost/test/EditMetaData.html')
    >>> browser.getControl(name='dctitle').value = 'Test 2'
    >>> browser.getControl(name='dcdescription').value = 'Test folder'
    >>> browser.getControl(name='save').click()
    >>> print browser.getControl(name='dctitle').value
    Test 2

Try a test manager

    >>> browser.open('http://localhost/test/addSiteManager.html')

Try a utility

    >>> browser.open('http://localhost/test/++etc++site/default/contents.html')
    >>> browser.getLink('Unique Id Utility').click()
    >>> browser.getControl('Apply').click()
    >>> browser.getControl('Register this object').click()
    >>> browser.getControl(name='field.actions.register').click()
    >>> 'This object is registered' in browser.contents
    True

Try anything

    >>> browser.open('http://localhost/test/contents.html')
    >>> browser.getLink('ZPT Page').click()
    >>> browser.getControl(name='field.source').value = '<span>Test</span>'
    >>> browser.getControl(name='add_input_name').value = 'page'
    >>> browser.getControl(name='UPDATE_SUBMIT').click()

    >>> browser.getLink('page').click()

And here the test hangs using 90+% of cpu.

    >>> ctrl = browser.getControl(name='field.source')
    >>> print ctrl
    >>> #browser.getControl(name='form.source').value = '<span>MyTest</span>'
    >>> #browser.getControl(name='form.actions.apply').click()
    >>> #'MyTest' in browser.contents



More information about the Zope3-users mailing list