Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
5 Sep 2009 at 15:24 UTC
Updated:
26 Jan 2010 at 16:40 UTC
Jump to comment: Most recent
Comments
Comment #1
joshmillerBoombatower was able to write a simple test that regexed all the urls from the code and checked it against the database table called something like menu_router -- we turned up some interesting links, but nothing profoundly wrong.
In the end, we were unable to find a decent way to test the links that wasn't physically limiting.
Marking postponed until further work can be done.
Comment #2
joshmillerClarified title.
Comment #3
David_Rothstein commentedThis sounds pretty useful - is there any code that can be posted here as inspiration?
Regex-ing the codebase and comparing it to the menu router paths is a pretty neat idea, but I was thinking that a simpler way to search for broken links might be to enable all modules and then "spider" the site, just like a search engine would.
This would not be as comprehensive (since there are certain links you won't see on a fresh site until after you have done things - e.g., create content), but it might be good enough for starters. Having some kind of broken link detector in the tests definitely seems like a good idea.
Comment #4
David_Rothstein commentedIf spidering the site, one might also want to visit each page as two separate users:
Comment #5
joshmillerWhat if it was more blatant... link a verify function and we require or insist that every link be checked by that function...
The first set of tests would be daunting (we would have to build a test for every potential link), but we could include all links that we know should be there, and insist that all new code that invokes a new menu path be declared as working for each role.
This sounds more doable than a spider technology.
Josh
Comment #6
sunhah. subscribing