Skip to main content

Filters for XCUI Tests


Usually, all the test cases of your XCUI test suite are executed, but there is a way to filter these. You can specify some selected classes or tests, which provides you with options to filter the test cases which you want to execute.

To filter the test cases, you just need to pass the suitable parameters in LambdaTest’s REST API request. Refer to the table below to understand how to use various filters provided by LambdaTest.

Given below is the REST API endpoint:

POST   /framework/v1/xcui/build
ParametersDescriptionValuesDatatype
only-testingAllows the user to run only those tests/classes provided in the listValues can be of the following format: className or className/testName. E.g. ["Class1/Test1", "Class2"]Array
skip-testingAllows the user to run all the tests/classes except the ones provided in the listValues can be of the following format: className or className/testName. E.g. ["Class1/Test1", "Class2"]Array

XCTest Plan

This will only be used for filtering tests using xctestplan. You can use the following capability in xcui/build api: "xctestplan" : "lt://APP1234567891234567890" and use the following curl to upload xctestplan file.

curl --location --request POST 'https://manual-api.lambdatest.com/app/xctestplan' \
--header 'Cookie: cf_use_ob=0' \
--header 'Authorization: Basic <Enter_Basic_Auth>' \
--form 'appFile=@"/path/to/file"' \
--form 'type="xctestplan"'
Note

You can not use the following filters simultaneously.

  • only-testing and skip-testing
  • xctestplan and only-testing/skip-testing