# How to integrate Appium(Maven) tests with Bitrise?

**URL:** https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522
**Category:** Question & Answer
**Created:** [January 3, 2019, 3:38pm UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522 "2019-01-03T15:38:07Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![nagulakondavv](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@nagulakondavv](https://discuss.bitrise.io/u/nagulakondavv)
#### Post date: [January 3, 2019, 3:38pm UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522/1 "2019-01-03T15:38:07Z")

</div>

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

---

<div class="post-metadata">

### Author: ![bitce](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/bitce/32/1639_2.png) [@bitce](https://discuss.bitrise.io/u/bitce)
#### Post date: [January 4, 2019, 3:30pm UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522/2 "2019-01-04T15:30:19Z")

</div>

Hi @nagulakondavv!

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

> [@Appium tests / setup](http://discuss.bitrise.io/t/appium-tests-setup/1122):
>
> Hi all, I want to run appium tests for UI testing. This framework requires to run an appium server on the same machine to run the tests. How can I do that with bitrise?

> [@APPIUM integration with bitrise](http://discuss.bitrise.io/t/appium-integration-with-bitrise/4755):
>
> I have created an Maven framework using APPIUM for automating an Android Application and now i want to integrate my appium maven framework with Bitrise. My automation is on a separate repository using Appium. When I try to add an app, there is no support for Maven project, it only provides some options like set “iOS/Android/Fastlane, etc” but not for Maven project. There is no document about it.So I don’t know how to setup my automation build on bitrise, do you have any idea?

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

---

<div class="post-metadata">

### Author: ![nagulakondavv](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@nagulakondavv](https://discuss.bitrise.io/u/nagulakondavv)
#### Post date: [January 7, 2019, 4:49pm UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522/3 "2019-01-07T16:49:09Z")

</div>

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

---

<div class="post-metadata">

### Author: ![bitce](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/bitce/32/1639_2.png) [@bitce](https://discuss.bitrise.io/u/bitce)
#### Post date: [January 8, 2019, 9:15am UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522/4 "2019-01-08T09:15:24Z")

</div>

Could you send us a build URL about this issue?

---

<div class="post-metadata">

### Author: ![nagulakondavv](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@nagulakondavv](https://discuss.bitrise.io/u/nagulakondavv)
#### Post date: [January 8, 2019, 3:43pm UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522/5 "2019-01-08T15:43:13Z")

</div>

Sure.

> **[Bitrise - Mobile Continuous Integration and Delivery](https://app.bitrise.io/users/sign_in)**
>
> Mobile Continuous Integration and Delivery for your whole team, with dozens of integrations for your favourite services.

---

<div class="post-metadata">

### Author: ![fehersanyi-bitrise](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/fehersanyi-bitrise/32/1912_2.png) [@fehersanyi-bitrise](https://discuss.bitrise.io/u/fehersanyi-bitrise)
#### Post date: [January 9, 2019, 1:18pm UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522/6 "2019-01-09T13:18:25Z")

</div>

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

```auto
# 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 🙃

---

<div class="post-metadata">

### Author: ![nagulakondavv](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@nagulakondavv](https://discuss.bitrise.io/u/nagulakondavv)
#### Post date: [January 9, 2019, 4:52pm UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522/7 "2019-01-09T16:52:54Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![nagulakondavv](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@nagulakondavv](https://discuss.bitrise.io/u/nagulakondavv)
#### Post date: [January 9, 2019, 9:05pm UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522/8 "2019-01-09T21:05:58Z")

</div>

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

---

<div class="post-metadata">

### Author: ![fehersanyi-bitrise](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/fehersanyi-bitrise/32/1912_2.png) [@fehersanyi-bitrise](https://discuss.bitrise.io/u/fehersanyi-bitrise)
#### Post date: [January 10, 2019, 7:53am UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522/9 "2019-01-10T07:53:49Z")

</div>

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

---

<div class="post-metadata">

### Author: ![nagulakondavv](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@nagulakondavv](https://discuss.bitrise.io/u/nagulakondavv)
#### Post date: [January 10, 2019, 2:38pm UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522/10 "2019-01-10T14:38:59Z")

</div>

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

---

<div class="post-metadata">

### Author: ![nagulakondavv](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@nagulakondavv](https://discuss.bitrise.io/u/nagulakondavv)
#### Post date: [January 10, 2019, 4:43pm UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522/11 "2019-01-10T16:43:32Z")

</div>

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…

---

<div class="post-metadata">

### Author: ![fehersanyi-bitrise](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/fehersanyi-bitrise/32/1912_2.png) [@fehersanyi-bitrise](https://discuss.bitrise.io/u/fehersanyi-bitrise)
#### Post date: [January 11, 2019, 8:55am UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522/12 "2019-01-11T08:55:48Z")

</div>

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

---

<div class="post-metadata">

### Author: ![nagulakondavv](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@nagulakondavv](https://discuss.bitrise.io/u/nagulakondavv)
#### Post date: [January 11, 2019, 2:18pm UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522/13 "2019-01-11T14:18:44Z")

</div>

ok… here is the build url.

> **[Bitrise - Mobile Continuous Integration and Delivery](https://app.bitrise.io/users/sign_in)**
>
> Mobile Continuous Integration and Delivery for your whole team, with dozens of integrations for your favourite services.

---

<div class="post-metadata">

### Author: ![fehersanyi-bitrise](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/fehersanyi-bitrise/32/1912_2.png) [@fehersanyi-bitrise](https://discuss.bitrise.io/u/fehersanyi-bitrise)
#### Post date: [January 14, 2019, 10:50am UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522/14 "2019-01-14T10:50:57Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![nagulakondavv](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@nagulakondavv](https://discuss.bitrise.io/u/nagulakondavv)
#### Post date: [January 14, 2019, 5:44pm UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522/15 "2019-01-14T17:44:29Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![koral](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/koral/32/357_2.png) [@koral](https://discuss.bitrise.io/u/koral)
#### Post date: [January 14, 2019, 7:37pm UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522/16 "2019-01-14T19:37:24Z")

</div>

> [@nagulakondavv](#):
>
> 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.

---

<div class="post-metadata">

### Author: ![fehersanyi-bitrise](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/fehersanyi-bitrise/32/1912_2.png) [@fehersanyi-bitrise](https://discuss.bitrise.io/u/fehersanyi-bitrise)
#### Post date: [January 15, 2019, 9:13am UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522/17 "2019-01-15T09:13:28Z")

</div>

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

```auto
# 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!"

```

---

<div class="post-metadata">

### Author: ![nagulakondavv](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@nagulakondavv](https://discuss.bitrise.io/u/nagulakondavv)
#### Post date: [January 15, 2019, 3:06pm UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522/18 "2019-01-15T15:06:59Z")

</div>

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](https://app.bitrise.io/build/0dd4f7adb49aab20)

---

<div class="post-metadata">

### Author: ![fehersanyi-bitrise](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/fehersanyi-bitrise/32/1912_2.png) [@fehersanyi-bitrise](https://discuss.bitrise.io/u/fehersanyi-bitrise)
#### Post date: [January 23, 2019, 8:19am UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522/19 "2019-01-23T08:19:12Z")

</div>

Hello there!

I would stat looking around these two lines first

```auto
/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.

---

<div class="post-metadata">

### Author: ![laxmikantm](https://avatars.discourse-cdn.com/v4/letter/l/e495f1/32.png) [@laxmikantm](https://discuss.bitrise.io/u/laxmikantm)
#### Post date: [February 18, 2019, 4:09pm UTC](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522/20 "2019-02-18T16:09:01Z")

</div>

Hi,

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

Kindly provide link to any relevant documentation

Thanks

[Next page](https://discuss.bitrise.io/t/how-to-integrate-appium-maven-tests-with-bitrise/7522.md?page=2)
