Kostya
November 20, 2017, 11:46am
1
Hi, guys!
Im trying to launch my Appium tests from Jenkins. It’s working great when i:
Starting Appium server manually (cmd.exe Appium)
Launch tests from Jenkins.
but when i try to launch Appium server from Jenking by using this command:
call node C:\Users\User\AppData\Roaming\npm\node_modules\appium\build\lib\main.js --address 0.0.0.0 --port 4723 --no-reset
Jenkins console returns:
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
and nothing happens. No any errors…just nothing happens.
Can you help me?
Thanks
P.S. Win 7 (64 bit), Appium server 1.7.1 (installed via npm)
Means that Appium started successfully. You should pass the command to the test case folder.
For example in Python, I’ll this:
call node C:\Users\User\AppData\Roaming\npm\node_modules\appium\build\lib\main.js --address 0.0.0.0 --port 4723 --no-reset
pytest -s /Desktop/app/tests/test_login.py
Kostya
November 20, 2017, 12:33pm
3
i have to steps:
launching Appium by command; call node Appium
Then executing Gradle task: clean test
It’s working perfectly without first step, but when i’m adding first step it’s just rerurns [Appium] Appium REST http interface listener started on 0.0.0.0:4723 and nothing happens
you should append your node command with &
Eg:
call node C:\Users\User\AppData\Roaming\npm\node_modules\appium\build\lib\main.js --address 0.0.0.0 --port 4723 --no-reset &
Why should we add &:
The & makes the command run in the background.
Kostya
November 20, 2017, 2:06pm
5
i’ve added this symbol (&) and still nothing happens
Jenkins returns: Appium REST http interface listener started on 0.0.0.0:4723
Gradle Task doesn’t executed.
Can you paste your Jenkins code here. It works perfectly for me:
#!/bin/bash --login -x
appium &
can you try to add a echo ‘hello’ after your node appium line and see if its getting printed?
Kostya
November 20, 2017, 2:33pm
7
this doesn’t work:
#!/bin/bash --login -x
appium &
i’ve added echo ‘hello’ - nothing happens
Kostya
November 21, 2017, 7:40am
8
i activate server logs:
getting this info:
2017-11-21 07:38:25:294 - info: [Appium] Welcome to Appium v1.7.1
2017-11-21 07:38:25:378 - info: [Appium] Non-default server args:
2017-11-21 07:38:25:378 - info: [Appium] sessionOverride: true
2017-11-21 07:38:25:379 - info: [Appium] log: C:\appium\appium.log
2017-11-21 07:38:25:448 - info: [Appium] Appium REST http interface listener started on 0.0.0.0:4723
and nothing happens
Not sure why its not running, which option did you chose in ‘Add Build Step’
Kostya
November 21, 2017, 8:57am
10
I use “Invoke Gradle Script” and tasks:
clean
test
–tests
$Test
where $Test is the tests from choice parameter
The steps which I shared are for ‘Invoke Shell’ option.
I am facing the same issue ! Could someone assist me ?