简体   繁体   中英

Failed to stop node process if Appium fails with SessionNotCreated exception using Python

I'm running automation test for 10 iOS devices for Safari browser in parallel but during the test I noticed that randomly Appium fails with exception

SessionNotCreated

When such exception happens then the Appium connection fails but it fails to kill the process (Appium process is started by node) This cause a lot of memory usage for the device.

Any suggestions to handle such conditions?

Thanks in advance

  1. Tried to rerun appium whenever there is an exception
  2. Killing the process id for the Port where appium was running but it results in killing the whole script
  3. Added random waits to avoid 10 parallel tests starting at the same time

Fixed using os.kill from python

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM