| >The problem lies in the fact that ABTs are highly coupled with the UI’s HTML/DOM. ABTs can range from fairly brittle to extremely brittle. The less brittle ABTs typically use some sort of DOM traversal like XPath or CSS-style selectors which can tolerate some UI changes like colors and minor layout changes as long as the changes are via CSS only and don’t dramatically affect the DOM. This is the reason I follow this pattern for automated testing - only use readable selector IDs (for individual elements) and only use readable CSS selectors (for items in a group): https://hitchtest.readthedocs.org/en/latest/faq/why_just_htm... This ends up leading to tests that look a bit like this: - Click: view-button
- Verify text:
item: first first_name
text: Sanders
Where such readable ids or classes are missing I either add them myself or ask the front end to add them.I've tried most other methods of automated testing too (selenium IDE, page object), and this one is the most straightforward and sensible IMO. I would probably use this for BDD + ATDD too although I've yet to work on a project where that's been possible. >The time it takes to run the tests is often exacerbated by a lot of explicit delay statements in the test cases. This is an antipattern. You shouldn't do it: https://hitchtest.readthedocs.org/en/latest/glossary/sleep_o... Unfortunately, avoiding in most frameworks requires the tester to write asynchronous multithreaded code (which is beyond most QA developers). |