Run appium server programmatically using java

As we already got to know from our earlier post Appium test run,  always run appium server  / appium GUI before running your appium test.

While running automated tests, we have to manually run the appium server / GUI first.


let’s say that we have to schedule our appium tests to run (may be a nightly build test) and we won’t be at desk or office to run the appium server first.


We can write a java code block to run the appium server before running our actual appium test, then we need to do anything manually.


Update, if you are using appium-desktop v1.4.x or appium v1.7.2 onwards

From appium-desktop v1.4.x onwards, appium installing under –



  • You should install node.exe [from]
  • Maven dependency for appium

  • Appium-desktop or appium should be installed, find links below [Appium-desktop installation is recommend ]

Appium-desktop download –

Only Appium download –

Code implementation


For older version of appium


  • Download and install appium.exe (refer step6 of appium setup)
  • Install node.exe (refer step7 of appium setup)
  • Jar file – you may get error while running the appium programmatically, validator or lang3 error, include these below jars in to your project

commons-validator-x.x.x.jar – download here

commons-lang3-x.x.jar – download here

Let’s see how we can achieve this – 

below code will automatically run the appium server and after run the appium test.

You can provide path for AppiumServerlog.txt as per your local drive path, I mentioned the project folder path.


Content posted is based on learning or working experience,
Share the post with others if find useful,
Any queries?, leave comments or discuss on our, Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *