How to launch Windows Appium 1.6.4 server from command line?


Does anyone know how to launch Windows Appium server v1.6.4 from the command line without launching the GUI and pressing the ‘Start Server’ button?

Some background:
I have some automation which uses an old Windows version of Appium which I am in the process of upgrading to use Appium v 1.6.4.

I am able to launch the old Appium server from the Windows command line like so:

node.exe c:\Appium\node_modules\appium\bin\appium.js -a --platform-name Android …

I use this to launch the old Appium server from my Jenkins server.

I cannot find a way to launch Appium Server 1.6.4 without launch the GUI first meaning I’m blocked launching from Jenkins.

Any help appreciated

Appium 1.6.4 launches by just typing appium on command line on mac.

Running Appium.exe on Windows launches the GUI, from where I have to press the ‘Start Appium Server 1.6.4’ button.

I want to bypass the GUI and launch the Appium Server straight away so that I can launch the appium server from Jenkins.

I have managed to get this working by installing node.js (the old version of Appium came with node.exe) and using this to launch APPIUM_INSTALL_LOCATION\resources\app\node_modules\appium\build\lib\main.js

1 Like

you could add a shell/batch script and run it from Jenkins, but jenkins will not allow you running tests. As it needs to come out of first process to start another one.

It is better you start Appium from your test code.

AppiumDriverLocalService class can be used to launch appium server programmatically, put below code before you initialize the driver object:-

AppiumDriverLocalService service = AppiumDriverLocalService.buildService(new AppiumServiceBuilder().usingAnyFreePort());

Thank you for your suggestions. I will look in to start appium from my tests. I am using c# and more details on how to do that using c# :

I am currently launching my tests from Jenkins using Nunit from the windows command line, generating a results file and using the Jenkins nunit plugin to process the results file

1 Like