APPIUM integration with bitrise

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?

1 Like

Hi @vinitapatil11,

Indeed we don’t have Maven docs or scanner yet. To be honest I don’t remember anyone asking for it, most likely because Android projects now use Gradle. We’ll try to make some time to add those, also feel free to add it yourself, our DevCenter is open source :wink:

Of course it’s still possible to do, all this means is that we don’t have related docs or auto setup (scanner) tool (yet), which means a bit more configuration.

I’d suggest you to register the repo as “Type: Other / Manual”

This will generate a really simple base configuration, which will clone the repository you specify but won’t really do anything else:

53

But you already have the right steps in the workflow, in fact you’re quite close to a first successful build / test! :wink:

All you should do is:

  1. Select the Script step (“Do anything with Script step” in the default config)
  2. Then specify the script (bash by default) which you use to build/test your maven project from Terminal/from Command Line

E.g. if you have a Makefile in your repo it might be as simple as:

#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x

# write your script here
make test

The exact script / commands depend on your setup of course. An important note: you can of course just run a script from your repo too, e.g. to run a ruby script called example_ruby_script.rb stored in the root of the repo:

#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x

# write your script here
ruby ./example_ruby_script.rb

That’s all! :wink:

I hope this helps, if you’d have any questions just let us know! :slight_smile:

How to run .sh/.bat file located at my local machine from bitrise. ?do you have any idea?

I have a similar situation where I have a maven/testng/appium framework in a separate repository and am trying to integrate it in Bitrise

The “do anything script” step looks like:

#Install prerequisite software to run automation tests
apt-cache search maven
sudo apt-get install maven
mvn -version

npm install -g npm
npm -v

npm install -g n 
n 6.3.0

node -v

#Configure node
which node

echo $PATH
export PATH=$PATH:/usr/local/bin/node

echo $PATH

npm install -g appium@1.7.2
appium -v

npm uninstall -g appium
npm install -g npm@4.0.5
npm install -g appium@1.6.5

appium &>/dev/null &

#Run appium automation tests via maven
mvn verify

But I am getting the following error when running my tests:

io.appium.java_client.service.local.InvalidServerInstanceException: Invalid server instance exception has occured: There is no installed nodes! Please install node via NPM (https://www.npmjs.com/package/appium#using-node-js) or download and install Appium app (http://appium.io/downloads.html)

Can anyone suggest anything?

@barthur1234 can you please copy paste the related build’s bitrise.io URL?

@viktorbenei, please see below URL as requested:

Thanks

Once my Appium server is Up and running… it is not navigating to the next command ie: to run my mvn test. Can anyone help how can i make it move to the next command line ie : mvn test ?

Hi @viktorbenei,

Just following up, I was wondering if you were able to access the related build’s bitrise.io URL?
I need to solve this problem rather urgently now, any help would be greatly appreciated.

Thanks

Commit into your repository then follow my script example above ( APPIUM integration with bitrise - #2 by viktorbenei )

@vinitapatil11 & @barthur1234 :

For an Appium setup/config related discussion please see:

If you have a specific issue please either fill out a #issues:build-issues report or use the onsite chat / email to contact our support. We try to do our best to provide support here too, but we can only do that if you fill out a #issues:build-issues report.

Thank you and sorry for the inconvenience!