Quality Testing

Quality is delighting customers

org.openqa.selenium.NoSuchSessionException: A session is either terminated or not started

I am getting  below error while running multiple test cases in Appium.

Time elapsed: 0.227 s  < FAILURE!
org.openqa.selenium.NoSuchSessionException:
A session is either terminated or not started (WARNING: The server did not provide any stacktrace information)

testng.xml file

<test name = "Smoke Test Case">
<classes>
<class name = "pack.testcase1"/> 
<class name = "pack.testcase2"/> 
</classes>
</test>

Base file:

DesiredCapabilities dc = new DesiredCapabilities();
dc.setCapability("no",true);
dc.setCapability("newCommandTimeout", 100000);
dc.setCapability("noReset", true);
dc.setCapability(MobileCapabilityType.DEVICE_NAME, "Sony");
dc.setCapability(MobileCapabilityType.APP, filepath.getAbsolutePath());
dc.setCapability("noRest", true);

driver = new AndroidDriver<AndroidElement>(new URL("http://127.0.0.1:4723/wd/hub"),dc);
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

Result:

pack.testcase1> Opened the app immediately closed (not executed entire test case) throwing above error

pack.testcase2 > executed the test case 

Can you guys help me on this issue.

Views: 189

Reply to This

Replies to This Discussion

Appium does not support execution of multiple test cases in parallel. 

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2018   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service