0% found this document useful (0 votes)
9 views10 pages

Technical Specification - OnDevice - OttSupplementaryActionService - Python Interface

Uploaded by

Amr Abuella
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views10 pages

Technical Specification - OnDevice - OttSupplementaryActionService - Python Interface

Uploaded by

Amr Abuella
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Technical Specifications for

OnDeviceOttSupplementaryActionService
Python Interface

www.Infovista.com | 1
Copyright Infovista Sweden AB 2022

TEMS is a trademark of Infovista. All other trademarks are the property of their respective holders.
No part of this document may be reproduced in any form without the written permission of the copyright holder.

The contents of this document are subject to revision without notice due to continued progress in methodology, design and
manufacturing. Infovista shall have no liability for any error or damage of any kind resulting from the use of this document.

www.Infovista.com | 2
Contents
1 Introduction....................................................................................................................................................... 4
2 Data Types ....................................................................................................................................................... 5
2.1 Referenced protocol buffer data types ...................................................................................................... 5
2.2 Enumerators .............................................................................................................................................. 5
2.2.1 StatusCode ........................................................................................................................................ 5
2.2.2 ErrorCode .......................................................................................................................................... 5
2.2.3 SupplementaryActionState ................................................................................................................ 5
2.2.4 SupplementaryActionUiAutomationAction ......................................................................................... 6
3 Interfaces.......................................................................................................................................................... 7
3.1 report_is_test_running............................................................................................................................... 7
3.1.1 report_is_test_running response ....................................................................................................... 7
3.2 report_app_info ......................................................................................................................................... 7
3.2.1 report_app_info response .................................................................................................................. 7
3.3 set_configuration ....................................................................................................................................... 8
3.3.1 Set_configuration response ............................................................................................................... 8
3.4 set_timeouts .............................................................................................................................................. 8
3.4.1 set_timeouts response....................................................................................................................... 8
3.5 start_test ................................................................................................................................................... 8
3.5.1 start_test response ............................................................................................................................ 9
3.6 stop_test.................................................................................................................................................... 9
3.6.1 stop_test response ............................................................................................................................ 9
3.7 report_supplementary_action_ui_automation_action ................................................................................ 9
3.7.1 report_ui_action_report response .................................................................................................... 10
3.8 report_supplementary_action_state ........................................................................................................ 10
3.8.1 report_ui_action_report response .................................................................................................... 10
3.9 report_supplementary_action_miscellaneous ......................................................................................... 10
3.9.1 report_supplementary_action_miscellaneous_response ................................................................. 10

www.Infovista.com | 3
1 Introduction
This document provides information on the python interfaces for TEMS
OnDeviceOttSupplementaryActionService.

www.Infovista.com | 4
2 Data Types

2.1 Referenced protocol buffer data types.


Data type Reference
Timestamp from google.protobuf.timestamp_pb2
Duration from google.protobuf. duration_pb2

2.2 Enumerators

2.2.1 StatusCode
Operation ID Description
STATUS_CODE_UNSPECIFIED Not used.
STATUS_CODE_SUCCESS Success.
STATUS_CODE_ERROR_NO_TEST_RUNNING Error due to no test is running.
STATUS_CODE_INTERNAL_ERROR Error in the system internally.
STATUS_CODE_INVALID_ARGUMENT Error due to invalid argument.

2.2.2 ErrorCode
Operation ID Description
ERROR_CODE_UNSPECIFIED Not used.
ERROR_CODE_ABORTED_BY_USER Aborted by user.
ERROR_CODE_INTERNAL_ERROR Internal error.
ERROR_CODE_UNKNOWN_ERROR Unknown error.
ERROR_CODE_NETWORK_ERROR Network error.
ERROR_CODE_USER_NOT_REGISTERED User not register.
ERROR_CODE_OPERATION_FAILURE Operation failure.
ERROR_CODE_CONNECTION_ERROR Connection error.
ERROR_CODE_APPLICATION_FAILURE Application has failed.
ERROR_CODE_APPLICATION_NOT_INSTALLED Application is not installed.
ERROR_CODE_UNSUPPORTED_APPLICATION_VERSION Application version is unsupported.
ERROR_CODE_METHOD_NOT_IMPLEMENTED Method is not implemented.
ERROR_CODE_DNS_TIMEOUT DNS has timed out.
ERROR_CODE_TIME_TO_FIRST_BYTE_TIMEOUT Time to first byte has timed out.

2.2.3 SupplementaryActionState
Operation ID Description
SUPPLEMENTARY_ACTION_UNSPECIFIED Not used.
SUPPLEMENTARY_ACTION_START_CONFIGURAT
Config Phase Start
ION_PHASE

www.Infovista.com | 5
Operation ID Description
SUPPLEMENTARY_ACTION_END_CONFIGURATIO
Config Phase End
N_PHASE
SUPPLEMENTARY_ACTION_START_TEST_PHASE Test Phase Start
SUPPLEMENTARY_ACTION_END_TEST_PHASE Test Phase End

2.2.4 SupplementaryActionUiAutomationAction
Operation ID Description
SUPPLEMENTARY_ACTION_UI_AUTOMATION_AC
Not used.
TION_UNSPECIFIED
SUPPLEMENTARY_ACTION_UI_AUTOMATION_AC
Launch Intent
TION_LAUNCH_INTENT
SUPPLEMENTARY_ACTION_UI_AUTOMATION_AC
First Action
TION_FIRST_ACTION
SUPPLEMENTARY_ACTION_UI_AUTOMATION_AC
Last Action
TION_LAST_ACTION

www.Infovista.com | 6
3 Interfaces
You will need to import the following libraries to your python script before you can use the following interfaces.

• from tems.services import ottsupplementaryaction as ottsa


• from tems.services. ottvsutil import ottvsutil

Example usage of an interface:


ottsa.report_is_test_running()

__sutil = ottvsutil(__device)

3.1 report_is_test_running

Use this interface to check whether the test session is still active in OnDeviceOttSupplementaryActionService.
Serves somewhat like a heartbeat check.

No arguments.

3.1.1 report_is_test_running response

Argument Name Data Type Description


status_code StatusCode Refer to 2.2.1

3.2 report_app_info
Use this interface to report the application information.

Argument Name Data Type Description


The application’s package name in Android.

Package Name string


Example:
com.Whatsapp

3.2.1 report_app_info response


Argument Name Data Type Description
status_code StatusCode Refer to 2.2.1
The error description if failed.
error_detail string
Default "".

www.Infovista.com | 7
3.3 set_configuration
Use this interface to set the configurations that will be used by OnDeviceOttSupplementaryActionService.

Argument Name Data Type Description


Whether or not to continue the test if failed to start IP Sniffer.
proceed_without_ip_sniffer bool
Default false.
The size in bytes to create a chunk report every time it is reached.
chunk_size uint32
Default 0 for not creating chunk report.

3.3.1 Set_configuration response


Argument Name Data Type Description
status_code StatusCode Refer to 2.2.1
The error description if failed.
error_detail string
Default "".

3.4 set_timeouts
Use this interface to set the timeouts that will be used by OnDeviceOttSupplementaryActionService.

Argument Name Data Type Description


The timeout to check for network access.
network_access_timeout Duration Default 5 seconds.
Mandatory.
The timeout to wait for DNS response.
dns_timeout Duration
Default 0 for no limit.
The timeout to wait for first byte.
time_to_first_byte_timeout Duration
Default 0 for no limit.

3.4.1 set_timeouts response


Argument Name Data Type Description
status_code StatusCode Refer to 2.2.2
error_detail string The error description if failed. Default "".

3.5 start_test
Use this interface to start the test.

No arguments.

www.Infovista.com | 8
3.5.1 start_test response
Argument Name Data Type Description
status_code StatusCode Refer to 2.2.1
The error description if failed.
error_detail string
Default "".

3.6 stop_test
Use this interface to abort the test.

Argument Name Data Type Description


timestamp Timestamp Current epoch timestamp.

Example:
error_code ErrorCode from tems.services import ottsupplementaryaction as ottsa

ottsa.ErrorCode.Value("ERROR_CODE_APPLICATION_FAILURE")
The error description if failed.
error_detail string
Default "".

3.6.1 stop_test response


Argument Name Data Type Description
status_code StatusCode Refer to 2.2.2
The error description if failed.
error_detail string
Default "".

3.7 report_supplementary_action_ui_automation_action
Use this UI Automation Action Report interface to check the uiautomation event.

Argument Name Data Type Description


timestamp Timestamp Current epoch timestamp.

Example:
from tems.services import ottsupplementaryaction as ottsa
uiautomationaction string

ottsa.SupplementaryActionUiAutomationAction.Value("SUPPLEMEN
TARY_ACTION_UI_AUTOMATION_ACTION_LAUNCH_INTENT")
The description of ui automation action.

description string Example:

am start --user 0 -a android.intent.action.VIEW -d com.whatsapp

www.Infovista.com | 9
3.7.1 report_ui_action_report response
Argument Name Data Type Description
status_code StatusCode Refer to 2.2.1
The error description if failed.
error_detail string
Default "".

3.8 report_supplementary_action_state
Use this UI Automation Action Report interface to check the uiautomation event.

Argument Name Data Type Description


timestamp Timestamp Current epoch timestamp.
status_code StatusCode Refer to 2.2.1

3.8.1 report_ui_action_report response


Argument Name Data Type Description
status_code StatusCode Refer to 2.2.1
The error description if failed.
error_detail string
Default "".

3.9 report_supplementary_action_miscellaneous
Use Miscellaneous Report interface to check the supplementary action event.

Argument Name Data Type Description


timestamp Timestamp Current epoch timestamp.
Supplementar
yActionMiscell SupplementaryActionMiscellaneousValue.
Refer to
miscellaneous_event
aneousValueT String or Float.
ype
The miscellaneous description.
description string
Default "".
string_value string The miscellaneous event.
float_value float The value of miscellaneous.

3.9.1 report_supplementary_action_miscellaneous_response
Argument Name Data Type Description
status_code StatusCode Refer to 2.2.1
The error description if failed.
error_detail string
Default "".

www.Infovista.com | 10

You might also like