tvarchive / optimusTemplate

This is a cucumber jvm implementation template using the optimus mobile automation framework. If you like it, star it, help spread the word.
http://docs.testvagrant.com
66 stars 23 forks source link

Facing issue with Parallel execution in Android. Getting different issues in different machines. #42

Closed JasWoolieX closed 4 years ago

JasWoolieX commented 5 years ago

Hello,

I am facing different issues while executing the scripts in a suite on 2 different devices: Different errors for the same run in different machines:

  1. Unable to mark device as engaged, Check for device state using adb devices
  2. java.lang.NullPointerException at Starting steps
  3. 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:8200

Command used: ./gradlew runFragmentation -DtestFeed=android-*****-qa -Dtags=@androidSmoke Same issue with runDistribution mode. We have checked for the duplicate steps in feature files but not sure whats causing this issue. It has previously worked for us. Any pointers?

KrishnB commented 5 years ago

Could this be an issue with ANDROID_HOME path? Can you pls check if adb command throws any error.

JasWoolieX commented 5 years ago

Hello,

The adb command shows the correct response and also recognises the 2 devices connected. ANDROID_HOME is also set to the proper path as the same scripts run fine with single device. Kindly let me know if you need any further information.

Regards

On Mon, 22 Apr 2019 at 16:12, Krishnanand B notifications@github.com wrote:

Could this be an issue with ANDROID_HOME path? Can you pls check if adb command throws any error.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/testvagrant/optimusTemplate/issues/42#issuecomment-485336220, or mute the thread https://github.com/notifications/unsubscribe-auth/AKHP3EG72MKAW5OBIRZ3JH3PRVJMPANCNFSM4HGQVT6Q .

--

CAUTION: This email, links and files included in its transmission by Woolworths Group Limited ABN 88 000 014 675 and its group of companies (Woolworths Group) are solely intended for the use of the addressee(s) and may contain information that is confidential and privileged. If you receive this email in error, please advise us immediately and delete it without reading or copying the contents contained within. Woolworths Group does not accept liability for the views expressed within or the consequences of any computer malware that may be transmitted with this email. The contents are also subject to copyright. No part of it should be reproduced, adapted or transmitted without the written consent of the copyright owner.

thenishant commented 5 years ago

Hey @JasWoolieX Can you pls provide the full logs for

1. java.lang.NullPointerException at Starting steps
2. 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:8200
suhasini-Ravi commented 4 years ago

Hey @thenishant, @KrishnB

Even Im facing the same issue when running the tests parallely on Android devices.

The same tests are working fine when running on a single device.

The errors are different for every run

Is there any update on this?

Note: The same tests worked parallely in android when I ran last time a month before.

thenishant commented 4 years ago

Hey @suhasini-Ravi logs will be helpful here, to sort this thing out.

suhasini-Ravi commented 4 years ago

Hey @thenishant , please find the logs attached below.

The same test is working fine when im running on a single device.

It is throwing different errors for each execution.

Kindly look into the issue

Logs:

Error_Android_Parallel.docx

thenishant commented 4 years ago

@suhasini-Ravi the logs state that

  1. it is unable to take a screenshot that could be a problem with ADB shell or device itself.
  2. Socket hang up: potential solutions could be: a. Update the java-client library b. make sure it's not overriding by the selenium API
suhasini-Ravi commented 4 years ago

Hey @thenishant

But the same test works well when I ran on single android device.

The issue is not same all the time when I ran the test.

Some times its throwing null pointer exceptiuon at Starting steps and some times element could not be located.

Not sure what was the issue, since it is working fine when I ran on single device

thenishant commented 4 years ago

Try changing automationName to "UiAutomator1" instead of "UiAutomator2"

suhasini-Ravi commented 4 years ago

Even that didn't worked...

Though the test was running very slowly with UiAutomator1.

thenishant commented 4 years ago

Though the test was running very slowly with UiAutomator1.

This is expected ^^

Can you provide details about: Appium version, java-client, optimus-version

suhasini-Ravi commented 4 years ago

Though the test was running very slowly with UiAutomator1.

This is expected ^^

With the above, I know that UiAutomator1 is very slow and very flaky compared to UiAutomator2.

Please find the required details below.

  1. Appium Version: 1.15.1
  2. Java Version: 1.8.0_221
  3. Optimus Version: 1.5.5
suhasini-Ravi commented 4 years ago

@thenishant, hey now it is working fine with the new Optimus version 3.1.2.

Thank you for the fix :)

Hence the issue can be closed