3 ms·
I don't know. I guess that's subjective. I would personally rather work on code with much less abstraction. All of the Java codebases I've worked with, that
by edmcnulty101 5y ago
I don't know. I guess that's subjective. I would personally rather work on code with much less abstraction.
All of the Java codebases I've worked with, that have 20 levels of hierarchy to 'clean up' the code bases and make it easier to edit, turn into giant balls of spaghetti at some point.
- exdsq 5y agoI normally agree with code being subjective but with test code around the UI I'd argue actually that this is a good abstraction. For example this code would completely break if they added another div with text on a page. It'd also completely break the Page Object Model. But imagine there are 50 tests covering these pages. In the iterative example you'd need to update the divs for all 50 tests, with a page object model you'd need to update them in one place and the tests would then be updated. I appreciate this argument might come down to "trust me, I've seen this" but it really is a good abstraction to look at if you need to write selenium or cypress tests.
- edmcnulty101 5y agoSelenium is admittedly not one of my major skillsets.. so I'll defer to your seemingly more knowledgable judgement on this. :) Abstraction can be very useful, but it can also definitely lead to spaghetti if it gets out of hand or is done incorrectly.