Testing text: getAppStringMap() and multilingualism

Hi all!

I am currently working on testing an App written in English. In this app, apart from testing the functionality, we are testing the displayed text, trying to avoid typos and missing text. For doing this, is it worth navigating through the app, in order to display all the existing text (e.g alerts, dialogs…)? or otherwise, would using the driver.getAppStringMap() function and checking the strings into the generated Map object provide a reliable way of doing a similar thing in a less time consuming way?

Moreover, the need to use this kind of approach is increased by the fact that we are now going to translate the app into multiple languages. Any suggestion to address multilingualism and displayed text testing?


Espresso driver provides a couple of element attributes, like no-ellipsized-text, no-overlaps and no-multiline-buttons, which might be helpful there. I assume there is nothing like that available for Accessibility-based frameworks like XCUITest or UIA2, since on that layer the provided text styling information is quite poor to be able to analyse anything there. One idea that comes to my mind is to use something like OpenCV and kind of AI on top of it in order to find possible issues there.

Thank you very much for your answer. The element attributes offered by Espresso can be of great use for us. I have looked into the XCUITest and UIA2 driver, and I have not found any of this options. I will investigate more closely into this topic and post it in case I find something of interest.