-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Not able to run parallel tests using uiautomator2 #7745
Comments
Sending in the appium logs would be helpful, at a debug loglevel. |
Just took a quick look through the uiautomator2 driver's code. I'm not seeing anything that should prevent it from working offhand. @sravanmedarapu is the one to ask though. You should also not need to use the |
For what I can see in the logs maybe the fact that the 2 parallel tests use the same port of the uiautomator2 server is the cause. When I run two session I have: Session1: adb -s 9885e642324e32474e shell am instrument -w io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner... Session2: I was wondering if there is a capability for the port of UIAutomator2 |
UiAutomator2 driver should be able to find the available free port, however you can also explicitly specify port number using Can you please share full server logs in gist ? |
It worked!!! Maybe the problem lies in which determines the not used port In my system it used the same port for the 2 different threads and appium instances |
hmm, maybe a race condition of sometime. anyway, closing this out since it seems like specifying systemPort works well. |
Do we need to set the systemPort capability same as the appium server port or it should be always different ? |
How to solve the problem of not being able to test in parallel?How to set different systemPort numbers for appium instances , |
please anyone share where and how to set the systemPort number |
You can see the capability in http://appium.io/docs/en/writing-running-appium/caps/ . You can set it like other capabilities like
|
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. |
Appium version 1.6.3
automationName: uiautomator2
I have connected 2 Android devices in my MAC
I launch 2 appium servers each associated with the specific device id in different ports and bootstrap ports.
501 10294 10291 0 4:56PM ?? 0:02.83 /Users/panagiotistsiakos/.nvm/versions/node/v6.5.0/bin/node /usr/local/lib/node_modules/appium/build/lib/main.js --port 4725 --address 0.0.0.0 --udid 00e4064d69a752c7 --log-level error --bootstrap-port 5204 --no-reset --command-timeout 300
501 10297 10291 0 4:56PM ?? 0:02.78 /Users/panagiotistsiakos/.nvm/versions/node/v6.5.0/bin/node /usr/local/lib/node_modules/appium/build/lib/main.js --port 4727 --address 0.0.0.0 --udid 42008bb6d2332325 --log-level error --bootstrap-port 5206 --no-reset --command-timeout 300
The test are not run. Usually 1 of the devices or even none starts running the tests
The same setup exactly with automationName:appium runs with no problem
Is this a limitation of the uiautomator2 or have I misses something? (e,g some extra desired capability)
I take errors such as:
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: connect ECONNREFUSED 127.0.0.1:8202 (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 40 milliseconds
OR
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: java.lang.IllegalThreadStateException: Thread already started
at java.lang.Thread.checkNotStarted(Thread.java:849)
at java.lang.Thread.start(Thread.java:1059)
at io.appium.uiautomator2.model.NotificationListener.start(NotificationListener.java:32)
at io.appium.uiautomator2.model.Session.(Session.java:23)
at io.appium.uiautomator2.model.AppiumUiAutomatorDriver.initializeSession(AppiumUiAutomatorDriver.java:19)
at io.appium.uiautomator2.handler.NewSession.safeHandle(NewSession.java:31)
at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:54)
at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:202)
at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:193)
at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:514)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
at java.lang.Thread.run(Thread.java:818)
(WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 27.98 seconds
Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
The text was updated successfully, but these errors were encountered: