Sha256: 1e182ffcfe1e71836fdcc943fcf7ed0d9d5a6657394d76f754eab2bd270d8ca2

Contents?: true

Size: 1.15 KB

Versions: 14

Compression:

Stored size: 1.15 KB

Contents

package com.amplify.honeydew_server;

import android.util.Log;
import android.view.KeyEvent;
import com.amplify.honeydew_server.httpd.RemoteCommandReceiver;
import com.android.uiautomator.core.UiDevice;
import com.android.uiautomator.testrunner.UiAutomatorTestCase;

public class TestRunner extends UiAutomatorTestCase {

    private static final String TAG = TestRunner.class.getSimpleName();

    public void testRemoteLoop() throws Exception {
        Log.d(TAG, "Starting honeydew-server...");

        UiDevice uiDevice = getUiDevice();
        uiDevice.wakeUp();
        unlockEmulator();

        RemoteCommandReceiver remoteCommandReceiver =  new RemoteCommandReceiver(new ActionsExecutor(uiDevice));
        remoteCommandReceiver.start();

        Log.d(TAG, "honeydew-server started, waiting for commands");
        while(true) {
            Thread.sleep(1000);
        }
    }

    private void unlockEmulator() {
        getUiDevice().pressKeyCode(KeyEvent.KEYCODE_SOFT_LEFT);
        getUiDevice().pressKeyCode(KeyEvent.KEYCODE_SOFT_RIGHT);
        getUiDevice().pressKeyCode(KeyEvent.KEYCODE_MENU);
        getUiDevice().pressKeyCode(KeyEvent.KEYCODE_MENU);
    }
}

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
honeydew-0.29.1 server/src/main/java/com/amplify/honeydew_server/TestRunner.java
honeydew-0.29.0 server/src/main/java/com/amplify/honeydew_server/TestRunner.java
honeydew-0.28.0 server/src/main/java/com/amplify/honeydew_server/TestRunner.java
honeydew-0.27.4 server/src/main/java/com/amplify/honeydew_server/TestRunner.java
honeydew-0.27.3 server/src/main/java/com/amplify/honeydew_server/TestRunner.java
honeydew-0.27.2 server/src/main/java/com/amplify/honeydew_server/TestRunner.java
honeydew-0.27.1 server/src/main/java/com/amplify/honeydew_server/TestRunner.java
honeydew-0.27.0 server/src/main/java/com/amplify/honeydew_server/TestRunner.java
honeydew-0.25.0 server/src/main/java/com/amplify/honeydew_server/TestRunner.java
honeydew-0.24.1 server/src/main/java/com/amplify/honeydew_server/TestRunner.java
honeydew-0.24.0 server/src/main/java/com/amplify/honeydew_server/TestRunner.java
honeydew-0.23.0 server/src/main/java/com/amplify/honeydew_server/TestRunner.java
honeydew-0.22.0 server/src/main/java/com/amplify/honeydew_server/TestRunner.java
honeydew-0.21.0 server/src/main/java/com/amplify/honeydew_server/TestRunner.java