Skip to content

Instantly share code, notes, and snippets.

@antranapp
Created November 1, 2013 11:08
Show Gist options
  • Save antranapp/7263973 to your computer and use it in GitHub Desktop.
Save antranapp/7263973 to your computer and use it in GitHub Desktop.
Tear down script for appium, phpunit integration to wait for the last session to be destroyed before starting a new one
public function tearDown() {
$count = 0;
$sessionId = $this->getSessionId();
while ($sessionId !== FALSE && $count < 5) {
printf("\n".$count." - ".$sessionId."\n");
parent::tearDown();
sleep(2);
$sessionId = $this->getSessionId();
$count++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment