-
-
Notifications
You must be signed in to change notification settings - Fork 764
AppiumDriverLocalService dosent spawn on MultiThreading #283
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
@saikrishna321 Thank you for the detailed report. I'll run into this problem as soon as possible. |
@TikhomirovSergey More info: i'm running my test with TestNG framework and below the testng.xml used to trigger the tests
|
@TikhomirovSergey any updates in this.. i have updated the repo link .. all that i'm trying to do is just trigger appium server session as per the testng.xml |
@saikrishna321 The main idea is that it is not a bug (however, who knows :) ). AppiumDriverLocalService was designed as thread safe feature... |
@TikhomirovSergey hey thanks a lot for getting back.. Looking forward for you take a look at this . |
There is a progress. Now I'm suspecting a bug! |
@TikhomirovSergey Great 👍 waiting to hear from you |
Well. There are problems First of all your samle code has some issues. I'm doubting that it was able to be run in multi-threads. Here is my improvement: saikrishna321/TestNGParallelThreads#1 You can take a look at this. It is not necessary to merge this PR :) Also there are problems on Java client side. It is possible to hang AppiumDriverLocalService in multiple threads. I've fixed it and I've got an improved build locally. The PR with this fix is coming soon. Also ... even the Selenium Java client has an issue. :) It is reproduced on Windows 7/8. I've tried to run your code with ChromeDriverService and the result is the same. This bug can be avoided on the Appium Java client side. |
@TikhomirovSergey That's awesome ... I already have a project running AppiumDriverLocalService on multiple thread at class level parallelization it works .. but i have noticed that sometimes the app just opens n closes .. not sure why.. Looking for the PR with latest version. Here is the repo: Thoughts ? |
@saikrishna321 I've ideas for now. Please open one more issue. I think it is the another problem and it is not related to this. ... And provide deatails as many as you can :). But the new PR will be proposed very soon (this issue fix). |
@TikhomirovSergey sure i'm gonna do that.. i'm keeping this issue open until the new PR is out .. |
@TikhomirovSergey when will the 4.0.0 be released ? |
I don't know. Maybe with #214. I'm working on it. |
Oh okie ... How do I build the jar locally so that I can test the fix of multi threading or can you push a SNAPSHOT ? |
I can't. May be @Jonahss can push a SNAPSHOT. |
@Jonahss is it possible to push a SNAPSHOT it will be helpfull.
|
@saikrishna321 No. |
@TikhomirovSergey i use version 3.3.3,details below Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T17:27:37+05:30) Should i raise a defect for this ? |
If the error is the same
please open a new one. |
@TikhomirovSergey i have raised an issue for above comment #294 FYI, i was able to get the dependency from jitpack |
@TikhomirovSergey i merged your changes to the sampletest repo https://github.com/saikrishna321/TestNGParallelThreads/ I'm still unable to run the methods in parallel when the AndroidDriver is added. I see same device UDID is picked on two sessions. Take a look at the log below https://gist.github.com/saikrishna321/79d220e0724f6a334276 To reproduce
|
@TikhomirovSergey did u get chance to take a look at this ? |
I think it is not the problem of a service and it is the problem of your code. It looks like you are trying to to start two sessions on the same service. Appium service doesn't support multisession mode till v2.0. I told you that it is not necessary to merge my PRs. They were made only for demonstration. So now it is possible to use one service instance per driver. |
@TikhomirovSergey thanks for looking into it 👍 If i start two threads and start AppiumLocalService on individual threads with different port numbers should the appium server be started ? |
@TikhomirovSergey you had mentioned above that Appium service doesn't support multisession mode till v2.0, is this on the server end. I heard appium v1.5 would support multiple server session in single node instance. Can you please point out the implementation, if done ? |
@TikhomirovSergey i was trying to execute the appium android test in parallel where i wanted to start the appium-server programmatically for every thread.
TestNG by default provides a way were u can run methods in parallel and set the thread-count. When i trigger the appium server with AppiumLocalSerive it always hooks to a single thread.
When i start the appium server as we do from command line it works fine. I have a sample project to reproduce it.
https://github.com/saikrishna321/TestNGParallelThreads
When i set the ParallelMode.CLASSES i see the the appium server and the application launched on two thread(two devices) as expected. Please check the gist for logs
https://gist.github.com/saikrishna321/8a2e49ccc080a3faf014
When i set the ParallelMode.METHODS i dont see the methods executing in parallel, check the gist for logs and also i noticed the AfterClass for one of the has not completed, i see the process still running
https://gist.github.com/saikrishna321/6592f680dee7d70be59c
The text was updated successfully, but these errors were encountered: