wlauto.workloads.applaunch package

Module contents

class wlauto.workloads.applaunch.Applaunch(device, **kwargs)[source]

Bases: wlauto.common.android.workload.AndroidUxPerfWorkload

aliases = AC([])
artifacts = AC([])
core_modules = []
deployable_assets = []
description = '\n This workload launches and measures the launch time of applications for supporting workloads.\n\n Currently supported workloads are the ones that implement ``ApplaunchInterface``. For any\n workload to support this workload, it should implement the ``ApplaunchInterface``.\n The corresponding java file of the workload associated with the application being measured\n is executed during the run. The application that needs to be\n measured is passed as a parametre ``workload_name``. The parameters required for that workload\n have to be passed as a dictionary which is captured by the parametre ``workload_params``.\n This information can be obtained by inspecting the workload details of the specific workload.\n\n The workload allows to run multiple iterations of an application\n launch in two modes:\n\n 1. Launch from background\n 2. Launch from long-idle\n\n These modes are captured as a parameter applaunch_type.\n\n ``launch_from_background``\n Launches an application after the application is sent to background by\n pressing Home button.\n\n ``launch_from_long-idle``\n Launches an application after killing an application process and\n clearing all the caches.\n\n **Test Description:**\n\n - During the initialization and setup, the application being launched is launched\n for the first time. The jar file of the workload of the application\n is moved to device at the location ``workdir`` which further implements the methods\n needed to measure the application launch time.\n\n - Run phase calls the UiAutomator of the applaunch which runs in two subphases.\n A. Applaunch Setup Run:\n During this phase, welcome screens and dialogues during the first launch\n of the instrumented application are cleared.\n B. Applaunch Metric Run:\n During this phase, the application is launched multiple times determined by\n the iteration number specified by the parametre ``applaunch_iterations``.\n Each of these iterations are instrumented to capture the launch time taken\n and the values are recorded as UXPERF marker values in logfile.\n '
finalize(*args, **kwargs)
init_resources(context)[source]
init_workload_resources(context)[source]
initialize(*args, **kwargs)
kind = 'workload'
name = 'applaunch'
parameters = AC(["Param({'kind': <type 'list'>, 'mandatory': None, 'name': 'modules', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function integer>, 'mandatory': None, 'name': 'install_timeout', 'constraint': None, 'default': 300, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function boolean>, 'mandatory': None, 'name': 'check_apk', 'constraint': None, 'default': True, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function boolean>, 'mandatory': None, 'name': 'force_install', 'constraint': None, 'default': False, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function boolean>, 'mandatory': None, 'name': 'uninstall_apk', 'constraint': None, 'default': False, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function boolean>, 'mandatory': None, 'name': 'exact_abi', 'constraint': None, 'default': False, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function boolean>, 'mandatory': None, 'name': 'clear_data_on_reset', 'constraint': None, 'default': True, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function boolean>, 'mandatory': None, 'name': 'markers_enabled', 'constraint': None, 'default': False, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function boolean>, 'mandatory': None, 'name': 'clean_assets', 'constraint': None, 'default': False, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function boolean>, 'mandatory': None, 'name': 'force_push_assets', 'constraint': None, 'default': False, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <type 'str'>, 'mandatory': None, 'name': 'workload_name', 'constraint': None, 'default': 'gmail', 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <type 'dict'>, 'mandatory': None, 'name': 'workload_params', 'constraint': None, 'default': {}, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <type 'str'>, 'mandatory': None, 'name': 'applaunch_type', 'constraint': None, 'default': 'launch_from_background', 'allowed_values': ['launch_from_background', 'launch_from_long-idle'], 'global_alias': None, 'override': False})", "Param({'kind': <function integer>, 'mandatory': None, 'name': 'applaunch_iterations', 'constraint': None, 'default': 1, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function boolean>, 'mandatory': None, 'name': 'report_results', 'constraint': None, 'default': True, 'allowed_values': None, 'global_alias': None, 'override': False})"])
pass_parameters()[source]
run(context)[source]
setup(context)[source]
supported_platforms = ['android']
teardown(context)[source]
update_result(context)[source]
validate(*args, **kwargs)