These standards will be helpful for everyone working on our codebase since these will serve as our guide on how we create our automated tests in a uniform way. This will make our codebase much cleaner and maintainable (of course, suggestions and feedbacks are always welcome):
Four spaces for every argument, keyword under a test case and variable values.
It can be more for more aesthetic purposes.
Leave one single line at the end of every test suite file, variable resource files and keyword resource files.
Always use uppercase letters for the first letter of each word when creating a test case.
Always add keywords to its proper section e.g Given, When or Then
### GIVEN ###
### WHEN ###
User Goes To Tenders Index Page
### THEN ###
The User Should Be Redirected To The Tenders Index Page
Always create a separate resource file (keywords and constant) for each of the site's pages.
Always make sure that there are no duplicate element locators or keywords.
Always be mindful of the grammar usage and typographical errors.
Always make sure that you are only resourcing files that are necessary for the test.
Always make sure that variable names, keywords and test cases must be explicit enough on what it's actually for.
Apply DRY (Do not Repeat Yourself) method - Limit keywords to one functionality to avoid complexity, this will make reading, refactoring and debugging a lot more easier.
Always make sure that all test cases have validations
No built-in keywords directly in the test suites such as Click, Input Text, and etc... This will handle by creating user keywords.
Want to print your doc? This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (