Hi, Preformatted text
I’m using testObject platform to run test cases.
I want to have test results as pass / failed.
Now only this shows in eclipce as green or red, but I want to have it in logs.
I want to have it in my appium log.
Now in appium log it shows as,
[debug] e[35m[MJSONWP]e[39mReceived response: null
[debug] e[35m[MJSONWP]e[39m But deleting session, so not returning
[debug] e[35m[MJSONWP]e[39m Responding to client with driver.deleteSession() result: null
[35m[HTTP]e[39m e[37m<-- DELETE /wd/hub/session/7ae54b0b-3553-4868-aef7-87315a497f14
[39me[32m200e[39m e[90m3 ms - 76e[39m e[90me[39m
this is the test I’m running,
package MyPack;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.ios.IOSElement;
import java.io.File;
import java.net.URL;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
import org.openqa.selenium.By;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testobject.appium.junit.TestObjectTestResultWatcher;
import java.util.concurrent.TimeUnit;
public class TestMainView {
private AppiumDriver driver;
public class WatcherTestSetup {
/* This is the key piece of our test, since it allows us to
* connect to the device we will be running the app onto.*/
private AppiumDriver driver;
/* Sets the test name to the name of the test method. */
@Rule
public TestName testName = new TestName();
/* Takes care of sending the result of the tests over to TestObject. */
@Rule
public TestObjectTestResultWatcher resultWatcher = new TestObjectTestResultWatcher();
/* This is the setup that will be run before the test. */
}
@Before
public void setUp() throws Exception {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("testobject_appium_version", "1.6.3");
capabilities.setCapability("testobject_api_key", "89E0638FAC484F189A0685CA1418E37C");
capabilities.setCapability("testobject_device", "iPhone_6S_64GB_10_real");
capabilities.setCapability("testobject_cache_device", "false");
//capabilities.setCapability("testobject_app_id", "4");
capabilities.setCapability("testobject_suite_name", "Sbugs");
capabilities.setCapability("testobject_test_name", "SbugsMainView");
//capabilities.setCapability("orientation", "LANDSCAPE");
driver = new IOSDriver (new URL("http://appium.testobject.com/wd/hub"), capabilities);
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
}
/* @After
public void tearDown() {
driver.closeApp();
driver.quit();
} */
@Test
public void webView() throws InterruptedException {
//Open app>> tap and view
driver.findElement(By.name("Potato Bug")).click();
driver.findElement(By.name("Back")).click();
driver.findElement(By.name("House Centipede")).click();
driver.findElement(By.name("Back")).click();