How to integrate Appium(Maven) tests with Bitrise?

How I need to integrate Appium(Maven) Mobile app automation tests with Bitrise?

Hi @nagulakondavv!

Thanks for your question! Please see these related discussion as they might be of help to you:

But do not hesitate to elaborate on your specific use case and let us know any other questions you may have! :slight_smile:

Hi, Thanks for yoiur reply.

I am getting ā€œremote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not find a connected Android device.ā€ as a error

Could you send us a build URL about this issue?

Sure.

Hy @nagulakondavv!

In this build, after your vdt step succeeds there is a start android emulator, that is missing inputs, and there is no emulator running, for that I recommend using this script

# fail if any commands fails
set -e
# debug log
#set -x

cd $ANDROID_HOME/emulator

echo no | avdmanager create avd -n Nexus_5X_API_26 -k "system-images;android-26;google_apis;x86" --force

emulator -avd Nexus_5X_API_26 -no-window -no-audio -debug-init > /dev/null 2>&1 &

echo "Waiting emulator is ready..."

adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82'

echo "Emulator is ready!"

but it is IMPORTANT that you use the Ubuntu docker LTS stack.
and put this script step to maybe the second place in the build :upside_down_face:

For the Device testing do we really required Start android emulator step?

and Can you tell me the step needed to execute the automation scripts.

Added the script for start android emulator. execution aborted after waiting for 5400 sec

it may be that the script starts up the emulator so the start step is not required.

If I removed the start emulator step then getting UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not find a connected Android device.ā€ as a error

And adding to the above error message.

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] TestCases.openApp:28 Ā» WebDriver It is impossible to create a new session becaā€¦

Hey, could you please send me the buildā€™s url?
these snippets usually are way to short to really understand the situation.

okā€¦ here is the build url.

Hy @nagulakondavv!

so it seems you want to run device tests, but there is no device to run them on. but the VDT step succeeded, what are the tests that run on it? arenā€™t those the same?

ok. how I need to do the device test? how can I get rid of ā€œNo device connected issueā€

Yes, VDT step is succeeded but in vdt step its just opened the App in a emulator and closed other than that nothing went in vdt step. Do I need to provide any path in vdt step to get the automation code from GIT and execute?

You need to build appropriate testing APK first in prior steps.
VDT cannot be used with Appium.

1 Like

Then could you try change stack to the LTS ubuntu and start up an emulator with this script at the beggining of the build?

# fail if any commands fails
set -e
# debug log
#set -x

cd $ANDROID_HOME/emulator

echo no | avdmanager create avd -n Nexus_5X_API_26 -k "system-images;android-26;google_apis;x86" --force

emulator -avd Nexus_5X_API_26 -no-window -no-audio -debug-init > /dev/null 2>&1 &

echo "Waiting emulator is ready..."

adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82'

echo "Emulator is ready!"

Did that and got a different issue. seems emulator issue was resolved.

Error: org.openqa.selenium.WebDriverException:
It is impossible to create a new session because ā€˜createSessionā€™ which takes HttpClient, InputStream and long was not found or it is not accessible. what does it mean?

Build URL: https://app.bitrise.io/build/0dd4f7adb49aab20

Hello there!

I would stat looking around these two lines first

/bitrise/src/android/gradlew: eval: line 161: unexpected EOF while looking for matching `"'
/bitrise/src/android/gradlew: eval: line 162: syntax error: unexpected end of file

could be that there is a not closed string maybe.

Hi,

How to achieve this i.e. Appium using WebDriverIO /Mocha?

Kindly provide link to any relevant documentation

Thanks