Closed Bug 497362 Opened 17 years ago Closed 17 years ago

Test cases for htaccess rules

Categories

(support.mozilla.org :: General, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: laura, Assigned: vish_moz)

References

()

Details

(Whiteboard: sumo_only)

As discussed we need to come up with a set of htaccess tests. I'll help you out with this.
The SUMO file in question is viewable at http://viewvc.svn.mozilla.org/vc/projects/sumo/trunk/webroot/htaccess.dist?view=log. I've started a (very limited) _manual_ Litmus test over at https://litmus.mozilla.org/show_test.cgi?id=7874. I think I'm going to automate it in Selenium, though; seems the quickest and even easiest way to test this; Vishal, others: thoughts?
Selenium should work well. For what it's worth, from what I've seen of the .htaccess file, there are two parts to test: 1. The FileMatch, which we test for security issues 2. The Rewrites, which we test for functionality On the first, ensure that the pages returns "403 Access Forbidden", and on the second set make sure that rewrite requests behave as intended.
Proof of concept up at http://viewvc.svn.mozilla.org/vc/projects/sumo/trunk/tests/frontend/htaccess.dist%20Selenium%20tests.html?view=log. Probably could be written a _lot_ cleaner; I don't yet have the Selenium chops to do variable substitution/while() loops. Additionally, could use: 1. Filling out (and commenting where missing sections belong) 2. Better commenting We really need the variable substitution/while() loops to iterate through an array of languages/locales and more fully test all the combinations (would be hard to edit this testcase by hand).
Assignee: stephen.donner → mozwebqa
Assigning to Vishal, as he's pretty much knocked this one out of the park; thanks, Vishal!
Assignee: mozwebqa → vish.mozilla
Status: NEW → ASSIGNED
Stephen checked this in, and Vishal documented it. Please add the location of docs.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Here's the automation script that runs on Selenium Remote Control & PHP to test the htaccess rewrites: https://wiki.mozilla.org/QA/Execution/Web_Testing/SUMO/Selenium/htaccess The following links redirect back to en-US: af be bg en-GB ka ku ml es-MX
Thx, Vishal; verified fixed (I've seen the script run, and fail for those locales mentioned above, so it's doing its job).
Status: RESOLVED → VERIFIED
Whiteboard: sumo_only
You need to log in before you can comment on or make changes to this bug.