[appium-device-farm-4] — Run Your First Test Script with “Appium Device Farm” plugin

Get a step-by-step walkthrough in the video below!
Inthis article, we will walk you through how to run your first test script using the Appium Device Farm plugin.
In 4 easy Steps:
Step-1: Start Appium Server with Device-Farm plugin:
Step-2: Scroll along the appium logs & find the Client details(URL):
Step-3: Do Required Changes in the Script:
Step-4: Execute the script:
Detailed step-by-step instructions are provided below:
Step-1: Start Appium Server with Device-Farm plugin:
Command:
appium server -ka 800 --use-plugins=device-farm -pa /wd/hub --plugin-device-farm-platform=android
Example:

Step-2: Scroll along the appium logs & find the Client details(URL):
Observe that in the Server logs, we find the client details(URL)

Copy the details(URL)
URL — Breakdown:
— address : 127.0.0.1
— port : 4723
— basepath: /wd/hub
Step-3: Do Required Changes in the Script:
Just the add/change the URL to “http://127.0.0.1:4723/wd/hub"
driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), cap);

Complete Script — https://github.com/AppiumGuide/AppiumGuide/blob/main/src/test/java/com/appiumguide/devicefarm/devicefarm_firstscriptdemo.java
Step-4: Execute the script:
Observe that user able to execute the script using Device Farm plugin

GitHub Link:
π¬ Explore More! Watch My Latest Videos on YouTube!
Visit My Official Blog:
No comments:
Post a Comment