Using Android Gateway

Android Gateway works with Eggplant Functional to automate tests on mobile devices running Android 4.1.1 and later.   Android Gateway, running on a computer where Android devices are attached via USB, helps make the connection between the device and Eggplant Functional. After you establish a connection, you can use Eggplant Functional to write scripts and create and perform tests against your Android environments.

Your can use Eggplant Functional to make connections to Android devices that are attached by USB to the same machine that is running Eggplant Functional, in which case Android Gateway is not required. However, using Android Gateway provides additional control over the device and the connection. If you want to make a connection to an Android device that is attached to a remote computer, you will need to have Android Gateway running on the remote computer.

Step by Step: Connecting to Devices with Android Gateway

Follow these steps to use Android Gateway to create a connection between Eggplant Functional and an Android device:

  1. Launch Android Gateway.
  2. Attach an Android device via USB to the machine where Android Gateway is running. When Android Gateway detects the device, you'll see the Status message change from No Android device detected to Ready to start service.
  3. Make sure the device is selected in the device list. If you have multiple Android devices connected to the machine running Android Gateway, each of them shows in the table view, so be sure you select the correct device. The list shows the model number of the detected device (as shown in the device's Settings) and the device serial number, as well as the current connection port and status for the device.

    Select the device you want to connect to in the devices list section of Android Gateway

    Select the device you want to connect to from the device list section of the screen

  4. (Optional) If you want Eggplant Functional to require a password for connecting to this device, enter it in the Password field in the VNC section of the Settings sidebar. You'll need to enter the same password in the Connection List in Eggplant Functional. Adjust any other settings on the Settings sidebar as necessary for your environment and intended connection. See Android Gateway Settings for information about these settings.
  5. Start(開始)をクリックして接続した機器上のVNCサービスを開始します。 VNCサービスが実行されている時、Status(ステータス)メッセージが緑色に変わり、デバイスへの接続に使用するIPアドレスとポートが表示されます。 しかし、特別な接続環境においては、以下のOther Connection Considerations(その他の接続の検討事項)を参照してください。
  6. In Eggplant Functional, create a Connection List item for the Android device. See Using the Eggplant Functional Connection List for more information.
  7. Use the Connection List in Eggplant Functional to open the connection to your Android device.

When you've established a connection, the Eggplant Functional Viewer window displays the Android device screen. You can now capture images on the device and write scripts in Eggplant Functional, using the Android device as you would any other system under test (SUT).

同時接続

You can connect to multiple Android devices simultaneously by following the above steps, but you would choose a different device from the list of detected devices for subsequent connections. Each simultaneous connection must use a different port, which you set in VNC section of the Settings sidebar. Settings and configuration choices are saved per device.

See Android Gateway Settings to learn how to configure settings.

Other Connection Considerations

Remember that you can make connections with Android Gateway both from your local machine to a locally attached device as well as to a remote machine that has or devices attached. The instructions above work for making both types of connections. To make a remote connection, you must ensure that Eggplant Functional is able to reach the IP address where the Android Gateway is running.

If you're making a connection to a device attached to your local machine, you can set Android Gateway so that it makes the device available only from that machine. To make this setting, go to the VNC section of the Settings sidebar in Android Gateway and set the External port and Local port to the same port number. VNCサービスが現在実行されていない場合のみ、設定を変更できる点に注意してください。

その後、VNCサービスを開始した時に、Status(ステータス)フィールドに表示される接続情報が、ローカルホストのIPアドレス127.0.0.1とSettings(設定)で使用しているいずれかのポート番号を表示します。 Use these numbers when you create your connection in Eggplant Functional.

 

This topic was last updated on 2月 01, 2019, at 11:13:23 午前.

Eggplant icon Eggplant.io | Documentation Home | User Forums | Support | Copyright © 2019 Eggplant