Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update uiauto library, extend framework to allow jank-testing and add new JetNews jank-testing workload #1268

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
510b344
[framework/uiauto] Update uiauto library to move away from android.su…
luis-machado-arm Jul 3, 2024
18d9f94
[framework/workload] Add support for jank testing
luis-machado-arm Jul 8, 2024
b38e64a
[workloads] Add JetNews jank tests workload
luis-machado-arm Jul 4, 2024
1a308b6
[framework/uiauto] Revert changes to original uiauto library
luis-machado-arm Jul 26, 2024
9212b7f
[workload/JetNews] Address reviewer comments
luis-machado-arm Jul 26, 2024
761cab1
[workload/JetNews] Update timestamp for gradle-wrapper.properties file.
luis-machado-arm Aug 27, 2024
94fa1be
[framework/uiauto-androidx] Update copyright years
luis-machado-arm Aug 27, 2024
aa41d4d
[framework] Undo changes to UiAutomatorGUI
luis-machado-arm Aug 28, 2024
7b53b98
[framework] Create new Jank testing classes
luis-machado-arm Aug 28, 2024
fefaa3c
[workload/jetnews] Use Jank testing classes to implement jank testing…
luis-machado-arm Aug 28, 2024
e046461
[workloads/jetnews] Add missing self reference
luis-machado-arm Aug 29, 2024
77b3dfc
Fix linters/tests CI issues
luis-machado-arm Aug 29, 2024
651fd23
[workloads/jetnews] Disable too-many-ancestors linter for Jetnews class
luis-machado-arm Sep 13, 2024
e85cca9
[workloads/jetnews] Fix more linter issues (E302 and E261)
luis-machado-arm Sep 13, 2024
5180fed
[workloads/jetnews] Harden JetNews testing to cope with tablets/small…
luis-machado-arm Nov 5, 2024
c9ffbfb
[workloads/jetnews] Improve reliability of object detection
luis-machado-arm Nov 13, 2024
0cdccc1
[workloads/jetnews] Restore test default timeout, repeat count and fl…
luis-machado-arm Nov 13, 2024
0dcae68
[workloads/jetnews] Bump the minSdkVersion to 28 and targetSdkVersion…
luis-machado-arm Nov 26, 2024
a44c5fb
[workloads/jetnews] Update workload documentation to mention API leve…
luis-machado-arm Nov 26, 2024
0a9c16b
Add missing gradle.properties file
luis-machado-arm Dec 17, 2024
871dfea
[workloads/jetnews] Update default fling speed from 5000 to 15000
luis-machado-arm Dec 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions wa/framework/workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,13 +504,14 @@ class UiAutomatorGUI(object):

stages = ['setup', 'runWorkload', 'extractResults', 'teardown']

uiauto_runner = 'android.support.test.runner.AndroidJUnitRunner'

def __init__(self, owner, package=None, klass='UiAutomation', timeout=600):
self.owner = owner
self.target = self.owner.target
self.uiauto_package = package
self.uiauto_class = klass
self.uiauto_jank_class = klass
self.uiauto_runner = 'android.support.test.runner.AndroidJUnitRunner'
self.jank_stages = []
self.timeout = timeout
self.logger = logging.getLogger('gui')
self.uiauto_file = None
Expand Down Expand Up @@ -539,6 +540,16 @@ def init_commands(self):
self.commands[stage] = cmd_template.format(params, class_string,
instrumentation_string)

for stage in self.jank_stages:
class_string = '{}.{}#{}'.format(self.uiauto_package,
self.uiauto_jank_class,
stage)
instrumentation_string = '{}/{}'.format(self.uiauto_package,
self.uiauto_runner)
cmd_template = 'am instrument -w -r{} -e class {} {}'
self.commands[stage] = cmd_template.format(params, class_string,
instrumentation_string)

luis-machado-arm marked this conversation as resolved.
Show resolved Hide resolved
def deploy(self):
if self.target.package_is_installed(self.uiauto_package):
self.target.uninstall_package(self.uiauto_package)
Expand Down Expand Up @@ -578,6 +589,7 @@ def _execute(self, stage, timeout):
else:
self.logger.debug(result)
time.sleep(2)
return result


class ReventGUI(object):
Expand Down