@Before
  public void setUpTest() throws Exception {
    // call super setup
    super.setUp(name.getMethodName());

    // also start helloworld
    DebugBridge.get().runShellCommand("pm clear com.groupon.roboremote.example.helloworld");
    DebugBridge.get()
        .runShellCommand("am start -n com.groupon.roboremote.example.helloworld/.HelloWorld");
  }
예제 #2
0
    public void run() {
      try {
        DebugBridge.get()
            .runShellCommand(
                "am instrument -e port "
                    + PortSingleton.getInstance().getPort()
                    + " -w "
                    + getTestRunner(),
                new NullOutputReceiver(),
                0);
      } catch (Exception e) {

      }
    }
예제 #3
0
  // This is called in the failure method override above
  public void tearDown() throws Exception {
    try {
      EmSingleton.get().close();
      killApp();

      // clear stale ADB ports
      Utils.clearStaleADBTunnels("ROBO");

      // stop logcat
      TestLogger.get().info("Stopping logcat");
      logcatLogger.stopLogListener();
      logcatLogger = null;

      // store logs
      Device.storeLogs("adb_robo.log", "robo.log");

      // stop EventManager
      EmSingleton.release();
    } catch (Exception e) {

    } finally {
      DebugBridge.destroy();
    }
  }
예제 #4
0
 public void onFailure() throws Exception {
   logger.warn("TestBase::OnFailure:: Taking screenshot");
   DebugBridge.get().getScreenShot("FAILURE.png");
   Device.storeFailurePng();
 }