1,072
edits
No edit summary |
No edit summary |
||
| Line 93: | Line 93: | ||
*'''verifyXYZ( ) IDE commands''' are generally converted to [http://docs.python.org/library/unittest.html?highlight=unittest#testcase-objects failUnless, failIf or assertEqual] functions that incorporate a get_XYZ function to retrieve the text, attribute, location, etc, and compare it to the pattern parameter in the IDE command. | *'''verifyXYZ( ) IDE commands''' are generally converted to [http://docs.python.org/library/unittest.html?highlight=unittest#testcase-objects failUnless, failIf or assertEqual] functions that incorporate a get_XYZ function to retrieve the text, attribute, location, etc, and compare it to the pattern parameter in the IDE command. | ||
<blockquote> | <blockquote> | ||
*the Python statement may not have the same verification functionality as the IDE command since the IDE pattern parameter is converted without parsing the prefix (ex: regexpi: ). The Python module for regular expressions is named [http://docs.python.org/library/re.html?highlight=regular%20expressions#module-contents re]. | *the Python statement may not have the same verification functionality as the IDE command since the IDE pattern parameter is converted without parsing the prefix (ex: regexpi: ). The Python module for regular expressions is named [http://docs.python.org/library/re.html?highlight=regular%20expressions#module-contents re]. | ||
*changing the failXYZ calls to assertABC could make the script easier to read. | *changing the failXYZ calls to assertABC could make the script easier to read. | ||
</blockquote> | </blockquote> | ||
*'''Verification errors''' are stored in a list and dumped at the end of the script. Specificlly: | |||
<blockquote> | |||
the assert or fail function is encompassed in a ''try-except'' statement. The ''except'' part appends the error message into the list verificationErrors. | |||
*the error text it either null or a simple "''value1'' != ''value2''". TBD: what other information should be included to make the message useful. | |||
*in the tearDown function, automated called when the script is finished, if verificationsErrors list is not null the Python trackback is called and the list is dumped. | |||
</blockquote> | |||
<blockquote></blockquote> | |||
edits