Closed Bug 566505 Opened 15 years ago Closed 13 years ago

Review test for log in

Categories

(Testing Graveyard :: WebQA, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: krupa.mozbugs, Unassigned)

Details

Attachments

(4 files)

This is a simple test case which checks user log in.It uses the general login function from AMOfunctions
Attachment #445856 - Flags: review?(vish.mozilla)
Attachment #445856 - Flags: review?(trumanwsmith)
Attachment #445856 - Flags: review?(stephen.donner)
Attachment #445856 - Flags: review?(mozbugs.retornam)
Attached file AMOfunctions
You need AMOfunctions to run the testcase
Attachment #445856 - Attachment is patch: true
Attachment #445856 - Attachment mime type: text/html → text/plain
ret = amo_fcns.login('userNonAdm',sel) if ret == amo_fcns.functionPass: print "Log in was successful" else: print "Login failed" change else to else: unittest.TestCase.fail('some msg')
Attached file Updated testcase
I have made the changes you suggested.thanks
Attachment #446044 - Flags: review?(vish.mozilla)
change this line: ret = amo_fcns.login('userNonAdm',sel) to: ret = amo_fcns.login(self.tc_params.userNonAdm,sel) if you want to run the script for just 1 user type. If you want to run for diff usertypes the you should use a loop like: for userType in self.tc_params.userTypeList: ret = amo_fcns.login(userType,sel) If you don't want to make it too complicated and not use object oriented stuff then just use: ret = amo_fcns.login(1,sel) (for non-admin user)
Attachment #445856 - Flags: review?(vish.mozilla) → review+
(In reply to comment #4) > change this line: > ret = amo_fcns.login('userNonAdm',sel) > to: > ret = amo_fcns.login(self.tc_params.userNonAdm,sel) > if you want to run the script for just 1 user type. > > > If you want to run for diff usertypes the you should use a loop like: > for userType in self.tc_params.userTypeList: > ret = amo_fcns.login(userType,sel) > > If you don't want to make it too complicated and not use object oriented stuff > then just use: > ret = amo_fcns.login(1,sel) > (for non-admin user) As per my discussion with Truman(and you),implementing the method suggested above will break stuff.So retaining the existing code.but I have added a few comments and improved the general formatting.Please review.
Attachment #446603 - Flags: review?(vish.mozilla)
change this line: if ret == amo_fcns.functionPass: to if ret == AMOfunctions.AMOfunctions.functionPass: Since functionPass is a class variable, not an instance variable you can access it using the class name instead of the instance name. everything else looks good.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Attachment #445856 - Flags: review?(trumanwsmith)
Attachment #445856 - Flags: review?(stephen.donner)
Attachment #445856 - Flags: review?(mozbugs.retornam)
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: