[Zope] Broken Links

Jim Penny jpenny at universal-fasteners.com
Wed Nov 3 17:01:27 EST 2004


On Wed, 3 Nov 2004 15:11:08 -0600
"Laura McCord" <Laura.McCord at doucet-austin.com> wrote:

> Is there a plugin or tool for zope/plone to traverse through a website
> checking for broken links?

The question is not as sharp as you would like.  There is a philosphical
problem here.  In a dynamic world, what is a "broken link"?

In a static, file-storage backed world, this was easy.  A borken link
was something that pointed to a file that did not exist.  The webserver
gave back an error message with 404 Status.  A link checker is
conceptually easy, at least as long as there is no authentication, and
no forms are involved:  find each href on a page, issue a http request
for the object, see if the Status is < 400, if so, link is OK.  Recurse.

In a dynamic world, it is a bit less clear.  There are several big
problems.  First, the pages that you are looking at will probably never
recur exactly again.  That is, they are probably dependent on who is
looking at them, when they are being looked at, and some data in some
persistent store.  This makes life much more complicated.

First, your tester has to understand authentication.  Second, many zope
pages are going to involve forms.  Third, coverage is much more complex,
you can't just blindly recurse and be reasonably sure that you are going
to cover all the interesting cases.

So, you are outside the world of linkchecker, and into the world of
"functional testing".  I have not used this, but I suspect that you are
going to want something like:
http://zope.org/Members/tseaver/FunctionalTests/view

See also
http://viii.dclxvi.org/bookmarks/tech/zope/test

In particular, WebUnit might be of some interest.

Jim Penny
> 
> -Laura
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
> 
> 


More information about the Zope mailing list