How to start the Appium server in iOS machine through Java code from Windows 7

I need to automate the test code from my windows machine to iOS simulator, Appium server.

I have my test code in my Windows machine.
I have my Appium server, simulator in the iOS machine.

Currently, I’m manually starting the Appium server in iOS machine and then I’m running the test code in my windows machine.

Now, I need to start the Appium server from the test code (Windows Machine). When the test code started running it should trigger the Appium server in the iOS Machine.

This is my current code:

public static  void startApplication() throws Exception{
        System.out.println("Into iOS");

        DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS");
        capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "8.2");
        capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPad Air");
capabilities.setCapability(MobileCapabilityType.APP,"/Users/selvakumar/Library/Developer/Xcode/DerivedData/InsuranceDemo-bhtkygawfxwcaldbzilyzujfozxd/Build/Products/Debug-iphonesimulator/InsuranceDemo.app");
        driver = new RemoteWebDriver(new URL("http://172.16.9.162:4723/wd/hub"), capabilities); 
        System.out.println("Appium SetUp for Android is successful and Appium Driver is launched successfully");
}

I have mentioned the iOS Machine IP address in the Remote Web Driver to access the ios machine.

How to access the iOS machine Appium server. Suggestions and comments are welcome.

1 Like

Use PLink/PuTTY to remotely trigger Appium server.

@rOKi125 Can you share the procedures or code.

@jonahss Can you give your suggestions please.

If I’m not mistaken the only way to automate iOS tests is to run Appium server on MacOS machine, then connect to it from anywhere.
So you should have MacOS with installed and running Appium anyway.
Look at this video for example Testing iOS apps with Appium: from setup to first test on OS X