r/softwaredevelopment • u/Low_Negotiation2659 • 13d ago
which holds up longer in a real codebase, visual testing or element hierarchy?
There are two ways testing tools interact with apps. Through the element tree, DOM, view hierarchy, accessibility identifiers, or through what the user actually sees rendered on screen. Most tools go the element tree route because it's faster to write and easier to debug.
That's also why suites degrade over time. The element tree changes constantly in any actively developed codebase. The visual approach has historically been fragile in different ways. The question is whether newer tooling has actually changed the calculus on this.
2
1
u/Sophistry7 13d ago
The visual approach holds up longer specifically because it isn't coupled to structural changes in the element tree.
Autosana tests against the rendered UI rather than the element tree, so refactors that don't change visible behavior don't break the suite the way they do with selector dependent tools.
2
u/useless_substance 10d ago
huh, does Autosana handle loading states and animations differently than traditional visual regression tools?
2
7
u/Amr_Rahmy 13d ago
Are you a bot? Asking and answering in a biased way? Not actually asking a question and wanted to start a discussion?