1. INSTALLATION
    1. Download
    2. Windows
    3. MacOS
    4. Ubuntu
  2. BASIC USAGE
    1. Install Plug-Ins
      1. Sample) Install WebEnginePlugin
    2. Connectivity - Adding Device
      1. Sample) Connecting WebEngine Device
    3. Create Library Project
    4. Create Scenario Project
    5. Create Scenario Script
    6. Mapping Logical Devices
    7. Write Default Scenario
    8. Run Script
    9. Deploy
      1. Deploy to Workstation
      2. Deploy to Device (To be supported in the future)
      3. Deploy to Repository
    10. Test Packages Management
    11. Task Running
      1. PC side tests
      2. Remote side tests
    12. Analyzing Test Results
    13. Cross-Platform Tests Management
  3. DEVICE MANAGEMENT DETAILS
    1. Connect Android Device
    2. Connect webOS TV
    3. Connect AirConditioner Monitoring Device
    4. Connect AirConditioner ODU Device
    5. Connect AirConditioner Resistance Device
    6. Connect Power Supply
    7. Connect Agilent Power Supply
    8. Connect Audio Manager Device
    9. Connect AVN Android Device
    10. Connect COM Port
    11. Connect Device with SSH
    12. Connect IVI CANat Device
    13. Connect IVI DIO Device
    14. Connect IVI QEBenchIO Device
    15. Connect IVI QE GCC Device
    16. Connect IVI VW MIB Device
    17. Connect iOS Device
    18. Connect Leopard Device
    19. Connect PC Device
    20. Connect QNX Device
    21. Connect QXDM Device
    22. Connect SIMHub Device
    23. Connect USB Controller Device
    24. Connect USB Selector Device
    25. Connect Vector Device
    26. Connect Video Manager
    27. Connect VISA Instrument Device
    28. Connect VuPower Device
    29. Connect WebEngine Device
    30. Connect Digital Multimeter Device
    31. Connect Automotive Electronic Simulator Device
    32. Connect LIN Device
    33. Connect DeepThinQ Plugin Device
    34. Connect DLToolkitSite Device
    35. Connect Battery Pack Simulator Device
    36. Connect Multiple Devices
    37. Controlling Device
    38. Measure Instruments Address
    39. Overcome Device Disconnection in Test
  4. ADVANCED USAGE
    1. Layered Architecture
      1. TestPresso Workstation Launcher
      2. TestPresso Workstation Manager
        1. Connectivity Panel
        2. Device Shell
        3. Task Manager
        4. UI Inspector
        5. Test Packages Management
        6. Configuration
      3. Test IDE
        1. Project Explorer
        2. Web IDE Mapper
        3. Logs View
      4. Test Runner
      5. Embedded Test Agent (ETA)
        1. ETA for Android Devices
        2. ETA for webOS Devices (WTA)
          1. ETA for webOS TV
    2. Advanced Features
      1. Custom TestPresso Plug-in Modules
      2. Custom Python Modules
      3. Debugging and Running Test
      4. Key Presses Simulation
      5. Setting Scenario Runtime Parameters
      6. Using Recovery Scenarios
      7. Working with Android devices through Wi-Fi
  5. SAMPLE OF SCRIPT
    1. AudioAnalyzer
    2. AVN Android Client
    3. ETA2Client
    4. ExcelWorkbook
    5. ImageAnalyser
    6. SerialPort
    7. SSHClient
    8. VideoManager
    9. WebEngine

1.INSTALLATION

This section describes how to install TestPresso.











1.1.Download

  1. 1)

    Python should be installed before TestPresso installation.
    Download Link: https://www.python.org/

    note image

    For Python 2, version 2.7.14 or higher is required.
    For Python 3, version 3.5 is required.

  2. 2)

    Download installation files from the homepage.










1.2.Windows

To install TestPresso, start installation file and follow the wizard steps.

  1. 1)

    Please choose the language for installation.

    TestPresso Installation for Windows step1
  2. 2)

    Read the information and Click Next to continue.

    TestPresso Installation for Windows step2
  3. 3)

    Select destination location.

    TestPresso Installation for Windows step3
  4. 4)

    Select the components you want to install, clear the components you don’t want to install, Click Next to continue.

    TestPresso Installation for Windows step4
  5. 5)

    Select the TestPresso working folder and click Next to continue.

    TestPresso Installation for Windows step5
  6. 6)

    Select Start Menu folder. Click Next to continue.

    TestPresso Installation for Windows step6
  7. 7)

    It is the preparation stage for installation. Click Next to continue.

    TestPresso Installation for Windows step7
  8. 8)

    Wait while Setup installs TestPresso on your computer.

    TestPresso Installation for Windows step8
  9. 9)

    Select type of a Node installed: Master or Slave. For Slave Node specify Host (Master Node Address) and Port.

    TestPresso Installation for Windows step9-1

    Selected mode is applied to Test Node Launcher which launches the Node in a corresponding mode and shows the current Node mode. After the installation the mode can be selected via Setting menu of Test Node Launcher (Test Node should be stopped):

    TestPresso Installation for Windows step9-2
  10. 10)

    Specify Personal Information for full and correct TestPresso functionality.

    TestPresso Installation for Windows step11
  11. 11)

    After the installation you will be suggested to activate TestPresso.

    • By internet connection

    • By e-mail using local PC default e-mail client

    • By saving request to file and sending this file independently

    Click Next after choosing

    TestPresso Installation for Windows step11-1

    If you checked activation by e-mail Activation Request will be generated as a new letter. Send it to specified e-mail.

    TestPresso Installation for Windows step11-2

    If you checked Save activation request to file and send independently specify the file name, click Next and send this file to tp-support@lge.com

    TestPresso Installation for Windows step11-3

    You will get the activation package. After installation in Test Node Launcher menu choose Continue activation where load the received activation package file.

  12. 12)

    Click Finish to exit Setup. Check installation by opening Test Node Launcher and Test Node Manager.

    TestPresso Installation for Windows step12
  13. 13)

    When the installation is completed, the following screen is displayed.

    TestPresso Installation for Windows step13-1

    After a few seconds, you can see the image below.

    TestPresso Installation for Windows step13-2




1.3.MacOS

To install TestPresso on MacOS, follow the next steps.

  1. 1)

    Download TestPresso Installation .dmg file.

  2. 2)

    Run it and drag TestPresso icon to Applications.

    TestPresso Installation for MacOS step1
  3. 3)

    Open Applications folder and run TestPresso.

  4. 4)

    Activate TestPresso, in Test Node Launcher menu choose Activate TestPresso Workstation.

    TestPresso Installation for MacOS step2
  5. 5)

    After the installation you will be suggested to activate TestPresso. Choose the way of TestPresso activation.

    • By e-mail using local PC default e-mail client

    • By saving request to file and sending this file independently

    Click Continue after choosing

    TestPresso Installation for MacOS step3-1
    TestPresso Installation for MacOS step3-2
  6. 6)

    Send an activation request to tp-support@lge.com and wait for the activation package.

  7. 7)

    Continue activation procedure and specify the activation file.

    TestPresso Installation for MacOS step4
  8. 8)

    Open Test Node Manager.

    TestPresso Installation for MacOS step5
  9. 9)

    When the installation is completed, the following screen is displayed. After a few seconds, you can see the image below.

    TestPresso Installation for MacOS step6

1.4.Ubuntu

To install TestPresso on Linux, follow the next steps.

  1. 1)

    Download TestPresso Installation .deb file.

  2. 2)

    Double-click downloaded TPWS_Setup_x.x.x_ubuntu.deb file to install through the Software Center.

    To install TestPresso on Linux, follow the next steps. step1

    * If the installation fails: Re-install package at the terminal using the following command
    $ sudo dpkg –i TPWS_Setup_x.x.x_ubuntu.deb
    $ sudo apt install -f

    To install TestPresso on Linux, follow the next steps. step2

  3. 3)

    After installation in finished, start Test Node Launcher by choosing
    opt/tpws/TestNodeLauncher

    To install TestPresso on Linux, follow the next steps. step3
  4. 4)

    Activate TestPresso, in Test Node Launcher menu choose Activate TestPresso Workstation.

    To install TestPresso on Linux, follow the next steps. step4
  5. 5)

    After the installation you will be suggested to activate TestPresso. Choose the way of TestPresso activation.

    • By Internet connection

    • By e-mail using local PC default e-mail client

    • By saving request to file and sending this file independently

    • Click Next after choosing

    To install TestPresso on Linux, follow the next steps. step5-1
    To install TestPresso on Linux, follow the next steps. step5-2

    If you checked activation by e-mail Activation Request will be generated as a new letter. Send it and wait for the activation package.

    If you checked Save activation request to file… and specify the file name, click Next, then send this file to tp-support@lge.com and wait for the activation package.

  6. 6)

    In Test Node Launcher menu choose Continue activation procedure where load the activation package file.
    Continue activation procedure and specify the activation file.

    To install TestPresso on Linux, follow the next steps. step6-1
    To install TestPresso on Linux, follow the next steps. step6-2
  7. 7)

    Open Test Node Manager by choosing Open Test Node Manager in Test Node Launcher menu.

    To install TestPresso on Linux, follow the next steps. step7
  8. 8)

    When the installation is completed, the following screen is displayed.
    After a few seconds, you can see the image below.

    To install TestPresso on Linux, follow the next steps. step8

2.BASIC USAGE

The flowchart below demonstrates typical workflow of TestPresso.

  • 1)

    Create New Solution and Scenario Project – this is what you do when you start working with TestPresso.

  • 2)

    Create new scenario to implement test logic.

  • 3)

    At least one plug-in project should be added to your workspace. It will provide device control functions for the device that you are going to test.

  • 4)

    Map logical devices of your scenario onto the plug-in projects or go to step 8. When the mapping is done, each logical device will have the specified type and you will be able to use auto-complete functionality.

  • 5)

    Implement your test logic using device control functions and standard Python functionality.

  • 6)

    You can deploy created Test Package to the fileshare.

  • 7)

    You can deploy created Test Package to Device and run it there.

  • 8)

    Prepare the target device(s) that you are going to use in the test.

  • 9)

    Add Device to Connectivity page. TestPresso can only work with devices added to the Connectivity page.

  • 10)

    You can upload an existing Test Package from TestPresso Tests Repository.

  • 11)

    Map physical device(s) in the Connectivity page to the logical device(s) in the scenario. Besides specified device types and auto-complete functionality, you will be able to debug (go to step 18) your scenario and run test packages.

  • 12)

    Run Test Packages.

  • 13)

    Analyze Test Results.

  • Advanced Features
  • 14)

    Create recovery scenarios that will make your test more robust by handling unexpected responses from device.

  • 15)

    Set Scenario Runtime Parameters to make your test more flexible.

  • 16)

    Use UI Inspector to record user actions (button and touch screen events).

  • 17)

    After mapping a new physical device, the New Model Wizard will start. It will guide your through adding the connected model to the plug-in project. The model defines some properties that influence test execution. Also, for each model you can create navigation and verification database.

  • 18)

    Debug your test to make sure it works properly.

2.1.Install Plug-Ins

This section describes how to install plug-ins.

Please refer the 2.1.1. Sample) Install WebEngine Plugin

2.1.1.Sample) Install WebEnginePlugin

To Connect WebEngine device, install WebEnginePlugin.

  1. 1)

    Click Configuration Panel > Features > Install Selected

    To Connect WebEngine device, install WebEnginePlugin step1
  2. 2)

    All checked autoinstall plug-ins are default plug-ins and recommended installation

  3. 3)

    WebEnginPlugin is required to connect to the browser driver.

  4. 4)

    You neet to restart TestPresso workstation service.

    To Connect WebEngine device, install WebEnginePlugin step2
  5. 5)

    To open Launcher menu right-click on Test Node Launcher icon in the Tray

  6. 6)

    Click Stop Test Node

    To Connect WebEngine device, install WebEnginePlugin step3
  7. 7)

    Click Start Test Node

    To Connect WebEngine device, install WebEnginePlugin step4
  8. 8)

    Check Installed Plugins

    To Connect WebEngine device, install WebEnginePlugin step5

2.2.Connectivity - Adding Device

Connectivity - Adding Device step1

Each physical device that is going to participate in the test, should be added to the Connectivity page.
To add new device for your test:

  • Click Add Device Connectivity - Adding Device step2 on the Connectivity panel. The Device Details dialog box appears.

  • Select the type of the connected device from the list of the supported types. The rest of the fields will be formed depending on the selected device type.

  • Click Save to finish. The device will be added to the Connectivity page.

Android Device (Socket)

  • Choose Android Device (Socket) device type in the Device Details dialog box.

Android Device (Remote Socket)

This type is mostly used for devices connection over WiFi. Device control in this mode has some peculiarities.

  • Choose Android Device (Remote socket) device type in the Device Details dialog box.

webOS Device (ssh)

  • Choose webOS Device (ssh) device type in the Device Details dialog box

webOS Device (Remote Socket)

  • Choose webOS Device (Remote socket) device type in the Device Details dialog box.

AirConditioner Monitoring Device

  • Choose AC Monitoring device type in the Device Details dialog box.

AirConditioner ODU Device

  • Choose AC ODU device type in the Device Details dialog box.

AirConditioner Resistance Device

  • Choose AC Resistance device type in the Device Details dialog box.

Agilent Device (Power Supply)

  • Choose Agilent Power Supply device type in the Device Details dialog box.

Audio Manager Device

  • Choose Audio Manager device type in the Device Details dialog box.

AVN Android Device

  • Choose AVN Android Device device type in the Device Details dialog box.

IVI CANat Device

  • Choose IVI CANat device type in the Device Details dialog box.

IVI DIO Device

  • Choose IVI DIO device type in the Device Details dialog box.

IVI QEBenchIO Device

  • Choose IVI QEBenchIO device type in the Device Details dialog box.

IVI VW MIB Device

  • Choose IVI VW MIB device type in the Device Details dialog box.

iOS Device

  • Choose iOS Device (WebDriverAgent) device type in the Device Details dialog box.

Leopard Device (Remote Socket)

  • Choose Leopard Device (Remote socket) device type in the Device Details dialog box.

Leopard Device (ssh)

  • Choose Leopard Device (ssh) device type in the Device Details dialog box.

PC Device

  • Choose PC Device device type in the Device Details dialog box.

QNX Device

  • Choose QNX Device device type in the Device Details dialog box.

Serial Port

  • Choose Serial Port device type in the Device Details dialog box.

SIM Hub

  • Choose SIM Hub device type in the Device Details dialog box.

USB Controller Device

  • Choose USB Controller device type in the Device Details dialog box.

USB Selector Device

  • Choose USB Selector device type in the Device Details dialog box.

Vector Device (CAN)

  • Choose Vector Device (CAN) device type in the Device Details dialog box.

VISA Instrument Device

  • Choose Visa Instrument device type in the Device Details dialog box.

VuPower Device

  • Choose VuPower device type in the Device Details dialog box.

WebEngine Device (local)

  • Choose WebEngine (local) Device device type in the Device Details dialog box.

WebEngine Device (SSH)

  • Choose WebEngine (SSH) Device device type in the Device Details dialog box.

note image

TestPresso does not detect device disconnection automatically. (See  Device Management Details )

2.2.1.Sample) Connecting WebEngine Device

WebEngine device type is intended for management of WebEngine-based test units testing (Web-applications in browsers): Chrome, Firefox, Opera or Internet Explorer on PC.

This connection type assumes a proxy-service with ETA protocol on PC for implementation of a standard TestPresso test protocol and processing requests to tested units having no Test Agent inside (browser, emulator, ‘black-box’ device). It may be the gate to non-intrusive tested device control. In such a case connection to a physical device may be absent whereas local interface to some software or hardware unit is maintained through the proxy.

To use WebEngine device from TestPresso tools and scripts you need to install driver for a target browser and then register device at Connectivity page.

Drivers for browsers are represented in the table below.

Browser Driver
Chrome ChromeDriver
Firefox FirefoxDriver
Internet Explorer InternetExplorerDriver
Opera OperaDriver

There are 3 available connection types to WebEngine devices:

  • browser

  • chrome remote

  • Browser
    Use the following actions to connect WebEngine device:

  1. 1)

    Open Connectivity page

    Connecting WebEngine Device step1
  2. 2)

    Click Add Device  add divce and choose WebEngine (browser) device type in the appeared dialog box.

  3. 3)

    Specify the following parameters in the appeared dialog box.

    • TAG – Device tag

    • BROWSER – Browser type: Chrome, Firefox, Opera, Internet Explorer

    Connecting WebEngine Device step2
  4. 4)

    Press Save to finish. The device will be added to Connectivity Panel.

    Connecting WebEngine Device step3

2.3.Create Library Project

Open Web IDE page and create Library Project.

  1. 1)

    Click New > New > Library Project

    Create Library Project step1
  2. 2)

    Add New Library Project

    • name : test_android_lib

    • plugin : Android Project

    Create Library Project step2
  3. 3)

    Click create and Check a created Project

    Create Library Project step3

2.4.Create Scenario Project

Scenario project may include scenarios and recovery scenarios.

Also, scenario project should include references to the Plug-in Projects that are used in this scenario project. These references are added as soon as you map some logical devices within the scenario project onto particular Plug-in Project.

You can include any number of scenario projects in your solution, but normally, one scenario project is enough to organize scenarios.

Scenario related resources are stored in the Resources folder of Scenario Project.

If grouping of scenarios is required you can add scenarios categories for the current Scenario Project by using a context menu of the selected project. Later you can drag-n-drop the selected scenarios into this category.

You can add one or more scenarios to your scenario project.

  1. 1)

    Click New > New > Scenario Project

    Create Scenario Project step1
  2. 2)

    Add New Scenario Project

    Create Scenario Project step2
  3. 3)

    Click create and Check a created Project

    Create Scenario Project step3

2.5.Create Scenario Script

Scenario in TestPresso is a Python file that implements some test logic.

There are 2 scenario types:

  • test scenario (implements test logic)

  • recovery scenario (implements test logic in case of some problems)

TestPresso Scenario can include:

  • Standard Python constructions;

  • TestPresso system functions (System.***) ;

  • TestPresso device control functions (DEVx.***) (logical devices are mapped for correct execution of these functions);

  • TestPresso auxiliary plug-in functions (ExcelWorkbook Plug-in).

You can study detailed information about TestPresso-specific functions in API page.

In this topic you can learn the following features of scenarios in TestPresso:

  • Scenario Code Structure

  • TestPresso System Functions in Scenario

  • ExcelWorkbook Plug-in

  • Recovery Scenarios

  • Scenario Properties

  • Scenario Execution


Scenario Code Structure

The scenario structure consists of:

  • Block of comments describing the general information about the scenario.

  • Scenario body inside TestMain() function.


TestPresso System Functions in Scenario

There is a special system function for scenario completion: System.Finish(). You should call this function where the scenario can terminate. Here are some examples of calling this function:

  • System.Finish(ExecutionResult.T_PASSED, “Successful execution“)

  • System.Finish(ExecutionResult.T_FAILED, “Failed“)

By calling the function with the corresponding parameters you can accurately terminate executed scenario and add the results to the test log.

All detailed debug information will be added to the debug log via System.Debug() function. Such log will be linked to the test log and may be used for additional analysis of the faults.

For more information about TestPresso system functions, see the TestPresso Functions Reference document.


ExcelWorkbook Plug-in functions in Scenario

You can use objects of ExcelWorkbookPlugin class in you scenario. This plug-in is intended to process Microsoft Excel (*.xls, *.xlsx) files. It has the following functionality:

  • open existing or create new workbook

  • add or remove worksheets

  • address worksheets and cells

  • read and write cells values

In the example below you can see how to create new workbook, add worksheet and write cell value.

workbook = ExcelWorkbookPlugin()
workbook.CreateNew()
workbook.AddWorksheet("NewWorksheet")
workbook.SetActiveWorksheet("NewWorksheet")
workbook.SetCellValue("A1","Hello, World!")
workbook.SaveAs("C:/NewWorkbook.xlsx")
workbook.Close()

ExcelWorkbookPlugin objects also can be used in custom Python functions from custom Python library.

In the table below you can see the information about Excel files support in different run configurations:

On-PC Android On-Device webOS TV
*.xls V V
*.xlsx V
note image

ExcelWorkbook plug-in doesn’t record the information about cell background pictures. That’s why problems with saving changes in existing Excel files with cell backgrounds during Android on-device test execution are possible. It is recommended to delete cell backgrounds from the source Excel file before running test.


Recovery Scenarios

When you use plug-in functions in your scenario, it is needed to check results of their execution. The checks are needed because these functions are executed on devices and there may be unexpected results due to problems on device or with communication.

Creating these checking subroutines for each plug-in function call is difficult and time-consuming. As a solution to this problem, it is recommended to use the mechanism of Recovery Scenarios.
The mechanism works as follows:

  • Create a recovery scenario in your scenario project. In this scenario, you can program how your test should continue in case of some problems (e.g. the specified UI control is not found in the current view on the device).

  • Assign the recovery scenario to a particular error code that can be returned by the plug-in function (e.g.AT_UICONTROL_NOT_FOUND).

  • Now, if some function terminates with this error code during scenario execution, TestPresso automatically runs the assigned recovery scenario.

In case of usual error codes, the scenario in most cases can be continued without any changes although you can implement finishing directly from the recovery scenario using the System.Finish() system function. However, in case of disconnecting device, the test scenario terminates with specific description even if you do not call the System.Finish() function in the recovery scenario.

Currently, you can define recovery scenarios for the following errors:

  • Operation timeout (AT_TIMEOUT) – Response waiting time has been exceeded

  • General device error (AT_DEVICE_ERROR) – Executed command has failed with ERROR code

  • ETA protocol error (AT_PROTOCOL_EXCEPTION) – ETA protocol processing fault possibly related to ETA and TestPresso versions mismatch

  • Application Test Server (AT_APPTESTSERVER_ERROR) – AAMS errors related to handset UI layout analysis

  • UI control not found (AT_UICONTROL_NOT_FOUND) – Specified application’s UI control has not been found at the current layout

  • TestPresso inner exception (AT_EXCEPTION) – General exception has occurred during TestPresso inner module operation

  • Scenario stopped – Test execution was aborted from outside by the user our outer tool

  • Device Disconnected (AT_EXCEPTION, AT_TIMEOUT, AT_PORT_ERROR) – The device does not respond to commands

You can define recovery scenario for each of the error in the New Scenario Wizard or in the scenario properties. If you want no recovery scenario to be applied to some error codes, you can choose <None> in the recovery scenario selector for these codes.

When you create a new scenario project, a default recovery scenario is created. It will be used for all error types unless you create and specify different recovery scenario.


  • Create Scenario Script
    You can add one or more scenarios to your scenario project.

  1. 1)

    Right Click Test Scenario Folder > New File > Test Scenario File

    step1
  2. 2)

    Add New Test Scenario File
    name : webengine_chrome_test_script.py
    description : WebEnginePlugin – chrome test ( not necessary )

    step2
  3. 3)

    Click create and Check a created script file.

    step3
  4. 4)

    Check a created property file.

    step4

2.6.Mapping Logical Devices

Mapping is a way of linking a logical device in a Scenario with the physical device during test execution or with a Plug-in Project during test creation.

The principles of mapping are as follows:

  • Test can be successfully compiled and built if all TestPresso Mapper elements are mapped to connected device or to plug-in project

  • Test can be started only if at least one logical device is mapped to the connected device. In this case every call of the method of corresponding DEVx will be processed whereas every call of the method for DEVy not mapped to a connected device will result AT_INITIALIZATION_ERROR error code.


Logical Devices

In Testpresso scenario, you can address tested devices as logical devices DEV1, DEV2, etc. For example, to get an UI object of Android device by name and optional object index you can use this code:

DEV1.UIGetObjectByName("family_name_0")

You can create complex scenarios that will use several devices. The number of devices used in a scenario is defined in Mapper.

If you have a plug-in project in your solution and a physical devices in the Connectivity page, then you have three items to choose for each logical device:

  • Physical device – this choice will allow you to both build the scenario and run it on the mapped device.

  • Plug-in project – this choice will only allow you to develop and build the scenario. By mapping on a Plug-in Project you specify the device type and the corresponding set of functions. If you want to run the scenario, you will need to change mapping to the physical device.

  • <EMPTY> – you can use this option if you declared several logical devices in your scenario but you used only a few of them. The logical devices mapped on “<EMPTY>” will be ignored during build.


Mapping on Plug-in Projects (without connected devices)

When you create a test scenario, you may need to use auto-complete feature for logical device objects so that the correct set of functions is available for logical device of a particular type. Also, to build the scenario, all logical devices must be initialized with correct device types that are defined in Plug-in Projects.

These actions can be done without connected devices. You just need to add corresponding Plug-in Projects to your solution and use Mapper to assign particular Plug-in Project for each logical device in the scenario.


Mapping Physical Devices (with connected devices)

To execute scenario on devices, we need to set correspondence between each logical device in scenario and some physical device in the Connectivity page. In this case, you need mapping on this physical device, and not on the corresponding Plug-in Project. In mapper, you can tell the physical device from model class by port information (see the illustration above). Before mapping a physical device, you should connect the device to PC and add it to the connectivity page.

When you map a logical device on a physical device, additional mapping on the corresponding Plug-in Project is performed automatically. Therefore, references, building, and auto-completion will be available.

note image

NoteTestPresso cannot identify types of logical devices in scenario unless they are mapped. Therefore, it is recommended map all logical devices on correct model classes or physical devices as soon as you start working on the scenario. If you do not map, make sure that you use correct device control functions for each logical device.


  • Mapping
    To work on scenario or execute it, you need to map logical devices used in the scenario on plug-in projects or on physical devices added to the Connectivity page. Devices declared in the scenario will appear here. After you define the number of devices used in a scenario the mapper will initialize the corresponding number of selectors.

  1. 1)

    Open Test Script and Focus on it.

    Mapping step1
  2. 2)

    Add Number of Device in Test

    Mapping step2
  3. 3)

    Select Project

    Mapping step3
  4. 4)

    Select Type/Port

    In the figure below, DEV1 is mapped onto physical device (LG-F500K at port 4444).

    Mapping step4

2.7.Write Default Scenario

  1. 1)

    Write default scenario usiing python script in Web Editor and Click Save file image Button.

    Write Default Scenario step1
  2. example)

  3. # -*- coding: utf-8 -*- 
    
    def TestMain():
        DEV1.Initialize()
        rc = DEV1.RunApplication(url="https://www.lge.co.kr/lgekor/main.do")
        if rc == AT_SUCCESS:
            System.Debug("Run Application Success")
        rc = DEV1.CaptureFullScreen(filePath='C:\\temp\\lgehome.png', scaleFactor=1)
        if rc == AT_SUCCESS:
            System.Debug("Capture Full Screen Success")
            

2.8.Run Script

  1. 1)

    Click Run  button image button for Run Script

  2. 2)

    Check Error or Success on Log

    Run Script step1

2.9.Deploy

You can deploy test package (share for execution) from Web IDE to:

  • Workstation

  • Device

  • Repository

2.9.1.Deploy to Workstation

  1. 1)

    Right Click on Senario Project Name > Deploy > Deploy to Workstation

    Deploy to Workstation step1
  2. 2)

    Check Selected Scenario Projects and Click Next Button.

    Deploy to Workstation step2
  3. 3)

    Click edit button for Edit Deploy Target

    Deploy to Workstation step3
  4. 4)

    Rename Test Node Name or Edit Test Node Address ( Include Remote Address )

    And then Click, OK Button.

    Deploy to Workstation step4
  5. 5)

    Choose Deploy Target and Click Finish Button.

    Deploy to Workstation step5
  6. 6)

    Check Success deploy Message

    Deploy to Workstation step6
  7. 7)

    Check Deployed Package

    Deploy to Workstation step7

2.9.2.Deploy to Device (To be supported in the future)

  1. 1)

    Right Click on Scenario Project Name > Deploy > Deploy to Repository

    Deploy to Device step1

2.9.3.Deploy to Repository

  1. 1)

    Right Click on Scenario Project Name > Deploy > Deploy to Repository

    Deploy to Repository step1
  2. 2)

    Check Selected Scenario Projects and Click Next Button.

    Deploy to Repository step2-1
    Deploy to Repository step2-2
  3. 3)

    Choose Repository

    Deploy to Repository step3
  4. 4)

    Change Inner Path and Click Finish Button.

    Deploy to Repository step4
  5. 5)

    Check Success deploy Message

    Deploy to Repository step5
  6. 6)

    Identify Packages in the Remote Repository of Test Packages Management

    Deploy to Repository step6-1
    Deploy to Repository step6-2

2.10.Test Packages Management

Test package is a set of tests and auxiliary data prepared for test deployment. These data are enough to start all tests included into the package on device. In TestPresso test packages are compiled from scenario projects.

note image

Every test package has information about TestPresso version that was used for building this package. In order to execute the package, the corresponding set of TestPresso redistributables has to be installed.


Test Repository

To make test packages exchange more convenient Test Repositories are used.

Repository is a file share which can be accessed by applications for uploading files from it. The access to repository from TestPresso is implemented via interface – TestPresso Repository Service.

There are 2 ways of adding tests to Test Repositories:

  • Manually: you can open Test Repository by Windows Explorer and add your package to specific folder.

  • Deployment from applications.


Test Packages Management page allows you to:

  • Manage local test packages

  • Upload packages from remote repositories

  • Upload packages from local files

In this page there is the list of uploaded packages which can be run.

In Scenarios column you can see the number of scenarios in package. By clicking on this number the list with scenarios names appears.

To create task with package press the corresponding create icon button.

To remove package press the corresponding remove icon button.

Test Repository step1

To load script from local file click on Local Package button and choose necessary script.

To load script from repository click Remote Repositories button, choose repository and script in it and click on local package icon button.

Test Repository step2

2.11.Task Running

This section describes how to run TestPresso tests.

  • PC side tests

  • Remote tests

  • On-device tests on Android

2.11.1.PC side tests

You can run TestPresso tests in Task Manager page of Test Node Manager.

To run test open Task Manager page and use the following steps:

  1. 1)

    Press button icon button to add new task.

  2. 2)

    Select package or several packages from left panel where uploaded packages are listed. New package can be uploaded in Test Packages Management page.

  3. 3)

    Check needed tests from center panel.

  4. 4)

    Set iterations number for tests or package.

  5. 5)

    You can open selected Package settings using setting icon button. Scenario settings are available by clicking settings icon button near the Scenario name.

  6. 6)

    Map devices to tests:

    • by selecting from dropdown list

    • by clicking on device on right panel

    • by clicking mapped icon for using device which was mapped in this scenario

    PC side tests step1
  7. 7)

    Click on Run Task run button icon → run button icon button.

  8. 8)

    Task will start. You can see its state and result in the corresponding columns.

    PC side tests step2
    PC side tests step3
  9. 9)

    After the task is finished you can analyze its results.
    You can add a comment for the task: click on comment button in the corresponding row and input comment text in the appeared window.
    To stop task click on corresponding corresponding button button
    To export task to Excel click on corresponding excel button button.

2.11.2.Remote side tests

To be supported in the future

2.12.Analyzing Test Results

Test execution results are available in the Task Manager page of Test Node Manager.
The results of finished tests are in the Result column of Tasks table.

  • To open Task Logs click on the Task table row which corresponds to this task.

    Analyzing Test Results step1
  • Task Logs window with detailed debug log of this task will appear.

    Analyzing Test Results step2
  • To open log of some scenario in the task click on this scenario in Scenario column.

    Analyzing Test Results step3
  • Task Logs window with detailed debug log of this scenario will appear. If there are few iterations of scenario they will be represented in the left side of the window. You can switch them to see the log of each iteration..

    Analyzing Test Results step4
  • To see the full information about Task, click the Task Info button in Action.

    Analyzing Test Results step5Analyzing Test Results step6

2.13.Cross-Platform Tests Management

TestPresso tests are cross-platform: they can be executed and analyzed in different platforms.

There are the following possible ways of deployment test packages:

  • from Web IDE to device or to Test Node

  • from SD card to Testpresso Test Runner

On-device test logs can be analyzed in TestPresso Test Runner or exported to PC. To analyze logs in PC you can export them to SD card from Test Runner (see here to learn more about logs exporting).

3.1.Connect Android Device

LG Android devices communicate with TestPresso using ETA, which is implemented as a system application on the device. ETA should be installed on the Android device before connecting to TestPresso.

ETA plug-in can be installed and updated in Testpresso Features tab of Test Node Manager Configuration page.
Android device can be connected:

  • over Socket

  • over Remote Socket


Socket

For the connection to Android Device over Socket take the following actions:

  1. 1)

    Click Add Device add button and choose Android Device (Socket) device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • DEVICE ID – [Key property] Android phone serial number assigned by ADB

    • ETA CLIENT TCP PORT – Port (on device) on which – Waiting for incoming connections

    • Socket step1

  3. 3)

    Press Save to finish. The device will be added to Connectivity Page.
    Socket step2

  4. 4)

    When the new device port is added to the Connectivity page, TestPresso will check status of the ETA on device and update it if necessary.

Remote Socket

This type is mostly used for devices connection over WiFi. Device control in this mode has some peculiarities. Device & the TestPresso PC should be on the same LAN or WiFi. For the connection to Android Device over Remote Socket take the following actions:

  1. 1)

    Click Add Device add button and choose Android Device (Remote socket) device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • ETA IP ADDRESS – Remote IP Address of ETA2

    • ETA TCP PORT – Remote TCP port of ETA2

    • Socket step2

  3. 3)

    When the new device port is added to the Connectivity page, TestPresso will check status of the ETA on device and update it if necessary.

System requirements for Android device control over WiFi

  1. 1)

    The following ports must be opened on a phone

    • 5450 – for TestPresso TestRunner application

    • 4444 – for ETA (Android)

    • 5555 – for Android ADB

    • 12346 – for TestPresso logger service operation

    • 12347 – for TestPresso debugger service operation

  2. 2)

    Connect the phone via USB and restart in tcpip mode using the following commands: adb kill-server
    Command: adb kill-server adb tcpip 5555
    Console output must be as follows:
    > adb tcpip 5555
    daemon not running. starting it now on port 5037 * daemon started successfully *
    restarting in TCP mode port: 5555
    After phone reboot these settings will be automatically disabled. To connect to the phone over WiFi after reboot repeat step 2.

3.2.Connect webOS TV

TestPresso supports the work with webOS TV.

WebOS TV can be connected:

  • over SSH Shell

  • over Remote Socket


SSH Shell

From WTAClientplugin 2.0.0 TestPresso supports connecting to webOS device with ssh shell connection without WTA installation. Device is controlled via shell commands only from a plug-in.

For the connection to webOS TV over SSH Shell take the following actions at TestPresso Connectivity page:

  1. 1)

    Click Add Device add button and choose webOS Device (ssh shell) device type in the appeared dialog box.

  2. 2)

    Set Device Tag.

  3. 3)

    Set TV IP address.

  4. 4)

    Set TV SSH Port.

    SSH Shell step1
  5. 5)

    Press Save to finish. The device will be added to Connectivity page.

Remote Socket

For the connection to webOS TV over Remote Socket install WTA to TV at first.After WTA has been installed to TV you can register the device at TestPresso Connectivity page using the following actions:

  1. 1)

    Click Add Device add button and choose webOS Device (Remote socket) device type in the appeared dialog box.

  2. 2)

    Set Device Tag.

  3. 3)

    Set WTA IP address.

  4. 4)

    Set WTA TCP port.

    Connecting AirConditioner Monitoring Device step1
  5. 5)

    Press Save to finish. The device will be added to Connectivity page.

note image

For the connection to TV you need to unblock Firewall and anti-virus software for http connections (port 80).

3.3.Connect AirConditioner Monitoring Device

To use AirConditioner Monitoring Device from TestPresso tools and scripts you need to register it at TestPresso Connectivity page. For this take the following actions:

  1. 1)

    Click Add Device add button and choose AC Monitoring device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • PORT – Port name (COMx)

    • BPS – Communication speed (bits per second)

    • Connecting AirConditioner Monitoring Device step1

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.4.Connect AirConditioner ODU Device

To use AirConditioner ODU Device from TestPresso tools and scripts you need to register it at TestPresso Connectivity page. For this take the following actions:

  1. 1)

    Click Add Device add button and choose AC ODU device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • GROUP LOW – Indoor Unit Low Address: 0 ~ F

    • GROUP HI – Indoor Unit Hi Address: 0 ~ F

    • SEND PRODUCT NO – Product Code: A0~AF Value

    • RECEIVE PRODUCT NO – Product Code: 00~6F Value

    • PORT – Port name (COMx)

    • BPS – Communication speed (bits per second)

    • Connecting AirConditioner ODU Device step1

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.5.Connect AirConditioner Resistance Device

To use AirConditioner Resistance Device from TestPresso tools and scripts you need to register it at TestPresso Connectivity page. For this take the following actions:

  1. 1)

    Click Add Device add button and choose AC Resistance device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • PORT – Port name (COMx)

    • BPS – Communication speed (bits per second)

    • ADDRESS – Device address

    • MID – Channel for mid pipe temperature sensor

    • AIR – Channel for outdoor air temperature sensor

    • DISCHARGE – Channel for discharge temperature sensor

    • SUCTION – Channel of suction type temperature

    • PIPE_IN – Channel for indoor pipe entrance temperature sensor

    • PIPE_OUT – Channel for indoor pipe exit temperature sensor

    • ROOM – Channel for indoor air temperature sensor

    • PRESS – Channel of press sensor

    • C-PIPE – Channel of exit pipe temperature sensor

    Connecting AirConditioner Resistance Device step1

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.6.Connect Power Supply

TestPresso allows you to manage the Power Supply device (and many other similar devices like Rhode&Shwarz, Anritsu, Willtek) during power consumtion related tests. To use Power Supply Device from TestPresso tools and scripts you need to register it at TestPresso Connectivity page. For this take the following actions:

  1. 1)

    Click Add Device add button and choose Power Supply device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • PORT – Port name (COMx)

    • BPS – Communication speed (bits per second)

    Connecting Power Supply Device step1

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.7.Connect Agilent Power Supply

TestPresso allows you to manage the Agilent Power Supply device (and many other similar devices like Rhode&Shwarz, Anritsu, Willtek) during power consumtion related tests. To use Agilent Power Supply Device from TestPresso tools and scripts you need to register it at TestPresso Connectivity page. For this take the following actions:

  1. 1)

    Click Add Device add button and choose Agilent Power Supply device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • AGILENT ADDRESS – Agilent resource name based on interface name, instrument address and name

    Connecting Agilent Power Supply step1

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.8.Connect Audio Manager Device

TestPresso supports audio tests with the Audio Manager plug-in. Audio Manager is an instrument that allows playing back and recording of a sound sample to/from the tested handset. To send the sound sample, Audio Manager uses the Line Out interface of the computer’s sound card. To record the result, the Line In interface is used.

TestPresso approach to audio tests involves 2 handsets that transmit the sample sound over the cellular network. One of the devices is the tested handset; the other one is auxiliary. If you want to test the audio output, you should connect the tested handset to Line In interface of PC sound card, if you want to test the input, then connect the tested handset to Line Out. Also, you will need USB connections for both handsets in order to initiate and answer calls.

Here are the basic steps for audio tests:

  1. 1)

    Connect target and auxiliary handsets according to the picture above;

  2. 2)

    Add Audio Manager device to the Connectiviy page.

    1. a.

      Click Add Device add button and choose Audio Manager device type.

    2. b.

      Specify the following parameters in the appeared dialog box:

      • TAG – Device tag

      • AUDIO MODE- AudioManager plugin mode (play, Record, Record&Play)

      • PLAY INTERFACE – OUT device for audio signal playback.

      • RECORD INTERFACE – IN device for audio signal recording.

      • LINE ENDING – Send new-line characters after transmitting each commandAudio Manager step1

    3. c.

      Press Save to finish. The device will be added to Connectivity page.

  3. 3)

    Create scenario project and add a scenario to it.

  4. 4)

    Map all devices to logical devices in the scenario. After mapping, the correspondent wizards will be started automatically to create necessary plug-in projects. .

  5. 5)

    Implement test logic so that the tested and auxiliary handsets establish a call, and then play back any audio sample on one device and record the resulting sound from the other device using functions for Audio Manager device.

  6. 6)

    Compare and analyze sample and resulting recordings.

To create tests for Audio Manager you need to install FFMPEG for Windows locally and add a path to FFMPEG.EXE to PATH system environment variable.
You can download FFMPEG here: http://ffmpeg.zeranoe.com/builds/

3.9.Connect AVN Android Device

Android AVN Device is needed for control of AudioVideoNavigation module of TestBench based on Android, the same way as it has been done for Android smartphones. You can register the device at TestPresso Connectivity page and access from TestPresso tools and scripts. Take the following actions:

  1. 1)

    Click Add Device add button and choose AVN Android Device device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • DEVICE IP ADDRESS – Remote IP Address of Android device

    • ETA CLIENT TCP PORT – Remote TCP port of ETA2 (for more detailed information see How to: Connect Android Device)

    • ADB PORT – Remote TCP port of Android device bridge

      Connect AVN Android Device stelp1

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.10.Connect COM Port

TestPresso supports customized communication with hardware or software systems via COM port. You can send and receive commands and data to the system thus expanding functionality of your scenarios. To start using the COM port of particular device:

  1. 1)

    Add port to the Connectivity page:

    1. a.

      Click Add Device add button and choose Serial Port device type.

    2. b.

      Specify the following parameters in the appeared dialog box:

      • TAG – Device tag

      • PORT- Port name (COMx).

      • SERIAL PORT PROPERTIES – Default or Advanced

      • BPS – Communication speed (bits per second).

      • TIMOOUT – Timeout in milliseconds. Negative value means no timeout (infinite)

      • LINE ENDING – Send new-line characters after transmitting each commandConnecting COM Port step1

    3. c.

      Press Save to finish. The device will be added to Connectivity page.

  2. 2)

    Map port on a logical device

Then use functions of the General COM Port plug-in in the scenario. To learn more about the plug-in functions, see API page.

3.11.Connect Device with SSH

TestPresso allows to use any device with SSH via SSHClientPlugin. To use such device from TestPresso tools and scripts you need to:

  1. 1)

    Install SSHClientPlugin in TestPresso Features tab of Test Node Manager Configuration page.

  2. 2)

    Register device at TestPresso Connectiviy page.

    1. a.

      Click Add Device add button and choose SSH ClientPlugin device type.

    2. b.

      Specify the following parameters in the appeared dialog box:

      • TAG – Device tag

      • HOST IP ADDRESS- Remote IP Address

      • SSH PORT – Remote SSH port

      • USER – SSH login

      • PASSWORD – SSH passwordConnecting Device with SSH

    3. c.

      Press Save to finish. The device will be added to Connectivity page.

3.12.Connect IVI CANat Device

TestPresso supports the work with IVI CANat Device.You can register the device at TestPresso Connectivity page and access from TestPresso tools and scripts. Take the following actions:

  1. 1)

    Click Add Device add button and choose IVI CANat device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • PORT – Port name (COMx)

    • BPS – Communication speed (bits per second)

    • ADB PORT – Remote TCP port of Android device bridgeConnect IVI CANat Device type1

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.13. Connect IVI DIO Device

IVI DIO Device is needed for control of IVI TestBench operation with low-level commands related to IVI module operation.You can register the device at TestPresso Connectivity page and access from TestPresso tools and scripts. Take the following actions:

  1. 1)

    Click Add Device add button and choose IVI DIO device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • CAN PROFILE – CAN Message format profile. CAN Profile is a specification of messages from the specific manufacturer of destination device through the CAN-bus.

    • PORT – Port name (COMx)

    • BPS – Communication speed (bits per second)
      Connecting IVI DIO Device step1

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.14.Connect IVI QEBenchIO Device

TestPresso supports the work with IVI QEBenchIO Device.You can register the device at TestPresso Connectivity page and access from TestPresso tools and scripts. Take the following actions:

  1. 1)

    Click Add Device add button and choose IVI QEBenchIO device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • PORT – Port name (COMx)

    • BPS – Communication speed (bits per second)Connecting IVI QEBenchIO Device step1

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.15.Connect IVI QE GCC Device

TestPresso supports the work with IVI QE GCC Device.You can register the device at TestPresso Connectivity page and access from TestPresso tools and scripts. Take the following actions:

  1. 1)

    Click Add Device add button and choose IVI QE GCC device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • PORT – Port name (COMx)Connecting IVI QE GCC Device step1

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.16.Connect IVI VW MIB Device

TestPresso supports the work with IVI VW MIB Device.You can register the device at TestPresso Connectivity page and access from TestPresso tools and scripts. Take the following actions:

  1. 1)

    Click Add Device add button and choose IVI VW MIB device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • PORT – Port name (COMx)

    • BPS – Communication speed (bits per second)Connect IVI VW MIB Device step1

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.17.Connect iOS Device

TestPresso on macOS allows connection of iPhone device.

You can register the iPhone device at TestPresso Connectivity page (‘Connectivity page’ in the on-line documentation) and access from TestPresso tools and scripts. There are 2 possible types of iOS Device connection:

  • iOS Device (WebDriverAgent)

  • iOS Device (real device)

Also you need to know the following information about iOS device registration:

  • Account registration in Xcode

  • Trust Developer App certificate

iOS Device (WebDriverAgent)

To add iPhone device manually launch WebDriverAgent on it (see manual configuration sections in document).Then follow the next steps:

  1. 1)

    Click Add Device add button and choose iOS Device (WebDriverAgent) device type in the appeared dialog box.

  2. 2)

    Set Device Tag.

  3. 3)

    Set WebDriverAgent URL.iOS Device (WebDriverAgent) step1

  4. 4)

    Press Save to finish. The device will be added to Connectivity page.

iOS Device (real device)

For the connection of iOS device take the following actions:

  1. 1)

    Click Add Device add button and choose iOS Device (real device) device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • DEVICE NAME – Real device name
      iOS Device (real device) step1

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

Account registration in Xcode

If during iOS device registration error below occurs then you need to register the specified account in Xcode.
Account registration in Xcode step1

For this follow the next steps:

  1. 1)

    Open Xcode and choose Xcode > Preferences…

  2. 2)

    Open Accounts tab and press + button to create new account

  3. 3)

    Select Apple ID account type and press ContinueFor this follow the next steps 1

  4. 4)

    Specify Apple ID and Password from the error text and click Sign In

  5. 5)

    New account will be registered and you can continue device registrationFor this follow the next steps 2

Trust Developer App certificate

If the error below occurs during iOS device registration, then you need to verify the Developer App certificate for your account that is trusted on your device.
Trust Developer App certificate step1

For this follow the next steps:

  1. 1)

    Open Settings on your device and navigate to General > Device Management

    For this follow the next steps 1
  2. 2)

    Select your Developer App certificate

    For this follow the next steps 2
  3. 3)

    Press Trust button

    For this follow the next steps 3

3.18.Connect Leopard Device

TestPresso supports the work with Leopard device.

You can register the Leopard device at TestPresso Connectivity page (‘Connectivity page’ in the on-line documentation) and access from TestPresso tools and scripts.Leopard device can be connected:

  • over Remote Socket

  • over SSH


Remote Socket

For the connection to Leopard device over Remote Socket take the following actions:

  1. 1)

    Click Add Device add button and choose Leopard Device (Remote socket) device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • IP ADDRESS – Remote IP Address of Leopard device

    • ETA CLIENT TCP PORT – Remote TCP port of ETA on Leopard device

      Remote Socket step1

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

SSH

For the connection to Leopard device over SSH take the following actions:

  1. 1)

    Click Add Device add button and choose Leopard Device (ssh) device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • IP ADDRESS – Remote IP Address of Leopard device

    • SSH PORT – Remote SSH port

    • USER – SSH login

    • PASSWORD – SSH password

      SSH step1
  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.19.Connect PC Device

PC Device is used for testing and profiling local or remote laptops. Currently, only MS Windows 7/8 operation systems are supported.You can register the device atTestPresso Connectivity page and access from TestPresso tools and scripts. Take the following actions:

  1. 1)

    Click Add Device add button and choose PC Device device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • PC IP ADDRESS – IP address of the PC.

      Connect PC Device type1

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

Before executing PC tests it is necessary to set up the computer. For this do the following actions:

  1. 1)

    Allow powershell scripts execution: run powershell.exe with administrator rights, enter Set-ExecutionPolicy RemoteSigned -Scope CurrentUser command.

  2. 2)

    Turn on wake events.

    • Move to Control Panel > Power Options and click on Change Plan Settings near the current chosen plan.

      Connecting PC Device step1
    • In the appeared dialog box choose Change advanced power settings.

    • In the appeared dialog box choose Sleep > Allow wake timers and set it as Enable.

      Connecting PC Device step2

  3. 3)

    Make sure that user is in administrators group. For this go to Control Panel > User Accounts > Manage User

    • Accounts.

      Connecting PC Device step3
    • Choose user by double-click and select Administrator in the appeared dialog. Press OK.

      Connecting PC Device step4

  4. 4)

    Set GPO for Boot Perfomance Diagnostics.

    • Run Edit Group Policy (from windows start menu), select Computer Configuration.

      Connecting PC Device step5
    • Choose Administrative templates > System > Troubleshooting and Diagnostics > Windows Boot Performance Diagnostics.

      Connecting PC Device step6
    • Double click on Configure scenario execution level, in the appeared window select Enabled and choose Detection and Troubleshooting only in Scenario Execution Level menu.

      Connecting PC Device step7
    • Click on OK button.

3.20.Connect QNX Device

TestPresso supports the work with QNX Device.You can register the device at TestPresso Connectivity page and access from TestPresso tools and scripts. Take the following actions:

  1. 1)

    Click Add Device add button and choose QNX Device device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • IP ADDRESS – Remote IP Address of QNX device

    • ETA CLIENT TCP PORT – Remote TCP port of ETA

    • TELNET CLIENT PORT – Remote Telnet port of QNX device

    • USER – Login

    • PASSWORD – Telnet password

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.21.Connect QXDM Device

TestPresso supports the work with Qualcomm Extended Diagnostic Monitor (QXDM) device. You can register the device at TestPresso Connectivity page and access from TestPresso tools and scripts. Take the following actions:

  1. 1)

    Click Add Device add button and choose QXDM Device device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • PORT – Port name (COMx)

      Connect QXDM Device step1

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.22.Connect SIMHub Device

SIMHub is a SIM switching device for programmed change of SIM cards in a tested device. It was developed in Russia R&D in March 2013.

SIMHub


Device specifications:

Type Description
Number of SIM card 4
Connection micro-USB cable

Drivers for the device availabe at http://172.26.40.14/sites/TestPresso/_preinstall/simswitcher.zip.To install drivers perform following steps:

  1. 1)

    Connect the device to a PC via micro usb cable

  2. 2)

    In appeared New Hardware Wizard choose NOT to connect to Windows Update, click Next

  3. 3)

    Choose “Install from a list or specific location”, click Next

  4. 4)

    Check “Include this location in the search” option, and provide path to extracted drivers. Click Next.

  5. 5)

    In Hardware Installation window click on “Continue Anyway” button

  6. 6)

    Complete installing drivers by clicking Finish button.

    Complete installing drivers by clicking Finish button.

To start using the device you need to connect it to a PC via micro-USB cable, install drivers, register the device in Connectivity page (COM port) and launch Events Monitor. In your test scenario via HeatMonitor plug-in you can call following functions:

Name of the function Description
GetActiveSIM Obtains current active SIM slot.
SetActiveSIM
Buttons and indicators:
Sets specified by index SIM slot as active.
Button Description
Reset Reboot the device.
Switch Switch active SIM card.
Prog Reboot and turn on firmware update regim.
Indicator Description
Ready Light Indicates active SIM card.
SIM
note image

SIM connector can be modified from SIM to Micro-SIM .


You can register the device at TestPresso Connectivity page and access from TestPresso tools and scripts. Take the following actions:

  1. 1)

    Click Add Device  and choose SIM Hub device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • PORT – Port name (COMx)

      device details

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.23.Connect USB Controller Device

USB Controller lets users perform power consumption tests automatically.

The hardware has an intelligent electronic circuit in order to avoid USB freeze during long time tests.

The hardware is controlled via Ethernet communication.

Connect USB Controller Device

Before connecting USB Controller to your PC set an automatical obtaining of IP address.

IP address.

Connect USB Controller to PC via USB cable. To send commands to controller connect it by internet with PC.

Remember that you can connect only one USB Controller at one time. You can register the device at TestPresso Connectivity page and access from TestPresso tools and scripts. Take the following actions:

  1. 1)

    Click Add Device add button and choose USB Controller device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • IP ADDRESS – USB Controller IP Address

      USB Controller IP Address
  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

Now you can use this device in your tests:
device in your tests

3.24.Connect USB Selector Device

USB Selector is used for switching different USB devices connection to IVI TestBench. You can register the device at TestPresso Connectivity page and access from TestPresso tools and scripts. Take the following actions:

  1. 1)

    Click Add Device add button and choose USB Selector device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • PORT – Port name (COMx)

    • BPS – Communication speed (bits per second)

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.25.Connect Vector Device

We can use Vector device for In-Vehicle Infotainment (IVI) systems testing. TestPresso supports communication with VN16xx. This device provides the best network interface for simple CAN bus analysis and for complex remaining bus simulations, diagnostic, calibration and flash programming tasks.

Connect Vector Device step1

In order to use Vector device user shall install Vector driver from here.You can register the device at TestPresso Connectivity page and access from TestPresso tools and scripts. Take the following actions:

  1. 1)

    Click Add Device add button and choose Vector Device (CAN) device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • TEST CONFIGURATION – Vector driver application name. If you register Vector device for the first time the dialog for channels setting will appear.

      Connecting Vector Device
    • NUMBER OF CHANNELS – Number of communication channels

    • CAN PROFILE – CAN Message format profile

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.26.Connect Video Manager

To use Video Manager Device from TestPresso tools and scripts you need to:

  1. 1)

    Download and install FFmpeg.

  2. 2)

    Add path to FFmpeg to PATH.

  3. 3)

    Install VideoManagerPlugin in LG TestPresso Features tab of Test Node Manager Configuration page.

  4. 4)

    Register device at TestPresso Connectivity page:

    1. a.

      Click Add Device add button and choose Video Manager device type in the appeared dialog box.

    2. b.

      Specify the following parameters in the appeared dialog box:

      • TAG – Device tag

      • PLAY INTERFACE – OUT device for video signal playback

      • RECORD INTERFACE – Device for recording video signal

        Connect Video Manager
    3. c.

      Press Save to finish. The device will be added to Connectivity page.

3.27.Connect VISA Instrument Device

You can connect the following VISA Instruments:

  • Agilent

  • Anritsu

  • Bustec

  • Keysight Technologies

  • Kikusui

  • National Instruments

  • Rohde & Schwarz

  • Tektronix

To use such devices from TestPresso tools and scripts you need to register them at TestPresso Connectivity page. Take the following actions:

  1. 1)

    Click Add Device add button and choose Visa Instrument device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • GPIB channel – GPIB channel number.

    • VISA ADDRESS – VISA resource name based on interface name, instrument address and name (see Measure Instruments Address)

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.28.Connect VuPower Device

VuPower Device is used for power management of the devices (power supply and power consumption measurement). You can register the device at TestPresso Connectivity page and access from TestPresso tools and scripts. Take the following actions:

  1. 1)

    Click Add Device add button choose VuPower device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • PORT – Port name (COMx)

      Connect VuPower Device

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.29.Connect WebEngine Device

WebEngine device type is intended for management of WebEngine-based test units testing (Web-applications in browsers: Chrome, Firefox, Opera or Internet Explorer) on PC.

This connection type assumes a proxy-service with ETA protocol on PC for implementation of a standard TestPresso test protocol and processing requests to tested units having no Test Agent inside (browser, emulator, ‘black-box’ device). It may be the gate to non-intrusive tested device control. In such a case connection to a physical device may be absent whereas local interface to some software or hardware unit is maintained through the proxy.

To use WebEngine device from TestPresso tools and scripts you need to install driver for a target browser and then register device at TestPresso Connectivity page.

Drivers for browsers are represented in the table below.

Browser Driver
Chrome ChromeDriver
Firefox FirefoxDriver
Internet Explorer InternetExplorerDriver
Opera OperaDriver

There are 2 available connection types to WebEngine devices:

  • browser

  • chrome remote


Browser

Take the following actions to connect WebEngine device:

  1. 1)

    Click Add Device add button and choose WebEngine (browser) device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • BROWSER – Browser type: Chrome, Firefox, Opera, Internet Explorer

      Browser type1

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

Chrome Remote

Take the following actions to connect WebEngine device:

  1. 1)

    Click Add Device add button and choose WebEngine (chrome_remote) device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • ADDRESS – Remote Address of Chrome WebInspector

      Chrome Remote type1

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.30.Connect Digital Multimeter Device

TestPresso supports the work with Digital Multimeter Device. You can register the device at TestPresso Connectivity page and access from TestPresso tools and scripts. Take the following actions:

  1. 1)

    Click Add Device add button and choose Digital Multimeter device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • PORT – Port name (COMx)

    • BPS – Communication speed (bits per second)

      Connect Digital Multimeter Device

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.31.Connect Automotive Electronic Simulator Device

TestPresso supports the work with Automotive Electronic Simulator Device. You can register the device at TestPresso Connectivity page and access from TestPresso tools and scripts. Take the following actions:

  1. 1)

    Click Add Device add button and choose Automotive Electronic Simulator device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • PORT – Port name (COMx)

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.32.Connect LIN Device

TestPresso supports the work with LIN Device. You can register the device at TestPresso Connectivity page and access from TestPresso tools and scripts. Take the following actions:

  1. 1)

    Click Add Device add button choose LIN DEVICE (VECTOR) device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • CHANNEL CONFIGURATION – Pre-defined application name for test

    • NUMBER OF CHANNELS – Number of communication channels

    • LIN VERSION PROTOCOL – LIN version protocol

    • CHANNEL 1 BAUDRATE – XL API is guaranteed for 200 … 20.000

    • CHANNEL 1 – LIN DB FILES – Comma-separated list of LIN DB (LDF) file names. If given as a relative path, it will be found based on the test project Resources folder.

      Connect LIN Device
  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.33.Connect DeepThinQ Plugin Device

TestPresso supports the work with DeepThinQPlugin Device. You can register the device at TestPresso Connectivity page and access from TestPresso tools and scripts. Take the following actions:

  1. 1)

    Click Add Device add button choose DeepThinQPlugin device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • HOST IP ADDRESS – Remote IP Address

    • SSH PORT – Remote SSH Port

    • USER- SSH Login Account

    • PASSWORD – SSH Password

      Connect DeepThinQ Plugin Device

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.34.Connect DLToolkitSite Device

TestPresso supports the work with DLToolkitSite Device. You can register the device at TestPresso Connectivity page and access from TestPresso tools and scripts. Take the following actions:


Browser

Take the following actions to connect DLToolKitSite (browser) device:

  1. 1)

    Click Add Device add button and choose DLToolKitSite (browser) device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • BROWSER – Browser type: Chrome, Firefox, Opera, Internet Explorer

      Browser

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

Chrome Remote

Take the following actions to connect DLToolKitSite device:

  1. 1)

    Click Add Device add button and choose DLToolkitSite (chrome_remote) device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • ADDRESS – Remote Address of Chrome WebInspector

      Chrome Remote

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.35.Connect Battery Pack Simulator Device

TestPresso supports the work with Battery Pack Simulator Device. You can register the device at TestPresso Connectivity page and access from TestPresso tools and scripts. Take the following actions:

  1. 1)

    Click Add Device add buttonand choose Battery Pack Simulator device type in the appeared dialog box.

  2. 2)

    Specify the following parameters in the appeared dialog box:

    • TAG – Device tag

    • PORT – Port name (COMx)

    • NUMBER OF RACK – Number of Battery Pack Simulator Rack (Master, Slave, …)

      Connect Battery Pack Simulator Device

  3. 3)

    Press Save to finish. The device will be added to Connectivity page.

3.36.Connect Multiple Devices

TestPresso supports multiple devices in a scenario. You should declare the number of devices in Mapper and then address each device as DEV1, DEV2, etc.


Physical Connection

It is recommended that you do not connect more than 8 devices to a computer simultaneously. As most of devices are connected with USB cable, you can use a USB hub. Upon connection Windows assigns unique COM ports to all devices. After that you need to add devices to Connectivity page.


Android Devices

To connect multiple Android devices, you need to set unique TCP ports for each device:

  • Set unique TCP port numbers for ETA client for each device

  • Then, when adding device to the Connectivity page, specify these port numbers

3.37.Controlling Device

During test execution several critical events may occur, which TestPresso has to detect and accurately handle:

  • Tested device may lock-up and stop responding on the test tool commands

  • USB or serial port device driver (on MS Windows system) may loose the device. Device can be physically disconnected


TestPresso provides the following mechanism of the disconnection detection.

  • Operation with the tested devices is performed via TestPresso plug-ins. Every plug-in function receives a response from the device on the sent command and returns error code which can be analyzed in a test scenario code.

  • Besides this standard behavior, plug-in functions check two events during communication with the tested device: a sent command timeout (response has not been received within the specified time) or communication channel exception.


If one of these events occurs, TestPresso automatically sends a so-called “ping” command to the device. If the positive response is received, test execution continues. If not, a special mechanism (recovery – see recovery scenarios) of an incorrect test completion is started. TestPresso indicates the fact of device disconnection in a test log.

The similar checkup can be performed with custom code in the scenario. Use special device plug-in functions. To find details for a particular device, please refer to the API document.

3.38.Measure Instruments Address

The information in this section is valid for Agilent and any other VISA compatible devices. Information has been quoted from VISA site.

Use the VISA resource name control to specify the resource to which a VISA session will be opened and to maintain the session and class. A VISA session is a unique logical identifier used by VISA to communicate with a resource. The VISA session is maintained by the VISA resource name control and is not seen by the user. VISA resource name out is a copy of the resource name that is passed out of the VISA functions. By passing the resource name in and out of functions and VIs, you can simplify dataflow programming by chaining functions and VIs together. This is similar to the file refnum outputs used by the File I/O functions.

The following table shows the syntax for the VISA resource name string. Optional parameters are shown in square brackets ([ ]).

Interface Syntax Syntax
VXI INSTR VXI[board]::VXI logical address[::INSTR] Instr; VXI/GPIB- VXI MBD Instr; VXI/GPIB- VXI/VME RBD Instr
VXI MEMACC VXI[board]::MEMACC VXI/GPIB- VXI/VME MemAcc
VXI BACKPLANE VXI[board][::VXI logical address]::BACKPLANE VXI/GPIB- VXI/VME MemAcc
VXI SERVANT VXI[board]::SERVANT VXI Servant
GPIB-VXI INSTR GPIB-VXI[board]::VXI logical address[::INSTR] VXI/GPIB-VXI MBD Instr; VXI/GPIB- VXI/VME RBD Instr
GPIB-VXI MEMACC GPIB-VXI[board]::MEMACC VXI/GPIB- VXI/VME MemAcc
GPIB-VXI BACKPLANE GPIB-VXI[board][::VXI logical address]::BACKPLANE VXI/GPIB-VXI Backplane
GPIB INSTR GPIB[board]::primary address[::GPIB secondary address][::INSTR] GPIB Instr
GPIB INTFC GPIB[board]::INTFC GPIB BoardInterface
GPIB SERVANT GPIB[board]::SERVANT N/A
PXI INSTR PXI[bus]::device[::function][::INSTR] PXI Instr
PXI INSTR PXI[interface]::[bus-]device[.function][::INSTR] PXI Instr
PXI MEMACC PXI[interface]::MEMACC PXI MemAcc
Serial INSTR ASRL[board][::INSTR] Serial Instr
TCPIP INSTR TCPIP[board]::host address[::LAN device name][::INSTR] TCP/IP Instr
TCPIP SOCKET TCPIP[board]::host address::port::SOCKET TCP/IP Socket
USB INSTR USB[board]::manufacturer ID::model code::serial number[::USB interface number][::INSTR] USB Instr
USB RAW USB[board]::manufacturer ID::model code::serial number[::USB interface number]::RAW USB Raw

3.39.Overcome Device Disconnection in Test

This section includes an information about the following failures:

  • Device Connection Failures

  • Command Execution Failures


Device Connection Failures

There are possible failures during the device connection process. In case of connection failures the reconnection mechanism is started. The diagram below shows the algorithm of this mechanism:

Device Connection Failures

The reconnection approach is different for different plug-ins. The list of plug-ins which support this mechanism and the corresponding reconnection approaches are represented in the table below.

Plug-in Connection type Reconnection approach
AVNAndroidPlugin remote socket connection
  1. 1. restart adb
  2. 2. perform adb connect
  3. 3. start eta2 service
  4. 4. reconnect to socket
Eta2ClientPlugin local socket connection
  1. 1. restart adb
  2. 2. start eta2 service
  3. 3. reestablish port forwarding
  4. 4. reconnect to socket
local socket connection in on-device mode just reconnect
remote socket connection
  1. 1. restart adb
  2. 2. perform adb connect
  3. 3. start eta2 service
  4. 4. reconnect to socket
LeopardClientPlugin ssh connection
  1. 1. reestablish ssh connect
  2. 2. reestablish port forwarding
  3. 3. reconnect to socket
remote socket connection just reconnect
WTAClientPlugin ssh connection
  1. 1. reestablish ssh connect
  2. 2. reestablish port forwarding
  3. 3. reconnect to socket
remote socket connection just reconnect
WebOSMobileClientPlugin Novacom connection
  1. 1. reestablish port forwarding
  2. 2. reconnect to socket

During connecting Android devices to TestPresso over ADB service (Socket connection type) there is a possible connection stability issue caused by ADB instability against a long-time and stress operations over simulated IP connection. As a result, TestPresso scenario may fail with Device Disconnection error. Now, TestPresso scenario execution mechanism supports handling of sudden devices disconnection and auto-reconnecting routine launch. This routine tries to recover the connection by using the following steps:

  • Repeating the connection few times

  • USB drivers reset in case of TestPresso connection failure

USB drivers reset causes the reset of all ADB based connections opened on the local PC and, consequently, the occurrence of device connection problem at all running TestPresso tests.

This problem is solved the same auto-recovering procedure explained above.

If the connection issue cannot be recovered even by USB driver reset it should be solved only manually. Below diagram shows the connection auto-recovery process.

connection auto-recovery process
note image

With DEV initialization reconnections counter is set to 2.

Function Description
IsReconnectionEnabled Get reconnection state (enabled/disabled).
SetReconnectionEnabled Enable/disable reconnection and request resending if communication fails.

4.ADVANCED USAGE

This section describes main features and basic workflow in TestPresso Workstation.

4.1.Layered Architecture

TestPresso Workstation is a complex multi-component system. The figure below illustrates TestPresso Workstation tools (e.g. TestPresso Workstation), integrated components (e.g. ETA, Mapper), logical units (e.g. Scenario, Device Model, Tested Application), and their places in the system (scheme is for Enterprise build).

Here are brief descriptions for the components:

TestPresso Workstation – a computer where TestPresso Workstation operates.

Web IDE – TestPresso Workstation Integration is based on this component.

Workspace – a main storage for TestPresso Workstation data.

Scenario Project – a container for test scenarios and recovery scenarios.

Scenario – TestPresso Workstation test implemented as a Python file.

Plug-in Project – a container for device control functions and device models.

Device Model – a container for properties of particular device.

Mapper – TestPresso Workstation component that allows setting correspondence between logical devices and physical device or plug-in project.

Debug log – displays log messages from executed scenarios.

IVI Assistant – tool that provides easy development of tests for IVI devices.

TestPresso Workstation Launcher – a local application (service) for configuring TestPresso Workstation launch, stop, diangostics.

TestPresso Workstation Manager – service and UI above for test tasks management. Includes Connectivity Page, Task Manager, UI Inspector, Test Packages Management, Configuration.

Dashboard of Test Jobs – a tool that allows you to see a big group of executed tests from different TestPresso Workstation at one time, the status of each test in this group and its result.

Android device – Tested Android device.

ETA2 Service – Embedded test agent – the component that executes TestPresso Workstation commands on the Android device.

Test Runner – a tool for execution of tests inside a device.

4.1.1.TestPresso Workstation Launcher

TestPresso Workstation Launcher is a local application (service) for configuring TestPresso Workstation launch, stop, diangostics.

TestPresso Workstation Launcher is started after TestPresso Workstation installation.

If necessary, you can start it manually via Windows Start menu by selecting it in the following order:

  • All Programs > TestPresso Workstation > TestPresso Workstation Launcher

    When started, you can find TestPresso Workstation Launcher in the tray.To open Launcher menu right-click on its icon.

    TestPresso Workstation Launcher step1
    TestPresso Workstation Launcher step2
  • Start TestPresso Workstation – start TestPresso Workstation in the default execution Mode. Menu item is available only when TestPresso Workstation is stopped.

  • Start TestPresso Workstation As… – start TestPresso Workstation in the chosen Mode (Master or Slave). Menu item is available only when TestPresso Workstation is stopped.

  • Stop TestPresso Workstation – stop TestPresso Workstation. Menu item is available only when TestPresso Workstation is started.

  • Open TestPresso Workstation Manager – open TestPresso Workstation Manager in browser. Menu item is available only when TestPresso Workstation is started.

  • Activate/Re-activate TPWS– TestPresso Workstation activation.

  • Settings – TestPresso Workstation Launcher Settings:

    • Start TestPresso Workstation on Launcher startup – check it if you want Test Node to be started on Launcher start.

    • Open TestPresso Workstation Manager web page on TestPresso Workstation startup – check it if you want TestPresso Workstation Manager to be opened on Test Node Start.

    • Stop TestPresso Workstation on Launcher exit – check it if you want TestPresso Workstation to be stopped on Launcher exit.

    • Default TestPresso Workstation execution mode – check the default mode for TestPresso Workstation execution: master or slave.

    • Master Node IP Address and Port – specify TestPresso Workstation IP Address and Port.

      settings

  • About – information about TestPresso Workstation and Launcher versions, copyright.

  • Exit – stop the service

4.1.2.TestPresso Workstation Manager

TestPresso Workstation is a test service and UI above for local test process management by using global TestPresso Workstation test resources (test repositories, Distribution Service, Tests Dashboard).

To start TestPresso Workstation you need to run TestPresso Workstation Launcher via Windows Start menu by selecting:

  • All Programs > TestPresso Workstation > TestPresso Workstation Launcher
    When started, you can find TestPresso Workstation Launcher in the tray. Then you can open TestPresso Workstation Manager by selecting:

  • All Programs > TestPresso Workstation > TestPresso Workstation Manager
    Or from Launcher menu:

    TestPresso Workstation Manager

There are the following components of TestPresso Workstation:

  • Connectivity

  • Task Manager

  • UI Inspector

  • Test Packages Management

  • Test Dashboard

  • Web IDE

  • Configuration

    TestPresso Workstation:

Pages of Test Packages Management have the following view:
Management have the following view

To change Test Address click on the address in the up right corner. In the appeared TEST ADDRESS Panel choose address from the list or add a new one by entering the address to the corresponding field and pressing ADD button.
Management have the following view

In Devices Panel there are the list of all registered devices.

Here you can search device by filtering device list using the following targets: device type, device port, device tag, device model.

Also you can open UI Inspector for device or add task for it by clicking on corresponding buttons. These buttons are enabled only if the device is online and not busy.

Management have the following view

4.1.2.1.Connectivity Panel

Connectivity Page represents physical devices that can be used in Task and Test, as well as empty ports. The devices and ports are added to the panel manually; their configuration is saved for further use.

Connectivity Page is available in the Connectivity page of TestPresso Workstation Manager.

This page contains the list of registered devices. You can group this list by SDK Version, Port, Type or Region.

You can search for the necessary device in the right of Connectivity Window by input device name to the Search field.

To register new device in Connectivity Page follow the next steps:

  1. 1)

    Click Add Device add button button. The Device Details dialog box appears.

  2. 2)

    Select the type of the connected device from the list of the supported types. For more information, see Devices Overview. The rest of the fields will be formed depending on the selected device type.

  3. 3)

    Click Save to finish. The device will be added to the Connectivity Page.

See more detailed information about connection devices of different types in Device Management Details.

You can search device by filtering device list using the search field with the following targets: device type, device port, device tag, device model.

To open UI Inspector for device click on the corresponding  button in the Action column of device list.

To open Device Shell click on the corresponding  button in the Action column of device list. Button is enabled only if the device is online and not busy.

To add task for device click on the corresponding  button in the Action column of device list. Button is enabled only if the device is online and not busy.

To delete device press the corresponding button  in the Action column of device list.

If you click on device row in the list window with device configuration from ETA perspective will be opened.

In Device Shell tab you can send console commands.

4.1.2.2.Device Shell

Sending console commands is available in DEVICE SHELL tab of device details window.

Commands can be sent to registered* on Test Node devices having Shell capabilities: like Android (ADB commands) and webOS (linux shell).

Enter the command to specified field and send it using Enter key. You will see output of the command in the Output field.

You can Clear Output, Copy Output to clipboard or Export Output to file using the corresponding buttons under the Output field. Buttons are disabled until you sent command to the shell.

Device Shell
note image

Devices should be registered in TestPresso Workstation.

4.1.2.3.Task Manager

The information about launched tasks is available in the TestPresso Workstation Task Manager page of TestPresso Workstation Manager.

Key features of Task Manager are:

  • New task registration

  • Tasks progress monitoring

  • Result logs

  • Comments for each task

  • Task filter with many options

  • Export tasks to Excel

Task Manager

Tasks Filter

Tasks Filter can help you to find necessary task. Filter contains the following fields:

  • Task ID

  • Device

  • Package Name

  • Scenario Name

  • Package State

    • Stopped

    • Stopping

    • Running

    • Starting

    • Paused

    • Pausing

    • Finished

    • Error

    • Waiting In Queue

    • Scheduled

  • Package Result:

    • In Progress

    • Success

    • Fail

    • Skip

    • Interrupt

    • Error

    • Device Connection Lost

  • Task Worker

  • TestPresso Workstation Version

  • Created date

  • Started date*

  • Finished date*

note image

* Filter Started date – Finished date is set on range of values. If Started date = Finished date tasks of this day only will be chosen.

4.1.2.4.UI Inspector

UI Inspector is a tool that allows you visually analyzing UI layouts of applications launched on a device side.

Any ETA-supplied devices where GetUI method has been implemented are supported (to get more information about methods see <a herf=”https://testpresso.swsolutions.lge.com/api”>TestPresso API</a> Page).

UI Inspector provides:

  • Full control of device layout

  • Components tree

  • UI target info

  • Screenshots

  • Applications list

UI Inspector is available in UI Inspector page of TestPresso Workstation Manager.

There are 3 tabs in this page:

  • UI Layout

  • Applications

  • Code Generator

Also UI Inspector supports the work with devices which have second screen.


Display window

Display window refreshes:

  • Automatically every time when top level activity on the device is changed (Activity watch trigger in UI Layout tab should be On).
    There are the following triggers which produce automatic UI refresh in UI Inspector:

    • activity – title of current activity was changed

    • topPackage – foreground application package name was changed

    • currentTab – current tab number was changed

    • menu – showed or hidden

    • statusBar – showed or hidden

    • orientation – screen rotation angle was changed

  • Manually via via button button.

  • There are 2 modes of captured screen which are regulated by Control trigger.
    If trigger is On all controls on the captured screen are active and are available for user actions simulation. If trigger is Off you can see UI Layout structure of the captured screen.
    Control trigger


UI Layout

UI Layout tab is intended for device’s UI structure analysis.

In this tab you can see Control Tree – sorted list of UI controls presented on the current screen. You can select control in this tree or on the captured screen, properties of selected control will be in the Info table.

Use the following triggers to set the UI Layout.

avwSubWindow

The trigger allows you to turn on/off showing SubWindow items.

! SubWindow content is obtained from ETA and the option will be applied only after changing activity on device or manual REFRESH screen in UI Inspector.

ByType

The trigger allows you to turn on/off grouping UI controls by Type and listing with descending the index.

Activity watch

The trigger allows you to enable/disable activity watcher feature. If this feature is On UI Inspector regulary sends commands to device for getting the current Activity state. If the feature is Off UI Inspector doesn’t send commands and the user should recapture screen manually.

Screenshot

The trigger allows you to make screenshot of device screen: switch it On and click on camera button to make screen and save it to your PC.

Screenshot

You can hide some controls: open menu Select elements to hide at the bottom of device screen and check control types to hide.

Select elements to hide

note image

avwSubWindow and avwObject controls are hidden by default for Android and iOS devices.

Control Properties

Index

Index is used to distinguish UI controls of the same type.

Type

Object type specified by UI control class. Standard class can be used (ex. android.widget.EditText) along with Control Class Alias (see TestPresso Workstation Functions Reference)

Native Type

Android UI control class name (refer to Android SDK API reference)

Frame (x, y, w, h)

Coordinates of the UI control.

Center (x, y)

Center coordinates of the UI control.

Name

Name of the UI control (not always provided).

Text

Text message of the UI control.

Hint

Popup hint.

Description

Description of the UI control

Applications

In Applications tab there is a list of all applications installed on device.

You can find some application in this list using Filter field.

If you want to run application on devices press camera button near the application name:

Applications

Code Generator

Code Generator tab helps in simulation of user actions to the device and adding navigation commands to the test scenario. These commands appear in the Generated Code Panel if trigger Generate code is On.

You can select all actions or some of them and copy selected to Clipboard using using button button.

Code Generator

Buttons

You can use hardware buttons which are available by pressing the following button at the bottom of device screen:

Buttons

Volume Down Volume Down. Emulates pressing “Volume Down” button on the device.

Volume Up Volume Up. Emulates pressing “Volume Up” button on the device.

Menu Button Menu Button. Emulates pressing “Menu” button on the device.

Back Button Back Button. Emulates pressing “Back” button on the device.

Power Button Power Button. Emulates pressing “Power” button on the device.

Unlock Unlock Device. Emulates acting “Unlock” motion on the device.


Second Screen support

UI Inspector supports work with devices which have second screen.

In this case UI Layout tab contains one more UI tree for the second screen.

Second Screen support

4.1.2.5.Test Packages Management

TestPresso Workstation Test Packages Management page allows you to:

  • Manage local test packages

  • Upload packages from remote repositories

  • Upload packages from local files

In this page there is the list of uploaded packages which can be run.

In Scenarios column you can see the number of scenarios in package. By clicking on this number the list with scenarios names appears.

To create task with package press the corresponding button button.

est Packages Management

To remove package press the corresponding bug button bugtton.

To load script from local file click on Local Package button and choose necessary script.

To load script from repository click Remote Repositories button, choose repository and script in it and click on click button button.

remote

4.1.2.6.Configuration

TestPresso Workstation Node Configuration page of TestPresso Workstation Manager contains 4 tabs where you can configure your Node by managing:

  • Settings (changing internal Test Node settings and services operation policy)

  • Testpresso Workstation Features (local TestPresso Workstation features installation and update)

  • Services (serving the Node operation)

  • Workers (workers management)

  • License (information about license)

Settings

In this tab you can change internal TestPresso Workstation settings and services operation policy.

Settings

Here you can set:

  • Supported languages – TestPresso Workstation language

  • Device Ping Logging Subprocess – Toggles logging of a device ping operations that may help to identify device connection issues. But switched on logging may reduce the Node performance and affect test results.

  • Test Dashboard notification URLs – TestPresso Workstation Test Dashboard servers to be notified about tasks run

To Add URL presspress buttonbutton:

settings
  1. 1)

    Tasks Watcher – Watches for died task processes among running tasks and closes died tasks with Error state and “Task process was unexpectedly died” message in logs.

  2. 2)

    Android Environment Location – Path to ADB (Android Debug Bridge) toolkit.

  3. 3)

    Test packages repository URLs – Choose test packages repository service.

TestPresso Workstation Features

This tab is intended for install and update TestPresso Workstation features (tools, applications and plug-ins) locally or from TestPresso Workstation Distribution Service installed on TestPresso Server.

Tab contains the list of TestPresso Workstation features which can be grouped by Available/Installed.

TestPresso Workstation Features

You can see the feature size, the versions of features which have been already installed and OS list where feature is supported.

Also there are the following buttons for features:

  • Download – download feature locally and install it manually

  • Install – install feature from Server

  • Installed – feature is already installed

  • Delete – delete feature

  • No button – feature is not supported on current OS

To install new feature from Server or to update out-of-date one click Install in the corresponding row.

Confirm installation by clicking Install in the appeared window.

note image

List of plug-ins is obtained only having a licensed TestPresso Workstation and a connection to a server.


Adding new feature from local File System

To add new feature from local File System follow the next steps:

  1. 1)

    Click Add Plugin button

    Add Plugin
  2. 2)

    Choose Plug-in Container (zip archive)* in browser and click Open

  3. 3)

    Plug-in will be added to TestPresso Workstation (package is extracted to specified folder)

note image

*Plug-in Container can be downloaded from TestPresso Web Center (Resources) or obtained from TestPresso Workstation Deployment team.

note image

During the plug-in addition it will overwrite the installed one.


Services

In this tab you can:

  • Manual Start/Stop services

  • Control services status

Tab contains the list of Node Services, their status and id. You can start/stop process by clicking on start button / stop button buttons in the corresponding row.

Control services status

Workers

In this tab there is a list of workers. You can add new worker in the bottom of window.

Workers

License

In this tab there is an information about license.

License

4.1.3.Test IDE

The Web IDE is integrated into TestPresso.

After TestPresso is installed, you can find and run the Web IDE icon as shown below.

Test IDE

note image

ATS 7 uses Eclipse as IDE.

4.1.3.1.Project Explorer

Project Explorer is a standard component of Web IDE and one of the central components of TestPresso. When you work with TestPresso workspace Project Explorer displays TestPresso Project Tree with TestPresso items:

  • Plug-in projects

  • Device models

  • Scenario projects

  • Scenarios

  • Recovery scenarios

  • Custom projects

Project Explorer

4.1.3.2.Web IDE Mapper

In the TestPresso Perspective of Web IDE Mapper is on the up right corner of the window.

When you open scenario in Web IDE as a part of TestPresso Workspace, Mapper detects the number of devices and initializes the corresponding number of selectors.

Web IDE Mapper

Each device selector in the Mapper contains the physical devices added to the Connectivity and Plug-in Projects from your solution available for mapping. The representation format for physical devices is ([DeviceName]: [port]), for example, (LG-F460L: 4444).

4.1.3.3.Logs View

Test IDE (Web IDE) provides possibility of real-time logs view during a test execution. The following log types can be viewed:

  • TP Log Log – detailed test execution log of all system functions and added by a user trace messages (with System.Debug() function)

  • log – System log, stdout log

  • error – error log. TBD

Logs View

Debug log is saved in the current workspace folder <ScenarioProjectName>\output\logs.

4.1.4.Test Runner

TestPresso Test Runner is a tool that allows executing test packages and view test execution history on device.

TestPresso Test Runner provides the following features:

  • On-device tests management

  • Devices pairing for multi-target tests

  • TestPresso test logs viewer

  • Test packages import from Repository

  • Test packages auto-detection on SD card

  • Test logs export to SD card

Test Runner

Test Runner installation

You can install Test Runner to device in two ways.

  • In a command-line by using adb install function. You can get Test Runner APK by request to tp-support@lge.com or find in the local folder of installed TestPresso in subfolder Extern.

  • Via TestPresso Connectivity Page


Test packages upload

There are the following possible ways of uploading test packages to Test Runner:

  • from SD card

  • from repository


Test Execution

Test Runner can execute test packages only of TestPresso.

Test Execution

Analyze test results

Analyze test results

4.1.5.Embedded Test Agent (ETA)

Embedded Test Agent (ETA) is a test server located on the target device. It provides interface for testing device from PC by means of TestPresso.

There are the following versions of ETA:

  • ETA for Android Devices

  • ETA for webOS Devices(WTA)

4.1.5.1.ETA for Android Devices

ETA v2 is implemented as system application that you can install on LG and 3rd-party Android devices. The installation or update is performed automatically when you add your Android device to TestPresso Connectivity.

The set of ETA v2 functions consists of 9 parts:

  • Analysis – different types of logging and crashes analysis

  • Applications – functions for mobile applications control

  • General functions – device identification, user actions simulation and device status monitoring

  • Profiling – different kinds of measurements for Android components

  • Telephony functions – call and SMS (actual and virtual) management

  • UI control functions – Android applications UI control

  • Web functions – Android browser content control

  • PRI – Product Release Instructions data management IME – Input Method Editor analysis and control

The detailed function specification is available in LG TestPresso API page

note image

ETA v1 is not supported in TestPresso.

4.1.5.2.ETA for webOS Devices (WTA)

WebOS Device communicates with TestPresso using webOS Test Agent (WTA), which is implemented as a system application on the device.

WTA functions

Function Short description
AppInfo

Retrieves information about applications installed on device

AppManagement

Manages applications on device

FileTransfer

Files uploading to and downloading from the tested device

GetUI

Obtains the current UI layout structure from the device

InvokeJavaScript

Calls Java Script

LogTrace

Collects information from log trace (log content)

MeasureValuesCmd

Command for fast monitoring of changed device status values

ProcessInfo

Requests all or a selected process status from the tested device

RunApplication

Launches an installed application on a device

ScreenCapture

Returns a currently visible screen snapshot

ShellCmd

Executes Shell commands on device side

UIAction

User Action simulation

UserInput

User Input simulation

WaitForText

Waits for the specified text appearing on the current screen during the specified time

4.1.5.2.1.ETA for webOS TV

There are the following ways of installation WTA on webOS TV:

  1. 1)

    Manually by the following steps:

    • Download wta.sh script to device

    • Install WTA service

    • Restart WebAppMgr and run WTA service

  2. 2)

    Via TestPresso Connectivity Page
    WTA is automatically installed in the process of adding webOS TV to Connectivity Page.

  3. 3)

    Via TestPresso Provision Service
    To install WTA via TestPresso Provision Service do the following actions:

    1. A.

      Create activation file on TV using the following command: # touch /var/luna/preferences/wta_enabled

    2. B.

      You can specify the following parameters in activation file:

      • CONNECTIVITY_ADDRESS = 123.123.123.123:5691 – address of Connectivity Page for automatic registration

      • SSH_ADDRESS = 123.123.123.123:22 – ssh address of TV (this address will used for registration)

      • WTA_ADDRESS = 123.123.123.123:4445 – remote socket address of TV (this address will used for registration)

    3. C.

      Reboot TV.

    4. D.

      If WTA is not installed Provision Service connects to Provision Server on 9001 port. Server gets the command to install and start WTA.
      Othervise WTA is started.

    5. E.

      If the activation file exists Provision Service connects to Provision Server on 9000 port. Using configurations on this file Provision Server registrates TV in Connectivity Page.
      SSH_ADDRESS has a higher priority than WTA_ADDRESS. If no ssh and wta addresses are specified, provision connection will be redirected (reverse connection) and port will be opened at provision server.

    6. *

      If WTA is already installed on TV you can activate it via Connectivity Page by the following actions.

      • Delete activation file from TV.

      • Create webOS Device (ssh) connection in Connectivity Page and specify parameters in the Custom Properties list.

  4. 4)

    From USB flash drive
    To install WTA from USB flash drive do the following actions:

    1. A.

      Download wta_usb.sh script from http://hewta.lge.com:8082/cgi-bin/wta_usb.sh to the flash drive root. The script will download all necessary files from net during installation process. But if TV has no connection with net download the archives for offline installation using the following command:
      #./wta_usb.sh preload
      This command will download the following archives to USB flash drive:

      • com.lge.service.wta_1.4.0.tar.gz – for offline WTA installation

      • ondevice1.2.tar.gz – for offline packages installation

    2. B.

      Put flash drive into TV.

    3. C.

      Reboot TV. In the up right corner of TV you will see the notes about installation process.

      1. A.

        WTA installation.
        Online:

        From USB flash drive type1

        Offline:

        From USB flash drive type2
      2. B.

        On-device packages installation.
        Online:

        From USB flash drive type3

        Offline:

        From USB flash drive type4
      3. C.

        WTA is started.

        From USB flash drive type5
      4. D.

        Offline version of Test Manager application will appear in launcher.

        From USB flash drive type6

4.2.Advanced Features

Besides general workflow, you can use advanced features of TestPresso Workstation:

4.2.1.Custom TestPresso Plug-in Modules

TestPresso Workstation allows adding custom functions to plug-in projects.

note image

These functions will be available in your test scenario if you map the logical device on the corresponding plugin project, or on a physical device that belongs to this project.

You may need to create a custom function for some procedures that are repeated in your tests. The logic of a custom function may include any standard Python constructions and plug-in functions for the related plug-in.

You can write your custom functions in the PluginModule.py file of the Library project. The functions should be added as methods of ClientPlugin class and should have self as a first parameter. Here is an example of adding custom function to this class:

# -*- coding: utf-8 -*- 

from ATS.Plugins.WebEnginePlugin.WebEngineClientPlugin import WebEngineClientPlugin

class ClientPlugin(WebEngineClientPlugin):
    def __init__(self, client, index, context):
        WebEngineClientPlugin.__init__(self, client, index, context) 

    def CommAdd(self, a, b):
        return a + b
    
Custom Testpresso Plug-in Modules type1

Functions can be used in tests in scenario projects, where this plug-in project is referenced .

The example of calling the CommAdd function is below:

DEV1.CommAdd(2, 3)

Custom Testpresso Plug-in Modules type2

4.2.2.Custom Python Modules

Sometimes custom Python code should be used in TestPresso Workstation tests. It is recommended to create a General Project in your TestPresso Workstation and then reuse this project in Scenario Project code.

There are different approaches to using that custom library:

  • Referencing custom Python library from Web IDE Scenario. Using Python Library functions in Web IDE scenario.

  • Referencing custom Python library from Library Project. Using Python Library functions at TestPresso Workstation plug-ins extensions.

  • Referencing custom TestPresso Workstation Library Project from custom Python Library. Using TestPresso Workstation plug-in functions inside custom Python Library functions.

The operations required to manage custom Python projects are described below.

  1. 1)

    Creating custom General Project.
    For this, Right Click on empty space in the Project Explorer on the left side of Web IDE

    • New Project > General Project

      New Project General Project
    • Click create Button for Add New General Python Project

      Click create Button for Add New General Python Project
    • Create Custom Python Script File like an example of custom function that uses TestPresso Workstation plug-ins is below.

      Create Custom Python
      from ATS.Plugins.ExcelWorkbookPlugin.ExcelWorkbookPlugin import ExcelWorkbookPlugin
      
      def SetTextFromWorkbook():
          WB1 = ExcelWorkbookPlugin()
          WB1.CreateNew("xlsx")
          WB1.AddWorksheet("TestSheet")
          WB1.SetActiveWorksheet("TestSheet")
          WB1.SetCellValue("A1", "Hello, World!")
          WB1.SaveAs("C:\\temp\\ExcelWorkbookPlugin.xlsx")
          WB1.Close()
                  

      Temporary problem
      Don’t pay attention if you see error label near the code string that uses TestPresso Workstation API or ExcelWorkbookPlugin ( see the picture below). Use your code further: this is a temporary problem. Your project will run and work correctly.

      Temporary problem
  2. 2)

    Import this project (test_custom_python in example) in the scenario project.

    Import this project
    # -*- coding: utf-8 -*-
    import imp
    
    foo = imp.load_source('module.name', 'E:\WORKSPACE\\test_custom_python\\custom.py')
    
    def TestMain():
        try:
            foo.SetTextFromWorkbook()
        except Exception as ex:
            System.Debug("{0}".format(ex)
            

Adding custom projects helps to avoid code duplication by moving it in a separate Python project and then simply refer to this project from other.

Using TestPresso Workstation API and ExcelWorkbookPlugin in custom project is the same as in other TestPresso Workstation projects*.

4.2.3.Debugging and Running Test

To run Web IDE test, you need to build your Projects and run it using Web IDE menu. All necessary project settings are made when you create scenario projects and general projects.

There is a function in Web IDE that can build your project automatically. It allows you not to rebuild the project after any changes.

Before running test, make sure that:

  1. 1)

    All devices are connected and mapped correctly.

  2. 2)

    General Projects are added for all different devices that participate in test.

  3. 3)

    The launch configuration is specified.

Debugging with Web IDE

To debug a scenarios , click Debugging button button to open the Debug Perspective.

Debugging with Web IDE type1

To add breakpoint click on the Line Number which is on the left side of your code and choose Add Breakpoint in the pop-up menu that appeared.

Debugging with Web IDE type2

In the Variables View that is on the down left corner of the window you can see the values of all variables declared in your code.

Note that the configuration is specified for only one test scenario. It means that you can run and debug only one scenario at a time.

When test execution is finished, you can analyze execution results in the TP Log & Log.

Debugging with Web IDE type3

Run tests with ResetHandset from Eclipse in On-Device mode

In On-Device mode user should expect restart of the device and test continue from the next instructions after the ResetHandset.

4.2.4.Key Presses Simulation

Android devices

In TestPresso Workstation Scenarios, you can use device control functions that emulate hardware key presses.

TestPresso Workstation provides the possibility to simulate presses of Android device buttons and webOS TV Remocon buttons. There is the corresponding plug-in for each Device type with specific keypress functions which use the lists of key code mappings.

For example, the fragment of such a list for webOS TV:

  • key 115 VOLUME UP

  • key 139 MENU

  • key 113 MUTE

To find the full list of key code mappings for all devices, see the following TestPresso Workstation Functions Reference documents:

  • Android devices: Device Plug-ins > Android (ETA2Client) Plug-in > Key-press simulation

  • webOS TV: Device Plug-ins > WebOS Plug-in > Key-press simulation

All these plug-in projects provide the following functions for key press simulation:

  • KeyPress for working by digital codes

  • KeyPressByAlias for working by buttons’ aliases

macOS devices

TestPresso Workstation supports the only button in iPhone – Home button.

4.2.5.Setting Scenario Runtime Parameters

If you need to use some external information inside a test scenario (script) you can pass it through runtime parameters by means of a declaration and a definition of values of the scenario properties.

To define scenario runtime parameters, choose scenario in the Project Explorer and edit Runtime Parameters collection in the Properties panel.

All defined parameters are registered in the .project.properties file in the scenario project folder. The parameters with initial values are delivered to a test running services (TestPresso Workstation, Android Test Runner) during the deployment of a test package that includes the scenario. You can redefine values before launching the tests.

Setting Scenario Runtime Parameters step1
Setting Scenario Runtime Parameters step2

To read specified parameter’s value from scenario configuration file use system function
GetScenarioParameter(): val = System.GetScenarioParameter("a")

4.2.6.Using Recovery Scenarios

Recovery scenarios allow you to control test execution by handling unexpected results. It is recommended to apply recovery scenarios mechanism when working with Android device, Handset device; COM Port device.

If you want no recovery scenario to be applied to some error codes, you can choose in the recovery scenario selector for these codes.

When you create a new scenario project, the default Recovery Scenario (Default.py) is created in the Recovery Scenarios subdirectory. This scenario will be used by default for all returned error codes.

To start using the mechanism of recovery scenarios, you can do the following:

  • Modify the default recovery scenario;

  • Create new recovery scenarios;

  • Assign specific recovery scenarios to different error codes.

Modifying Recovery Scenario

All newly created recovery scenarios have some sample code inside. Modify this code to perform some useful actions (e.g. write some messages into the debug log using the System.Debug() function).

4.2.7.Working with Android devices through Wi-Fi

TestPresso Workstation allows you working with Android devices via WiFi.

For this follow the next steps:

  1. 1)

    Connect device to computer via WiFi.

  2. 2)

    Register device at Connectivity Page.

  3. 3)

    Set ADB in device: adbd (ADB daemon) should be in TCP mode.

    note image

    Device shouldn’t be connected to computer via USB. If it is connected via USB change the adbd mode manually using the following command:
    adb -stcpip 5555
    (5555 is a standard ADB daemon port )

  4. 4)

    Check the device registration in Connectivity Page. If device is registered you can use it the same way as the Android device connected via USB. See:

    • Mapping Logical Devices

    • Deployment of Tests

    • Running Tests

    • Analyzing Tests Results

5.SAMPLE OF SCRIPT

This section describes how to build the sample script provided by TestPresso.

5.1.AudioAnalyzer

This sample checks the volume of the audio file, checks if it is muted, and shows the default usage for comparing the two audio files.

AudioAnalyzerPlugin Repository : http://mod.lge.com/code/projects/TESTPRESSOQ/repos/plugins_test_script/browse/sample_AudioAnalyzerPlugin

Introduction

Use the ” FFmpeg ” program package to checks the volume of audio files, checks if it is muted, and show the default usage for comparing the two audio files.

Pre-requisites

  • ffmpeg (Add path to FFmpeg to PATH)

  • Install AudioManagerPlugin from Configuration page on TestPresso Workstation

  • Install AudioAnalyzerPlugin from Configuration page on TestPresso Workstation

  • Add Audio Manager Device on Connectivity

  • Scenario Script File must mapping Audio Manager Device

Screenshots

Audio has no screenshots.

Getting Started

This sample uses the web IDE in TestPresso Workstation. To deploy this project, use the Deploy feature on web IDE.

5.2.AVN Android Client

This sample demonstrates the basic use of AVNAndroid Client Plugin`s APIs on AVN Android Device.

AVN Android Client Plugin Repository : http://mod.lge.com/code/projects/TESTPRESSOQ/repos/plugins_test_script/browse/sample_AVNAndroidClientPlugin/README.md

Introduction

AVN Android Plugin was created by inheriting ETA2Client Plugin. This sample demonstrate the use of KeyPress extended from ANV Android without using APIs in ETA2Client.

The Key Code uses “Constant Value” defined in “Android KeyEvent”. It has to use according to the API level of the device to be tested.

The Key Alias uses the “KeyMapping” defined in the plugin.

Default “KeyMapping” table

Key Value Key Value
soft_left 1 media_next 87
soft_right 2 media_previous 88
home 3 media_rewind 89
back 4 page_up 92
call 5 page_down 93
endcall 6 switch_charset 95
0 7 btn_x 99
1 8 btn_y 100
2 9 btn_z 101
3 10 thumbl 106
4 11 thumbr 107
5 12 start 108
6 13 select 109
7 14 mode 110
8 15 caps_lock 115
9 16 scroll_lock 116
* 17 media_left 117
pound 18 media_right 118
dpad_up 19 sysreq 120
dpad_down 20 break 121
dpad_left 21 move_home 122
dpad_right 22 move_end 123
dpad_center 23 insert 124
volume_up 24 forward 125
volume_down 25 media_play 126
power 26 media_pause 127
camera 27 media_eject 129
clear 28 media_record 130
a 29 f1 131
b 30 f2 132
c 31 f3 133
d 32 f4 134
e 33 f5 135
f 34 f6 136
g 35 f7 137
h 36 f8 138
j 38 f10 140
k 39 f11 141
l 40 f12 142
m 41 num_lock num_lock
n 42 numpad_0 144
o 43 numpad_1 145
p 44 numpad_2 146
q 45 numpad_3 147
r46numpad_4148
s47numpad_5149
t48numpad_6150
u49numpad_7151
v50numpad_8152
w51numpad_9153
x52numpad_divide154
y53numpad_multiply155
z54numpad_subtract156
comma55numpad_add157
period56numpad_dot158
alt_left57numpad_comma159
alt_right58numpad_enter160
shift_left59numpad_equals161
shift_right60numpad_paren_left162
tab61numpad_paren_right163
space62volume_mute164
sym63info165
explorer64channel_up166
envelope65channel_down167
enter66zoom_in168
del67zoom_out169
grave68guide172
minus69dvr173
equals70bookmark174
bracket_left71captions175
bracket_right72settings176
slash_back73stb_power179
semicolon74app_switch187
apostrophe75language_switch204
slash76contacts207
at77calendar208
num78music209
headsethook79calculator210
focus80kana218
plus81assist219
menu82brightness_up220
notification83brightness_down221
search84sim_switch222
media85qbutton223
media_stop86

If you want to know how to use other Android APIs, check out the ETA2Client sample.

Pre-requisites

  • Install ‘TestPresso WORKSTATION’

  • Install ‘ANVAndroidClient Plugin’.

  • AVN Android Device ( ETA installed )

Screenshots

Screenshots

Getting Started

  • Adding AVN Android Device to ‘TestPresso WORKSTATION’.

  • Copy(or Import) test_avnandroid and test_android_lib at Web IDE(or Eclipse) WORKSPACE.

  • Open ‘avnandoird_test_script.py’ file.

  • Map avn android device using mapper.

  • Run ‘avnandroid_test_script’

Support

If you do not know how to add devices, map devices, or run scripts, check the Basic Usage of the User Guide.

License

© Copyright 2017, LG Electronics inc.

5.3.ETA2Client

This sample demonstrates the basic use of ETA2Client Plugin`s APIs such as execution, touch screen, capture screen, record screen on Android Device.

ETA2Client Plugin Repository : http://mod.lge.com/code/projects/TESTPRESSOQ/repos/plugins_test_script/browse/sample_ETA2ClientPlugin/README.md

Introduction

This sample was written for API validation. Therefore, it can be a little difficult to confirm how to use certain functions.

Pre-requisites

  • Install ‘TestPresso WORKSTATION’

  • Install ‘ETA2Client Plugin’.

  • Android Device ( ETA installed, Internet connected )

Screenshots

Screenshots
Screenshots
Screenshots

Getting Started

  • Adding Android Device to ‘TestPresso WORKSTATION’.

  • Copy(or Import) test_android and test_android_lib at Web IDE(or Eclipse) WORKSPACE.

  • Open ‘andoird_test_script.py’ file.

  • Map android device using mapper.

  • Run ‘android_test_script’

Support

If you do not know how to add devices, map devices, or run scripts, check the Basic Usage of the User Guide.

License

© Copyright 2017, LG Electronics inc.

5.4.ExcelWorkbook

This sample shows the basic usage of the editing API for Excel files. The sample creates an Excel file, adds and deletes sheets, and edits cells.

ExcelWorkBookPlugin Repository : http://mod.lge.com/code/projects/TESTPRESSOQ/repos/plugins_test_script/browse/sample_ExcelWorkbookPlugin

Introduction

Perform sheet creation, adding, and deleting using ExcelWorkbookPlugin and edit the cells in the Excel file.

Recording and capturing may not work normally if enterprise security programs are installed.

With a resolution parameter, you can specify aspect ratio of video

Pre-requisites

  • Install ExcelWorkbookPlugin from Configuration page on TestPresso Workstation

  • Add WebEnginePlugin Device on Connectivity & Create WebEnginePlugin Library Project

  • Scenario Script File must mapping any one Device like WebEnginePlugin Device

Screenshots

screenshots

Getting Started

This sample uses the web IDE in TestPresso Workstation. To deploy this project, use the Deploy feature on web IDE.

5.5.ImageAnalyser

This sample demonstrates the basic use of the API to capture screen and create, modify, and compare image files. This sample creates an image file, changes the resolution, and compares the two image files.

ImageAnalyserPlugin Repository : http://mod.lge.com/code/projects/TESTPRESSOQ/repos/plugins_test_script/browse/sample_ImageAnalyserPlugin

Introduction

Perform scan capture, modify, and compare using ImageAnalyzerPlugin.

Pre-requisites

  • Install ImageAnalyserPlugin from Configuration page on TestPresso Workstation

  • Add WebEnginePlugin Device on Connectivity & Create WebEnginePlugin Library Project

  • Scenario Script File must mapping any one Device like WebEnginePlugin Device

Screenshots

Original Image Resource

Screenshots

Scaled Image

Screenshots

Cropped Image

Screenshots

An image of the difference between Original Image and Scaled Image

Screenshots

An image of the difference between Original Image and Cropped Image

Screenshots

Getting Started

This sample uses the web IDE in TestPresso Workstation. To deploy this project, use the Deploy feature on web IDE.


5.6.SerialPort

This sample demonstrates the basic method of using the API to read, write, connect, and wait strings for a Serial Port pair. In this sample, a pair of serial ports write and read String data, manage and reconnect buffers.

SerialPortPlugin Repository : http://mod.lge.com/code/projects/TESTPRESSOQ/repos/plugins_test_script/browse/sample_SerialPortPlugin/README.md

Introduction

Perform write and read string data, reconnect, wait response and flush buffer using SerialPortPlugin.

Pre-requisites

  • Install SerialPortPlugin from Configuration page on TestPresso Workstation

  • Add Serial Port Device on Connectivity & Create Library Project for “GeneralCOMPort Project”

  • Scenario Script File must mapping any one Device like Serial Port Device

Screenshots

Add Serial Port Device on Connectivity Panel

screenshots

Test Result (Success)

Test Result (Success)

Getting Started

This sample uses the web IDE in TestPresso Workstation. To deploy this project, use the Deploy feature on web IDE.

5.7.SSHClient

This sample demonstrates the basic use of APIs for command execution, file upload, and file download to SSH Server. Samples run commands, upload and download files.

SSHClientPlugin Repository : http://mod.lge.com/code/projects/TESTPRESSOQ/repos/plugins_test_script/browse/sample_SSHClientPlugin

Introduction

Perform playback, recording, and capture of your movie using the ffmpeg program package.

Recording and capturing may not work normally if enterprise security programs are installed.

With a resolution parameter, you can specify aspect ratio of video

Pre-requisites

  • SSH Server and Account(ID, Password)

  • Install SSHClientPlugin from Configuration page on TestPresso Workstation

  • Add SSHClientPlugin Device on Connectivity

  • Scenario Script File must mapping SSHClientPlugin Device

Screenshots

<div><span></span><p>
<div><span></span><p>

Getting Started

This sample uses the web IDE in TestPresso Workstation. To deploy this project, use the Deploy feature on web IDE.

5.8.VideoManager

This sample demonstrates the basic use of the Recording, Capture, and Playback APIs for video devices. Samples play, record, and capture video.

VideoManagerPlugin Repository : http://mod.lge.com/code/projects/TESTPRESSOQ/repos/plugins_test_script/browse/sample_VideoManagerPlugin

Introduction

Perform playback, recording, and capture of your movie using the ffmpeg program package.

Recording and capturing may not work normally if enterprise security programs are installed.

With a resolution parameter, you can specify aspect ratio of video

Pre-requisites

  • ffmpeg (Add path to FFmpeg to PATH)

  • Install VideoManagerPlugin from Configuration page on TestPresso Workstation

  • Add Video Manager Device on Connectivity

  • Scenario Script File must mapping VideoManager Device

Screenshots

screenshots

Getting Started

This sample uses the web IDE in TestPresso Workstation. To deploy this project, use the Deploy feature on web IDE.

5.9.WebEngine

This sample demonstrates the basic use of the API for Web page loading and control. This sample loads the web page and controls web pages such as image capture and page transitions.

WebEnginePlugin Repository : http://mod.lge.com/code/projects/TESTPRESSOQ/repos/plugins_test_script/browse/sample_WebEnginePlugin_chrome

Introduction

Use WebEnginePlugin to load and control Web pages in Browser.

Pre-requisites

  • Install WebEnginePlugin from Configuration page on TestPresso Workstation

  • Add WebEnginePlugin Device on Connectivity & Create WebEnginePlugin Library Project

  • Scenario Script File must mapping WebEnginePlugin Device

Screenshots

Action has no screenshot

Getting Started

This sample uses the web IDE in TestPresso Workstation. To deploy this project, use the Deploy feature on web IDE.

Suggest Edit