---
title: Build XCUITest suite
description: How to build and export a XCUITest suite, through XCode or command line.
source_url:
  html: https://testingbot.com/support/app-automate/xcuitest/build-testsuite
  md: https://testingbot.com/support/app-automate/xcuitest/build-testsuite/index.md
---
# Building XCUITest

To test with XCUITest on TestingBot, you will need to build and export the XCUITests you have created.   
 If you do not have a `zip` file of the XCUITest suite, you can follow the examples below.

The `zip` file should contain a folder similar to this:

    xcuitest-sampleUITests-Runner.app

## Using XCode (13 and higher)

1. From the XCode schemes dropdown menu, select your app scheme and **Any iOS Device** as device
2. Click **Product -\> Clean** (`Cmd+Shift+K`)
3. Click **Product -\> Build For -\> Testing** (`Cmd+Shift+U`)
4. Go to **Product -\> Show Build Folder in Finder**
5. In Finder, navigate to **Products -\> Debug-iphoneos**. The directory should contain a file that ends with `-Runner.app`.   
 Right click and choose the compress option to generate a `zip` file.

## Using XCode (Lower than 13.0)

1. From the XCode schemes dropdown menu, select your app scheme and **Generic iOS device** as device
2. Click **Product -\> Clean** (`Cmd+Shift+K`)
3. Click **Product -\> Build For -\> Testing** (`Cmd+Shift+U`)
4. Right click the `.app` file using the Project Navigator, and select **Show in Finder**
5. In Finder, the directory should contain a file called `<AppnameUITests>-Runner.app`.   
 Right click and choose the compress option to generate a `zip` file.

## Using Command Line

To build the `.zip` file from the command line, please follow these steps:

1. Change to the project directory and build for testing:   

    xcodebuild -scheme <scheme-name> build-for-testing

2. Go to the **DerivedData** directory. To know the location of this directory, open Xcode and go to **Preferences -\> Locations**. 
3. Now you can create the zip file. In the **DerivedData** directory, go to the directory containing the name of your app and some random characters.   

    cd appname-random_characters
    cd Build/Products
    cd Debug-iphoneos
    zip --symlinks -r <MyAppUITests>.zip <AppnameUITests>-Runner.app

Was this page helpful? Yes No 

## Looking for More Help?

Have questions or need more information?   
 You can reach us via the following channels:

- [Email us](https://testingbot.com/contact/new)
- [Join our Slack Channel](https://join.slack.com/t/testingb0t/shared_invite/zt-3bcw9xch-jk19~6XPs_xBrsAgAedkCw)
