Before you get started with mobile application testing, you need to get some applications installed on your Windows or Mac computer and ensure these applications are running properly.
Create or define Android device specifications using AVD Manager in case you want to use Android simulators to test your Web, Native, or Hybrid applications.
Ensure you have started Appium server before you start executing your test case.
Ensure you have enabled Developer Option and USB Debugging options on your Android device. For more information please refer to the section, Preparing Mobile Devices for Automation Testing.
Connect Android device with Windows computer and ensure it is connected properly with computer by running the "adb devices -l" command from the Command Prompt window. Make sure your device is listed here (emulator or physical device connected with Windows computer).
Ensure you have enabled Web Inspector and JavaScript options on your iOS device (for Web application testing).
Connect iOS device to your Mac. To ensure device is connected properly to Mac, open Simulator and on the Hardware menu, point to Devices and then click Manage Devices. Make sure device connected with Mac is listed in the left pane here.