Confirmed users
753
edits
| Line 73: | Line 73: | ||
==Test Style Guide== | ==Test Style Guide== | ||
*Module names should be called test_ and then behavioural areas. E.g. test_search_positive.py | |||
*Test setup should read in details from vars.py | |||
*Test Case names should always show the intent of the test case. | |||
**GOOD: def test_that_advanced_search_doesnt_find_item(self): | |||
**BAD: def test_advanced_search(self): | |||
**CAVEAT: setUp and tearDown are exceptions to the rule as they are needed for unittest | |||
*Tests should handle the asserts not the Page objects | |||
*Every Test module will have an main() function caller | |||
if __name__ == "__main__": | if __name__ == "__main__": | ||
unittest.main() | unittest.main() | ||