Xcode Test Plan feature

Important: This document only applies to real devices. For virtual devices, see the relevant article under Virtual mobile devices.

Perfecto supports the Test Plan feature available in Xcode 11 and later. This means that you can perform quick and easy test filtering from the Test Plan options in Xcode, available by selecting the Test Plan file in your project. When this file is selected, Xcode displays all tests along with their targets, classes, and methods, and you can use the Filter field at the bottom to filter for a specific test. You can also enable or disable tests as needed.

Restriction: Perfecto only supports test filtering from the Test Plan options, not any other Test Plan functionality. In addition, with XCTest Test Plan, you cannot use the testMethodNamesparameter.
Important: This document includes references to a third-party product, Apple Xcode. The user interface and usage of third-party products are subject to change without notice. For the latest published information about Apple Xcode, see https://developer.apple.com/documentation/xcode.

Prerequisites

Download the updated Gradle plugin. For more information, see Install the Perfecto Gradle plugin manually

Setup

To use Test Plan with Perfecto for the purpose of test filtering, you need to add the following parameter either in your configuration file or through the command line, as follows:

  • In your JSON config file:

    Copy
    "testPlanPath": "testPlan.xctestplan"
  • Through the command line:

    Copy
    gradle perfecto-xctest -PtestPlanPath= "testPlan.xctestplan"

You can add a path to your computer or a location in the Perfecto repository. For example: repository://PUBLIC:testPlan.xctestplan