How To Run Same Script In Multiple Devices Using Appium
The most effective method to Run the Same Script in Multiple Devices Using Appium
In the event that you’ve at any point considered how to run similar content in numerous gadgets, look no farther than this article. You’ll figure out how to set up and run similar content on various gadgets utilizing Appium. This post will show a couple of strategies for doing this.

In this article I will explain you how to run same script on multiple devices at a same time using Appium.
First Step is to find the devices and their UUIDs.
First Step is to Find the Devices and their UUIDs. In this tutorial, we will run the test script on iPhone 6 and iPad Pro devices.
To find the device names or UUIDs you can use Appium’s inspectDevices method as follows:
Second Step is to connect the device with adb.
Now that you have connected your device with adb, you need to run a test script. Now there are two ways of doing this:
- Run The Script In Command Line
- Run The Script Using Appium-Sauce (Recommended)
If you are a beginner and don’t have much knowledge about scripting, then it is recommended that you use Appium-Sauce to run the script. It has a very easy user interface and will help you quickly get started with web automation.
However, if you are an experienced developer and want to understand the basics of scripting, then it is recommended that you use the command line. It will help you grasp more concepts of web automation and scripting.
Let’s take a look at both ways of running the script: Using The Command Line To Run The Script
The command line is a very powerful tool that allows you to run your scripts in the background. You can use it to parse through your script and find errors if any, as well as save time by running tests in parallel. To run the script using command line: Open up a new terminal window Navigate to the directory where your script is located Run adb -e logcat YourScriptNameHere
Your script will start executing. You can see the output in your terminal window.
If you want to use Appium-Sauce, then open up a new terminal window and run it.
Appium-Sauce is a great tool that can help you with web automation testing. It’s easy to use and will help you get started quickly. But if you are an experienced developer, then it’s recommended that you use the command line instead.
Third Step to create a new device configuration file for each device and change the port no for each file.
- Create a new configuration file for each device
- Change the port number for each file
- Save the file
Configure the device to use the new port number
The steps to configure a Wi-Fi device are: Open the configuration file for each device Change the port number Save the file Configure the device to use the new port number
Fourth Step to add the this configuration file in Appium configuration tabs where you want to run your multiple instance.
Add the this configuration file in Appium configuration tabs where you want to run your multiple instance.
Import the file in the Appium server.
Now run your script using this command: “`./node_modules/.bin/appium –remote-debugger-port=9000“`
You can also use the Appium inspector to debug your script.
This is a great way to debug your script. You can also use the Appium inspector to debug your script. This is a great way to debug your script.
You can run your test script on multiple devices at a same time using Appium.
You can run your test script on multiple devices at a same time using Appium.
To do this, you need to follow following steps:
- Select the device and click “Start” button.
- Once connected, start Appium server with following command: appium -e :4723 (where is the IP of your machine). This will open a window of Appium server which will show available testing devices in your network (see image below).
Click “Start” button again, which will automatically connect to the Appium server and run your test script on multiple devices at a same time.
Conclusion
Running a test script on multiple devices at the same time is a very useful feature. You can use this feature to run tests in parallel without having to wait for each device. So, now you know how to run your test script on multiple devices and automate them with Appium.