Lunch appium server programmatically from my jenkins machine

Hi,

I am trying to reuse our existing Jenkins setup to run appium tests
I have set up a Mac machine with devices connected to it on usb. And i would like to be able to control the initiation and termination of appium servers programmatically.

I’m using an ssh java client library to control the execution of appium server.
however when i try to execute using my java code I am getting a message for:

appium: command not found

I have verified that the path variables are the same and I am login in with the same user i use when i run appium manually on this machine.

is there a way to execute/terminate appium server remotely other then ssh?
or if using ssh what am I missing?

Thanks

Looks like Appium is not on the $PATH of the user you are ssh’ing as (possibly the jenkins user?). What I personally would do is to cd to the Appium install and issue the commands from there. That’s probably the easiest way to tackle this, but you could also try adding Appium to the $PATH.

how you installed Appium?

to run “appium” in command line on Mac you need do:

  • brew install node
  • npm install -g appium
  • npm install wd

now you can run like ‘appium’.

another way if you installed appium as GUI only. then you need run appium in another way. look on this forum = many answers.

Did same ,but issue is while starting appium from jenkins with bellow command

#!/bin/sh +e
appium -address 127.0.0.1 -p 4545

and error is appium: command not found

Please help.
AjitJ

Did you use -g ? g means global install.

npm install -g appium

Similar issue,

I can run appium command from jenkins local machine but when I try to run same appium command from jenkins server I got this error message; appium:command not found.