Closed Bug 635452 Opened 13 years ago Closed 12 years ago

Add debug output to Email Preferences test script

Categories

(Bugzilla :: QA Test Scripts, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: wicked, Assigned: wicked)

References

Details

Attachments

(1 file, 1 obsolete file)

Here's a patch that add some debug output for the problematic Email Preference test script. It makes the following changes:
 1) Switches parameters to is_deeply() around to have a more logical output of expected and seen diagnostics if the arrays differ.
 2) Add a separate dump of the arrays to see their full content if an error is detected for a is_deeply() test.
 3) Also adds a dump of the full body text as seen by Selenium.

BTW, this change is actually live for the 3.6 MySQL QA tests to help debug the burning.
Attachment #513705 - Flags: review?(LpSolit)
Comment on attachment 513705 [details] [diff] [review]
Email Preferences test debug output, V1

>+is_deeply(\@email_sentto, \@email_both, "Admin and normal user got bugmail")
>+  or diag(Dumper(\@email_sentto, \@email_both, $sel->get_body_text()));

I'm not a fan to display the whole page. This won't bring any value IMO, besides maybe the CC, assignee and QA fields. I would prefer if you limit the output to these fields only.
Comment on attachment 513705 [details] [diff] [review]
Email Preferences test debug output, V1

Per my previous comment.
Attachment #513705 - Flags: review?(LpSolit) → review-
I refactored the bugmail recipient checks to a sub, like you requested on IRC. This also extracts roles from the page in case an error happens.

Screens after setting prefs and error are also stored locally for reference. This change can be left out if you don't want it in repo.
Assignee: testing → wicked
Attachment #513705 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #515855 - Flags: review?(LpSolit)
Comment on attachment 515855 [details] [diff] [review]
Email Preferences test debug output, V2

As discussed on IRC, this code currently doesn't help us find what's wrong with this QA script on Tinderbox (which is the only place where we found a problem). So I would prefer to limit this patch to Tinderbox for now. You can re-request review later if it really helps us track what's wrong. But for now, I keep it out of my radar.
Attachment #515855 - Flags: review?(LpSolit)
I suspect a race condition could be the reason of the random failures in this script (e.g. Selenium doesn't have time to check a checkbox before changes are submitted). Debugging code won't help as it really depends on the version of Selenium RC and of Firefox you have. So marking as wontfix.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Blocks: 1026391
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: