buttons

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

 

[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:

Press enter or click to view image in full size

Step-2: Scroll along the appium logs & find the Client details(URL):

Observe that in the Server logs, we find the client details(URL)

Press enter or click to view image in full size

Copy the details(URL)

http://127.0.0.1:4723/wd/hub

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);
Press enter or click to view image in full size

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

Press enter or click to view image in full size

No comments:

Post a Comment