we manage it in testTG code when we start driver. we looking for variable in testNG xml, how it is needed to start client with reset or not.
we start appium server in code with most default settings like:
[appium, --log-level, error, --port, 4725, --session-override]
code itself is:
if (devicePlatform.contains("fullReset"))
capabilities.setCapability("fullReset", true);
else {
capabilities.setCapability("fullReset", false);
capabilities.setCapability("noReset", true);
}
where "devicePlatform" is variable taken from here example of xml:
<test name="Install_new_client_on_device">
<parameter name="devicePlatform" value="iOS fullReset"/>
<parameter name="deviceName" value="iPad Air,iPhone 5s"/>
<classes>
<class name="com.xxxxxxxxxx.tests.xxxx.test.ios.doFullReset">
</class>
</classes>
</test>
<test name="some_test_name" preserve-order="true">
<parameter name="devicePlatform" value="iOS"/>
<parameter name="deviceName" value="iPad Air,iPhone 5s"/>
<classes>
<class name="com.xxx.tests.xxxx.test.ios.testWelcomeScreen"/>
<class name="com.xxx.tests.xxxx.test.ios.testTermsAndConditions"/>
<!-- and other tests -->
</classes>
</test>