0

on Running Test Suite(with 20-30 test cases) on Emulator time application crashed after run 6-7 test cases,its working when we execute on physical device.but we have to work with emulator,we are using Android Emulator and Genymotion.

Lav Sharma
  • 19
  • 1
  • 6

1 Answers1

1

@lav Sharma , could You please expand a bit more here please:

  • what .apk version do You use for execution? Debug or non debug?

  • second point, could You please play a bit with the flag setWebContentsDebuggingEnabled and ask devs to turn it ON WebView.setWebContentsDebuggingEnabled(true);

or OFF WebView.setWebContentsDebuggingEnabled(false);

in the onCreate method of the app;

  • for the investigation of the issue - please collect application logs (during tests execution) and post the exception here . To dump the logs - please use the method below:

    List<LogEntry> logs = driver.manage().logs().get("logcat").getAll();
    

    public static void dumpLogs(AppiumDriver driver, String testName) { String logPath = "C:\\automation_capture\\"; log.info("{}: Saving device log...", driver.getSessionId()); List<LogEntry> logEntries = driver.manage().logs().get("logcat").filter(Level.ALL); File logFile = new File(String.format("%s_%s.txt",logPath,testName)); PrintWriter log_file_writer = new PrintWriter(logFile); log_file_writer.println(logEntries ); log_file_writer.flush(); log.info("{}: Saving device log - Done.",driver.getSessionId()); } }

Hope this helps. best regards, Eugene

eugene.polschikov
  • 7,254
  • 2
  • 31
  • 44