logo logo

Setup iOS Test Automation on Windows using TestProject

main post image

TestProject enhances Appium’s driver and enables you to run iOS test automation on Windows operating system, without the need for macOS or Xcode!
The first thing you have to do is to get a TestProject account, no worries – it’s free! Then, you’ll have to follow this step-by-step tutorial to setup your iOS settings, and you’ll be good to go to start your iOS test automation projects.


Tutorial Overview

  1. Step 1 – Prerequisites
  2. Step 2 – Get your Apple’s Developer Program Team ID
  3. Step 3 – Create a Certificate Signing Request (CSR)
  4. Step 4 – Create your Mobile Provisioning Profile
  5. Step 5 – Record or Develop iOS Test Automation using TestProject

Let’s get started!


Step 1 – Prerequisites

1.1. You need the TestProject Agent to be installed and running on your computer.
1.2. You must have an active Apple Developer Account (Notice that this is not the same as Apple ID).

Step 2 – Get Your Apple’s Developer Program Team ID

The first thing you need to do is to provide your Apple’s Developer Program Team ID from Apple Developers Portal. The Team ID is a 10-character string that’s generated by Apple to uniquely identify your team. You can get it by following these steps: 

2.1. Click on “Membership”:

iOS test automation*Note that you have to have the “Apple Developer Program” label (as seen in the image above). If you don’t have this label, it means that you only have a simple Apple ID and that you do not have an Apple Developer Program subscription (As required in the prerequisites above in step 1.2). 

2.2. Copy your Team ID:

iOS test automation

2.3. Open another tab with your TestProject account, click on your name at the upper right corner, click on “Account” and then click on “iOS” in the setting’s left menu (you will reach this page). Enter the Team ID you copied from Apple Developer Account’s Membership screen (step 2.2 above):

iOSonWindows_2.3

Step 3 – Create a Certificate Signing Request (CSR)

In order to sign the driver with your certificate, you need to create a Certificate Signing Request (CSR).

3.1. On TestProject’s iOS settings page, generate a new “Certificate Signing Request (CSR)”, by clicking “Generate new” and download a certificate signing request file:

iOSonWindows_3.1

 

3.2. Go back to Apple Developers Portal and upload the CSR file generated by TestProject (in step 3.1 above). First, you need to click on “Certificates, IDs & Profiles”:

iOS test automation

3.3. Then, click on the “plus” icon at the upper right side of the screen:

iOS test automation

3.4. Then, choose “iOS App Development” and click “Continue”:

iOS test automation

 

3.5. Now, upload the CSR file generated by TestProject (in step 3.1 above):

iOS test automation

3.6. Download the certificate:

iOS test automation

3.7. You should be able to see your certificate on the list below:

iOS test automation

3.8. Now, you have to upload the certificate generated by Apple to TestProject. Head back to TestProject’s iOS settings page, and click “Upload New” in the “Certificate” section:

iOSonWindows_3.10

 

Step 4 – Create your Mobile Provisioning Profile

Back in the Apple Developer Portal, you need to complete the provisioning process. The provisioning profile is used by Apple to list the eligible devices where the driver can be installed.

4.1.  Under “Profiles”, click on the “plus” icon:

iOS test automation

4.2. Click on “iOS App Development” and click “Continue”:

iOS test automation4.3.  Now you need to choose the App ID.
*Important: Make sure to choose the “Wildcard” option.

Then, click “Continue”:

iOS test automationOnly in case you don’t have a “Wildcard” option in the dropdown (as seen in the image above), you will need to create the Wildcard App ID manually by completing the steps described here: https://blog.testproject.io/2019/01/29/create-wildcard-app-id-ios/.

4.4. Select the certificate you have created in step 3.7 above, and click “Continue”:

4.5. Select your devices and click “Continue”:

4.6. Give your profile a name, and click “Generate”:

4.7. Now you need to download the newly generated provisioning profile:

4.8. Now, go back to TestProject’s iOS settings page, under “Provisioning Profile”, click “Upload new” and upload the provisioning file you have downloaded in step 4.7 above.

iOSonWindows_4.8

 

That’s it!  😉 
If you’ve followed all of the steps above, you should see a toast popup in TestProject’s Platform informing you that the provisioning has been completed successfully, and you will see a list of all eligible devices you can use with TestProject for your iOS test automation (on ALL operating systems, even iOS on Windows!).

If you see a toast with an error, go over this guide again and check the most common errors:

  1. The certificate you uploaded to TestProject was not the one that was generated using TestProject CSR (Certificate Signing Request). Go back to step 3.
  2. You selected the wrong App ID (You must choose the Wildcard option). Go back to step 4.3.
  3. The provisioning profile you uploaded does not contain the certificate that was generated using TestProject’s CSR. Go back to step 4.4.

 

Step 5 – Record or Develop iOS Test Automation using TestProject

With TestProject you can record your iOS tests from a Windows machine, or you can develop your tests using TestProject’s Java, Python or C# SDKs. Either way, we’ve got you completely covered!

So, what are you waiting for?
Go ahead and start testing your iOS Apps!  😎

 

For any questions or assistance, feel free to leave a comment below or contact us using one of our support channels:

  1. TestProject’s in-app chat
  2. Active forum
  3. Email us at [email protected]
Amit Yahav

About the author

Amit Yahav

Backend developer & Test automation solution architect at TestProject.
Father of one, tech geek and Manchester United fan!

Join TestProject Community

Get full access to the world's first cloud-based, open source friendly testing community. Enjoy TestProject's end-to-end test automation Platform, Forum, Blog and Docs - All for FREE.

Join Us Now  

Comments

19 15 comments
  • Avatar
    Nicole Zeckner November 18, 2019, 8:52 pm

    Has something changed with creating a profile? I do not see the “+” to add a new profile.

  • Avatar
    suma February 25, 2020, 1:10 pm

    i connected a device with USB. But it is not identifying the device in the test project while creating the new test.

  • Avatar
    Sagi Mann July 12, 2020, 8:49 am

    I’m using a Mac with xcode, can I run an iOS test on one of the simulators or just on a real connected device?

    • Amit Yahav
      Amit Yahav July 13, 2020, 5:32 am

      Hi Sagi,
      To run your test on iOS devices, you need to either connect a physical device or use a cloud device from BrowserStack/Sauce Labs. At the moment, a local iOS simulator is not supported.

  • Avatar
    Mayank Shukla July 20, 2020, 8:57 am

    Hi Amit,
    Steps here are explained for a project which does not have any certificate in iOS developer.apple.com.
    But what if we already have all the certificates in place in developer.apple.com and we want to use that in testProject.com?
    Can you please help with that.

    • Amit Yahav
      Amit Yahav July 20, 2020, 9:07 am

      Hi Mayank,
      It’s very important to follow all the steps in this tutorial. Even if you already have certificates in your Apple developer account.
      You cannot use your existing certificates because you need to create one that includes the CSR file generated by TestProject.
      If you need any help with that, please contact our support team through the in-app chat 🙂

  • Avatar
    Nevena C July 21, 2020, 6:27 pm

    Hi Amit,
    To be able to follow your tutorial, I would have to purchase Apple Developer Program license for $119 in order integrate TestProject. Have I understood this correctly?

    • Amit Yahav
      Amit Yahav July 22, 2020, 5:48 am

      Hi Nevena,
      In order to develop or test iOS applications, Apple requires you to have an active developer account. In TestProject, we merely providing you the ability to test your iOS applications on any OS and not just on MAC OS. No matter what automation framework you have, you will have to subscribe to Apple’s developer program.
      Please let me know if there’s anything else I can help you with 🙂

  • Avatar
    Jin Jeong August 13, 2020, 3:10 am

    I have followed your tutorial and I created a new test, however, I keep fail to create one.
    “Error
    Failed to create driver session. Check device is configured for automation and try again.”
    This message above pops up every time I try to make a test and connect a test phone. I tried other devices, but it still gives me a same message.

    • Amit Yahav
      Amit Yahav August 13, 2020, 10:25 am

      Hi Jin,
      Thanks for reaching out!
      Did you complete all the steps in the tutorial exactly as described? It’s very important that you will create a new certificate based on the generated CSR from TestProject. Also, when creating the provisioning profile, make sure to include that certificate.
      If you followed all the steps and it’s still doesn’t work, please contact our support team via the support chat (you’ll find it at the bottom-right corner of the screen in our website).

      Thanks,
      Amit

  • Avatar
    Erick Caceres October 6, 2020, 9:55 pm

    Hey Amit, this is awesome and really appreciated in it’s thoroughness and completion of getting someone set up to automate on an iOS device. I think something that would be an extra step is if you created another blog post to reference here about registering a new device.

    Thanks again!

    • Amit Yahav
      Amit Yahav October 7, 2020, 5:25 am

      Hi Eric,
      Thank you for your kind feedback!
      Once you completed the iOS configuration process, all you need to do is plug in your iOS device. The registration of the new device is done automatically.
      Thanks,
      Amit

Leave a Reply

popup image

Appium for Teams

Sharing and distributing Appium tests has never been so easy! With TestProject's FREE Appium based platform, you can finally create awesome tests with the freedom to collaborate with your team effortlessly.
Sign Up Now right arrow
FacebookLinkedInTwitterEmail