Time that appium takes to run a test

I’m new to Appium and I would like to know about the time that it takes to run a test.

This is my scenario:

Real device;

  • My test case: Steps to answer 16 questions (changing the question by clicking on a button) and checking the results.
  • It is taking about 160 seconds to run each test. Is this a normal execution time? I think that it could be minimized if I use “noReset” = true and “fullReset” = false. Am I wrong?

Thanks,

@ppg use below when you need reach some of scenarior. try to use fullReset as less as possible cause it slowest driver start.

                if (devicePlatform.contains("fullReset")) { // reinstall new client version
                    System.out.println("  Driver DO FULL-RESET");
                    capabilities.setCapability(MobileCapabilityType.FULL_RESET, true);
                    capabilities.setCapability(MobileCapabilityType.NO_RESET, false);
                } else if (devicePlatform.contains("fastReset")) { // clears cache without reinstall
                    System.out.println("  Driver DO FAST-RESET");
                    capabilities.setCapability(MobileCapabilityType.FULL_RESET, false);
                    capabilities.setCapability(MobileCapabilityType.NO_RESET, false);
                } else {
                    System.out.println("  Driver DO NORMAL start");
                    capabilities.setCapability(MobileCapabilityType.FULL_RESET, false);
                    capabilities.setCapability(MobileCapabilityType.NO_RESET, true);
                }
            }

Thanks for your answer, Aleksei, but it still slow. When it finishes a @Test takes a looong time to start the next one. I’m using the appium-desktop-Setup-1.2.0-beta.3.

@ppg maybe your test is too long. how fast driver starts? with NORMAL start it should take about 10sec.

I have tried test shorter, but it still slow. When can I find the accurate information abou the driver starter? Sorry, I’m really new to Appium.

@ppg give us your code…

public class AndroidSetup {

AndroidDriver driver; 	
	
public void setConfig() throws MalformedURLException, InterruptedException{
	
	File appPath = new File("C:\\app\\p");
	File appFile = new File(appPath, "App_1.0.apk");
	
	DesiredCapabilities capabilities = new DesiredCapabilities();
	capabilities.setCapability("deviceName","0424618914");
	capabilities.setCapability("platformName","Android");
	

	capabilities.setCapability("noReset", "true"); 
	capabilities.setCapability("fullReset", "False");*/		
	
	
	capabilities.setCapability(MobileCapabilityType.APP, appFile.getAbsolutePath());
	
    driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);	
	
}

}

public class TestCases extends AndroidSetup {

String app_package_name = "br.name.name_:id/";
String start_button_id = "btnStart";
String next_button_id = "btnNext";
String value_1_id = "radioButton1";
String value_2_id = "radioButton2";
String value_3_id = "radioButton3";
String value_4_id = "radioButton4";
String value_5_id = "radioButton5";
String value_6_id = "radioButton6";
String value_7_id = "radioButton7";
String value_na_id = "radioButton8";
String overall_value = "overwall";
String sys_qual_value = "sysQual";
String info_qual_value = "infoQual";
String int_qual_value = "intQual";

@Before
public void setup() throws Exception{   	
	
	setConfig();

} 

@After
public void tearDown() throws Exception{
    driver.quit();
}

@Test
public void Scenario001() throws Exception{
	
	driver.findElement(By.id(app_package_name + start_button_id)).click();
	driver.findElement(By.id(app_package_name + value_1_id)).click();
	driver.findElement(By.id(app_package_name + next_button_id)).click();
	driver.findElement(By.id(app_package_name + value_1_id)).click();
	driver.findElement(By.id(app_package_name + next_button_id)).click();
	driver.findElement(By.id(app_package_name + value_1_id)).click();
	driver.findElement(By.id(app_package_name + next_button_id)).click();
	driver.findElement(By.id(app_package_name + value_1_id)).click();
	driver.findElement(By.id(app_package_name + next_button_id)).click();
	driver.findElement(By.id(app_package_name + value_1_id)).click();
	driver.findElement(By.id(app_package_name + next_button_id)).click();
	driver.findElement(By.id(app_package_name + value_1_id)).click();
	driver.findElement(By.id(app_package_name + next_button_id)).click();
	driver.findElement(By.id(app_package_name + value_1_id)).click();
	driver.findElement(By.id(app_package_name + next_button_id)).click();
	driver.findElement(By.id(app_package_name + value_1_id)).click();
	driver.findElement(By.id(app_package_name + next_button_id)).click();
	driver.findElement(By.id(app_package_name + value_1_id)).click();
	driver.findElement(By.id(app_package_name + next_button_id)).click();
	driver.findElement(By.id(app_package_name + value_1_id)).click();
	driver.findElement(By.id(app_package_name + next_button_id)).click();
	driver.findElement(By.id(app_package_name + value_1_id)).click();
	driver.findElement(By.id(app_package_name + next_button_id)).click();
	driver.findElement(By.id(app_package_name + value_1_id)).click();
	driver.findElement(By.id(app_package_name + next_button_id)).click();
	driver.findElement(By.id(app_package_name + value_1_id)).click();
	driver.findElement(By.id(app_package_name + next_button_id)).click();
	driver.findElement(By.id(app_package_name + value_1_id)).click();
	driver.findElement(By.id(app_package_name + next_button_id)).click();
	driver.findElement(By.id(app_package_name + value_1_id)).click();
	driver.findElement(By.id(app_package_name + next_button_id)).click();
	driver.findElement(By.id(app_package_name + value_1_id)).click();
	driver.findElement(By.id(app_package_name + next_button_id)).click();	
			
	
	assertEquals("1,00", driver.findElement(By.id(app_package_name + sys_qual_value)).getText());

}

@ppg add:

System.out.println("   DRIVER start...");
Long startDriverTime = System.currentTimeMillis();

driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);	

startDriverTime = System.currentTimeMillis() - startDriverTime;
System.out.println("   DRIVER started: " + (int) startDriverTime/1000 + " sec");

DRIVER started: 90 sec
Do you want some log from Appium server?

@ppg 90sec wow :slight_smile: TOO LONG

can you set correctly:

capabilities.setCapability(MobileCapabilityType.FULL_RESET, false);
capabilities.setCapability(MobileCapabilityType.NO_RESET, true);

and try again?

DRIVER started: 89 sec
OMG :frowning:

@ppg ok - your appium version? enable debug log with timestamp and give output… lets see what takes so long…

This is the last version 1.2.0-beta.3 (Start Server v1.6.5). I could try downgrade, what do you think? log_appium.txt (104.9 KB)

@ppg pls add “–log-timestamp” when you start driver… there is no any time in logs :frowning:

PS updated!

Ok, Should I add this on Appium server configuration?

@ppg yes. add and repeat test

Updated! log_appium_updated.txt (117.4 KB)

@ppg nothing special in log BUT indeed start is SLOOOOOOOW. try to update your device to something at least on Snap 810 CPU

I have tried different devices, but it is slow. It’s driving me crazy :smiley: Thanks for your attention!

From developer options, disable all animations. :slight_smile: