appium kills all instruments processes
See original GitHub issue@aluedeke commented on Thu Nov 12 2015
We currently experiencing issues running parallel tests with appium on the same host (which is technical possible since some time).
Fortunately testing fails randomly. We currently believe thats because appium is trying to kill all instrument processes on an host. I think that is a super ugly behaviour and should be changed if possible (or must be at least configurable).
@sebv @lbielski do you have some opinions on that?
@lbielski commented on Thu Nov 12 2015
Yes, this is not a good behaviour when Appium is not run locally on a single device.
We have successfully tested running multiple Appium sessions in parallel on the same host and it does work (you just have to provide different tmp
folders as a parameter), but killing all of the instruments
processes also messes up with other running Appium sessions.
I understand that there is a need to kill instruments
sometimes and for that we need to link Appium sessions to instruments instance. You can kind of tag
a process by starting it with an environmental variable, for example APPIUM_SESSION_ID=<session_id>./
. Then, when you need instruments to be restarted you can search for a process which contains this env variable. On Mac it can be done by ps -p <pid> -wwwE
. This way you can uniquely identify instruments instance for a specific Appium session.
I would think it makes sense to make this an option for people running Appium sessions on parallel.
Another and simpler option would be to provide an option to disable this behaviour, so when instruments are not working Appium just gives up without trying to fix instruments.
@aluedeke commented on Sun Nov 15 2015
@jlipps @bootstraponline any feedback?
@jlipps commented on Mon Nov 16 2015
i do think appium tries to kill all instruments processes, which is bad. i’m not sure if this same strategy is used in appium 1.5 though. @imurchie ?
@imurchie commented on Mon Nov 16 2015
1.5 does still do this. I’m not sure why, other than it always has.
I’m all for making this the default behaviour and putting the other behind a desired capability. We will have to investigate the best route for this.
@aluedeke commented on Tue Nov 17 2015
@imurchie we are currently evaluating if providing a custom path to pkill would be sufficient, will ping back when we now more
@saikrishna321 commented on Mon Dec 28 2015
@aluedeke any updates on this ?
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (6 by maintainers)
Top GitHub Comments
That log line comes from https://github.com/appium/appium-instruments/blob/master/lib/instruments.js#L358-L385, which only kills the single Instruments process. It should not kill everything.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.