UI Automation is hard to create to make reliable, consistent testing to validate functionality. Especially for products that have existed for years. I have been a product for many years where we moved from minimal automated tests to completely relying on tests. I’ve also witnessed a journey that isn’t going very well and we need to “right the ship”.
I believe that test testing pyramid is correct as shown in The testing pyramid . We need more unit tests than integration tests than UI tests. As you more up the pyramid, tests become more brittle, take longer to run and delay feedback.
New projects should be easier. Invest in automated tests and Clean Architecture from the start.
If you have an “old” product (or one without tests), then you are in for a challenge. I’m glad you’ve recognized the need for and value of automated tests. They should increase quality, increase velocity, increase confidence, and reduce the time spent for manual regression test (hopefully eliminate them).
Taking on UI Automation is like getting a free puppy or a garden. It’s a lot of work and continual work. Some of this will include creating the tests, getting them running in builds, making them fast and reliable to make them valuable (you will want to run tests in parallel as soon as you have more than a few dozen), diagnosing failures (was it a timing issue or a functional failure that was caught), adding and updating tests as the application changes, watching out for duplication and what tests can be moved down the pyramid.
If you don’t slay these dragons, I’m afraid that you’ll end up with a lot of code and tests that no one trusts, is out of date.
"It's better to have a small set of highly valuable tests than a large number of mediocre ones." ~ Vladimir Khorikov from [his email](https://www.getdrip.com/deliveries/1dttpsi6hu3htm2e77d3?view_in_browser=true) and [EnterpriseCraftsmanship.com](https://enterprisecraftsmanship.com/)
Here’s a summary of anti-patterns that I’ve recognize over the years. Most of them are already listed above.
Please consider using Brave and adding me to your BAT payment ledger. Then you won't have to see ads! (when I get to $100 in Google Ads for a payout (I'm at $97.66!), I pledge to turn off ads)
Also check out my Resources Page for referrals that would help me.