Appium to not install app again but only reset app data

Hi Community,

I’m new to appium trying to reduce test execution time, running java-appium client with TestNG

My test class looks something like this:

Public class test{

public void capabilities(){ 
caps.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS");
       caps.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone12");
       caps.setCapability(MobileCapabilityType.AUTOMATION_NAME, "XCUITest");
       caps.setCapability(MobileCapabilityType.UDID, "");
       caps.setCapability(MobileCapabilityType.APP, AppUrl);
       caps.setCapability(MobileCapabilityType.FULL_RESET, "false");
       caps.setCapability("appWaitActivity", "*");
// device caps }

//spin up new driver session

test1(){ //elements displayed}

test2() {//login valid}

test3 {//login invalid}    


Whats Happening is for each test the app gets installed fresh

what I want to achieve is:
The app only gets installed for the first time & for the next tests only gets reset i.e opens default main screen

Can someone help please ?

Caps and example of testNG xml that will help you Different capabilities for different scenarios

Thanks this was really helpful