Hacker News new | ask | show | jobs
Is app UI testing broken?
4 points by khitcher 3066 days ago
I found that app UI test is usually really hard to set up. What do you think?

I'm currently working in an app company, where we spend most of the time creating new features. It becomes increasingly often that engineers break previous features, sometimes important ones.

Testings are almost always done manually here, as it's often considered impractical to write all the test cases given the time constraint.

To make manual testing harder to replace, usually new features introduce drastic changes on UI or interaction. Those changes really make it hard to implement UI auto test in any comprehensive way.

Is there a very easy way to set up automatic UI test for iOS/Android apps? Ideally I'm thinking about just showing it once and have an automation system repeat my actions.

Thanks

4 comments

I thought UI testing would be hard for iOS, but in practice it was only the new "style" of interacting with the app that was an obstacle.

Xcode literally allows you to record your taps, however the code will be impossible to maintain. It is better to pause the application with breakpoints, inspect the app through "po app" and see what it allows you to click. Then just add the code to click whatever you want. Then continue.

There's a lot of "aha" moments but as each one gets ironed out you'll become faster at it.

As an added bonus you will be more knowledgable about how your app perform in 'accessibility' mode.

I also consider the "breaking" of UI tests a feature. Because if you do some breaking change, you might have added some new bugs. In practice I haven't had the 'hell' period of many tests breaking though.

android espresso is built for this i.e it fires up the simulator and simulates a robot playing on the app in order to test it.

https://developer.android.com/training/testing/espresso/inde...

App UI testing is so rudimentary and difficult to use. We could use some real tooling
I've found UI testing to be very brittle esp on Android but that probably also applies to other platforms, UI tests are hard work to maintain when the designs change in small ways - it's so easy to get false negatives. We try and mitigate that a little by trying to get as much of our code out of the view layer as possible so that nearly everything can be unit tested. What's left should (almost) not need testing - we still run some high level espresso tests, but it's not part of our CI at the moment, so not ideal