-
Notifications
You must be signed in to change notification settings - Fork 63
[Rough Draft] MFTF Best Practices
David Haecker edited this page Jun 26, 2020
·
2 revisions
- Could test be moved to integration?
- Are there changes in CR that indicate integration tests should be added but are missing
- Are the changes that were made necessary or could existing test code be reused?
- Check all new action groups, sections, elements, tests, pages to make sure no static check failures in mftf.log
- Pull branch locally and run new tests to verify
- Tests pass
- No deprecation warnings in terminal output
- Test executes the correct functional steps in scope of bug/story
- Test code changes are in correct module
- No BICs
- All action groups contain description annotation
- 100% action groups on tests (or as close as possible)
- Action groups are written in a reusable fashion
- No comment actions
- Inline comments to describe what test is about to do
- Createdata when possible (avoid creating data in UI unless test specifically needs to)
- Delete all created data in after block
- MagentoCLI for config changes (avoid config changes in UI unless test specifically needs to)
- Revert all config changes in after block
- Annotations
- Descriptive test description, title, name
- Meaningful stories annotation
- Correct severity
- Appropriate groups (important to determine if test is in a suite or not)
- Descriptive stepKeys
- Selectors always reference elements (no hard coded selectors in action groups or test cases)
- Parameterize section elements when possible
- Always wait for element before interaction (like click) (unless specifically should not). Especially in action group
- Always waitForPageLoad proper wait based action after executing something that triggers page load or DOM manipulation
- Same object name as file name