Closed
Bug 567819
Opened 14 years ago
Closed 13 years ago
Sample assertion-centric test case and suite v2.0
Categories
(Testing Graveyard :: WebQA, defect)
Tracking
(Not tracked)
VERIFIED
INVALID
People
(Reporter: tsmith, Assigned: mozwebqa)
Details
Attachments
(9 files)
Attached is a test case and test suite that merges Jeff's browserLoader example with our test case parameter landscape. The essential attachments for discussion are the SmokeTestSuite, DemoPageLayout, DemoPageAddonLayout. Other files are the usual supporting files with few or no changes. Jeff's browserLoader sample from bug 558807 is included for reference since that bug will likely be closed. Main features of the test case: - Verifications are done with a set of small functions that test for a single condition and throw an assertion error when the condition isn't true. - Test case executes only one value for each parameter (ex: one browser, one user type, one sort, etc). Iterating through the values for each parameter is handled by the test suite. - The list of add-ons is verified with a separate test case that takes add-on index# as a parameter. Iteration through add-ons is driven by the test suite by using add-on index #s as an additional parameter list. Main features of the test suite: - Test suite gets the parameter lists used by a test case and constructs a suite that runs all test functions for a combination of parameter values. Suites are created for each combination of values. Running all parameter values for a test case could be done with one line of code, although the sample uses multiple lines for readability. - The default smoke test parameters can be overridden as required for a test case.
Reporter | ||
Comment 1•14 years ago
|
||
Attachment #447135 -
Flags: feedback?(vish.mozilla)
Attachment #447135 -
Flags: feedback?(stephen.donner)
Attachment #447135 -
Flags: feedback?(mozbugs.retornam)
Attachment #447135 -
Flags: feedback?(krupa.raj82)
Attachment #447135 -
Flags: feedback?(jbalogh)
Reporter | ||
Comment 2•14 years ago
|
||
Attachment #447136 -
Flags: feedback?(vish.mozilla)
Attachment #447136 -
Flags: feedback?(stephen.donner)
Attachment #447136 -
Flags: feedback?(mozbugs.retornam)
Attachment #447136 -
Flags: feedback?(krupa.raj82)
Attachment #447136 -
Flags: feedback?(jbalogh)
Reporter | ||
Comment 3•14 years ago
|
||
Attachment #447137 -
Flags: feedback?(vish.mozilla)
Attachment #447137 -
Flags: feedback?(stephen.donner)
Attachment #447137 -
Flags: feedback?(mozbugs.retornam)
Attachment #447137 -
Flags: feedback?(krupa.raj82)
Attachment #447137 -
Flags: feedback?(jbalogh)
Reporter | ||
Comment 4•14 years ago
|
||
Reporter | ||
Comment 5•14 years ago
|
||
Reporter | ||
Comment 6•14 years ago
|
||
Reporter | ||
Comment 7•14 years ago
|
||
Reporter | ||
Comment 8•14 years ago
|
||
Reporter | ||
Comment 9•14 years ago
|
||
Reporter | ||
Updated•14 years ago
|
Assignee: nobody → mozwebqa
Updated•14 years ago
|
Attachment #447139 -
Attachment mime type: text/x-python → text/plain
Updated•14 years ago
|
Attachment #447141 -
Attachment mime type: text/x-python → text/plain
Updated•14 years ago
|
Attachment #447144 -
Attachment mime type: text/x-python → text/plain
Updated•14 years ago
|
Attachment #447143 -
Attachment mime type: text/x-python → text/plain
Updated•14 years ago
|
Attachment #447145 -
Attachment mime type: text/x-python → text/plain
Comment 10•14 years ago
|
||
We can get rid of eval_test_case_result(testResult). There is a in-built python unittest function http://docs.python.org/library/unittest.html#unittest.TestResult.wasSuccessful New code will look like: test_result = runner.run(suite) if test_result.wasSuccessful(): print 'all tests passed %s \n' %(test_result) else: raise AssertionError(str(test_result))
Updated•14 years ago
|
Attachment #447135 -
Flags: feedback?(vish.mozilla) → feedback-
Comment 11•14 years ago
|
||
Comment on attachment 447135 [details]
smoke test suite with a test case implemented in two parts
this has made the Suite extremely complex. If we want to run the test cases with different parameters and iterate through suite then the original method was serving that purpose. (Original method = one w/o init() in the test cases)
No longer valid with our new setup -> invalid.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
Updated•12 years ago
|
Attachment #447135 -
Flags: feedback?(jbalogh)
Updated•12 years ago
|
Attachment #447136 -
Flags: feedback?(jbalogh)
Updated•12 years ago
|
Attachment #447137 -
Flags: feedback?(jbalogh)
Updated•12 years ago
|
Status: RESOLVED → VERIFIED
Updated•12 years ago
|
Attachment #447135 -
Flags: feedback?(stephen.donner)
Attachment #447135 -
Flags: feedback?(mozbugs.retornam)
Attachment #447135 -
Flags: feedback?(krupa.mozbugs)
Updated•12 years ago
|
Attachment #447136 -
Flags: feedback?(vish.mozilla)
Attachment #447136 -
Flags: feedback?(stephen.donner)
Attachment #447136 -
Flags: feedback?(mozbugs.retornam)
Attachment #447136 -
Flags: feedback?(krupa.mozbugs)
Updated•12 years ago
|
Attachment #447137 -
Flags: feedback?(vish.mozilla)
Attachment #447137 -
Flags: feedback?(stephen.donner)
Attachment #447137 -
Flags: feedback?(mozbugs.retornam)
Attachment #447137 -
Flags: feedback?(krupa.mozbugs)
Updated•6 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•