Closed Bug 507654 Opened 16 years ago Closed 13 years ago

Update all controller.assert methods with a template fail message

Categories

(Testing Graveyard :: Mozmill, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: u279076, Assigned: u279076)

Details

Current asserts use a message like "assert failed to check element <el>". This is confusing as check could mean "check as in checkbox" or it could mean "check as in verify". The proposal, carried over from https://bugzilla.mozilla.org/show_bug.cgi?id=506393#c6, is to use "<assert_method_name> for element <el>". As Mozmill automatically prepends all failures with "fail", this will result in a failure message something like this "fail: <assert_method_name> for element <el>". A tweak on this proposal is to use a description of the assert instead of the method name. The following is a comparison of the two proposals using assertChecked on the SSL checkbox in Preferences: fail: "assertChecked for element useSSL3" - or - fail: "assert checkbox is checked for element useSSL3" Another example using assertPropertyNotExist on the SSL checkbox: fail: "assertPropertyNotExist for element useSSL3" - or - fail: "assert property does not exist for element useSSL3" Suggestions? Comments? Feedback?
When I think about the proposals I like the way to include the method name. It will make it easier to find the line in the test itself which fails. Personally I vote for "fail: "assertPropertyNotExist for element useSSL3". That will never be confusing.
We need to build these dynamically and not copy and paste a template, if we copy and paste then it's going to a be a maintenance nightmare as it was in windmill before we started building them dynamically.
To be absolutely clear, the proposal is not about creating template methods... The template is intended only for the @throws messages when an assert fails and is intended as a procedural template; meaning that we all agree to a certain style for formatting assert @throws messages.
controller.assert() is marked as deprecated. With Mozmill 2.0 we can make use of the Assert and Expect classes directly. So calling this a wontfix.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.