How to use session-override capabilities in Appium Studio before creating driver instance

Hi,

How to use session-override capabilities in Appium Studio before creating driver instance. As during the automation script execution if the script stops / failed in middle due to exception and the earlier driver instance was created was not stopped / killed then if we re-execute the automation scripts , its failing to create new instance of driver as the earlier driver instance was not killed.
So for this reason we can use some capabilities like “Session Override” which we have for APPIUM, which will kill the earlier running driver instance and create a new driver instance for current test case which is executing without any error.
But the same “Session Override” capabilities is not working in Appium Studio mentioned below.
Can you please suggest how to use “Session Override” capabilities in Appium Studio.

dc.setCapability("–session-override", true);

Thanks

Hi,
Currently we do not have support for session-override. I will open an issue and see that it will supported in our next version.

Shubu;

I am curious why there isn’t a guaranteed mechanism to close an “open driver” even in the event of a test failure. Most test frameworks provide some for of test teardown capability/hook where this type of housekeeping is normally done. Perhaps you don’t create a driver per test ? I am just trying to understand.

thnx

Hello Wakelt,

As mentioned by you , Yes, our Framework do have the exception handling for closing / quieting the driver instance in case of Test case script failure. But if suppose i an debugging my scripts and in middle & i find some errors and stopped my execution in middle in eclipse manually , in that case the driver instance which was created earlier will not be stopped / closed. so while re-running the code again it will through error in creating new driver instance as the earlier driver instance was not closed / stopped. In that case you have to close and restart the Appium studio again.

So for this reason if we have Session override concept, it will help us while debugging our scripts.

Thanks

Thanks Guy for the update, It will be really helpful in future if session override concept is implemented.

Thank you for the explanation. I have a better understanding of the issue.

I would think if the client script terminated as you mention above, the client side of the session would be torn down with it. Is the issue with the appium server hanging on to the session info ?? I would hope the Experitest appium server would recognize the loss of client connection (I would think there would be some form of periodic heartbeat ?) and bring down the server side of the session automagically.
Then gain, perhaps the appium client doesn’t deal with a heatbeat/keepalive ?

The Experitest guys are good ! :smile: I am sure they’ll provide functionality we’ll like.

thnx