I noticed we were sometimes getting stale object exceptions. To help prevent
that situation from happening, pass around resource id's for the objects and
only fetch an instance of the objects whenever we need to click/scroll.
This means the time between fetching the object and using it is short, and
hopefully the object won't go stale or get recycled in that brief moment,
preventing the stale exceptions.
On tablets we have a landscape view by default, so we need to account for that
in our tests. On smaller phones, the landscape mode doesn't show the article
preview.
On both tablets and small screen phones, we need to be mindful of scrolling
too fast and missing an element we're looking for, either because a bigger
screen means we scroll faster or because a smaller screen means only a few
items are shown at one time.
This patch adds the JetNews jank-testing workload. This is accomplished
through the uiauto helper library and the jank test classes.
This workload requires a JetNews app APK to be available. We plan to
make it available through the workload-automation-assets repo.
At the end of the run, users should end up with a json file containing all
the frame/jank metrics.
There are 3 parameters for this workload:
- tests: Specifies which of the 3 available tests to run (default is to run
all of them)
- flingspeed: The speed of the fling interactions.
- repeat: How many times each of the selected tests is to be executed in a
single measuring session.