Android – how to run appium test scripts through Jenkins

I am a novice of appium and Jenkins' test framework. My question is, can I run appium test scripts through Jenkins? If possible, please provide links or examples

Thank you for moving forward

resolvent:

Step 1: install Jenkins in the system. Please visit the Jenkins website in the browser. In my local system, I use“ http://localhost:8080 ”Visit Jenkins

Step 2: click "new project", "freestyle project" > "OK"

Step 3: scroll to the build section > add build step > execute shell and enter the following command:

#!/bin/bash --login -x
appium &
sleep 5s

Step 4: click "build now"

Step 5: open the running job > console output to ensure that the appium server is running

The following text should appear in the console log:

[Appium] Welcome to Appium v1.6.4
[Appium] Appium REST http interface listener started on 0.0.0.0:4723

Step 6: all test scripts should be placed in the "workspace" directory of Jenkins. My scripts are located in the following location: / users / shared / Jenkins / home / workspace / appium Android/

Step 7: I use pytest in Python, so my command is as follows:

cd $WORKSPACE
pytest /Users/Shared/Jenkins/Home/workspace/appium-android/tests/listings/test_listing_create.py

Ensure that all dependencies are installed on Jenkins machine, such as python, appium, python client, appium server, etc

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>