Hello everyone, I was wondering if there is a way...
# compose-android
r
Hello everyone, I was wondering if there is a way in Compose Android to automatically assign a
testTag
to every component of the app without having to add it manually, be it with a ksp plugin or else. I think this should not be possible due to the nature of Compose being declarative in code, but I might not be aware of a hidden API that would allow that
o
I'm interested in the approach. What would be the value assigned to it? The key to access it? How would you consume it on the test side?
r
Basically the need is to tag every UI element of an existing app, and remove the workload of adding a test tag manually on each new feature. It would be consumed by Appium for tasting purpose. The value of the key is not important, the only requirement is that the keys should be stable for a given UI hierarchy. As long as the screen is not modified, the test tags should be stable through versions
o
But then, how do you know the tag to use with appium? By introspecting at runtime?
r
exactly, this method is acceptable for our QA team.
👌 1
Once the scripts are written, they should not be modified until the screen changes with new features. if something breaks, the scripts are updated