Skip to main content
No Result Found

Test suites

In order to test your native and hybrid apps on BrowserStack using XCUITest, you also need to upload your test-suite (.zip file) to BrowserStack servers. Use our REST API endpoints to upload and manage your test-suites on BrowserStack.

Upload a test-suite

POST /app-automate/xcuitest/v2/test-suite

Upload an XCUI test-suite (.zip file). There are two ways to upload the test-suite :

  1. Upload from filesystem : Use this option if your test-suite resides on your local machine or CI/CD server.
  2. Upload using public URL : Use this option when the test-suite is hosted on a remote server (e.g. S3 bucket) and its downloadable via a publicly accessible URL.

Request Parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/test-suite" \
-F "file=@/path/to/test/file/app-debug-SampleXCUITest.zip" \
-F "custom_id=SampleTest"
  • file File

    File to upload. Ensure that the request’s content type is set to multipart/form-data. In cURL, you can do this using -F option. Either file or url parameter is required.

  • url String

    Remote URL to your test-suite. Ensure that its a publicly accessible URL as BrowserStack will attempt to download the test-suite from this location. Either file or url parameter is required.

  • custom_id String

    Custom ID for the test-suite. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.Refer to our custom ID documentation to know more.

Response Attributes 200 application/json

Response

{
    "test_suite_name": "app-debug-SampleXCUITest.zip",
    "test_suite_url": "bs://89c874f21852ba57957a3fdc33f47514288c4ba1",
    "test_suite_id": "89c874f21852ba57957a3fdc33f47514288c4ba1",
    "uploaded_at": "2020-09-09 15:35:00 UTC",
    "custom_id": "SampleTest",
    "shareable_id": "Steve/SampleTest",
    "framework": "xcuitest",
    "expiry": "2020-10-09 15:35:00 UTC",
}
  • test_suite_name String

    Filename of the uploaded test-suite.

  • test_suite_url String

    Unique identifier returned upon successful upload of your test-suite on BrowserStack. This value can be used later to specify the test-suite for your XCUI test execution.
    Example: bs://c8ddcb5649a8280ca800075bfd8f151115bba6b3

  • test_suite_id String

    Unique identifier returned upon successful upload of your test-suite on BrowserStack.
    Example: c8ddcb5649a8280ca800075bfd8f151115bba6b3

  • uploaded_at String

    Test-suite upload timestamp.

  • framework String

    Name of the automation framework. This is set to xcuitest by default.

  • custom_id String

    Custom ID defined for the uploaded test-suite.
    Example: SampleTest. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.

  • shareable_id String

    Shareable ID allows other users in your organization to test with an XCUI test-suite you uploaded .
    Example: steve/SampleTest

  • expiry String

    By default, an uploaded test-suite expires in 30 days. Upon expiry, the uploaded test-suite is deleted from BrowserStack servers and thus can no longer be tested.

List uploaded test-suites

GET /app-automate/xcuitest/v2/test-suites

Retrieve a list of recently uploaded test-suites. By default, it returns the last 10 uploaded test-suites from your BrowserStack group.

Request Parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/test-suites"

No parameter required.

Response Attributes 200 application/json

Response

{
  "test_suites" : [
    {
      "test_suite_name": "app-debug-SampleXCUITest.zip",
      "test_suite_url": "bs://89c874f21852ba57957a3fdc33f47514288c4ba1",
      "test_suite_id": "89c874f21852ba57957a3fdc33f47514288c4ba1",
      "uploaded_at": "2020-09-09 15:35:00 UTC",
      "custom_id": "SampleTest",
      "shareable_id": "Steve/SampleTest",
      "framework": "xcuitest",
      "expiry": "2020-10-09 15:35:00 UTC"
    },
    {...}
   ]
}
  • test_suites Array[Object]

    List of recently uploaded test-suites.

    SHOW VALUES
    • test_suite_name String

      Filename of the uploaded test-suite.

    • test_suite_url String

      Unique identifier returned upon successful upload of your test-suite on BrowserStack. This value can be used later to specify the test-suite for your test execution.
      Example: bs://c8ddcb5649a8280ca800075bfd8f151115bba6b3

    • test_suite_id String

      Unique identifier returned upon successful upload of your test-suite on BrowserStack.
      Example: c8ddcb5649a8280ca800075bfd8f151115bba6b3

    • uploaded_at String

      Test-suite upload timestamp.

    • framework String

      Name of the automation framework. This is set to by default.

    • custom_id String

      Custom ID defined for the uploaded test-suite.
      Example: SampleTest. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.

    • shareable_id String

      Shareable ID allows other users in your organization to test with an test-suite you uploaded .
      Example: user/SampleTest

    • expiry String

      By default, an uploaded test-suite expires in 30 days. Upon expiry, the uploaded test-suite is deleted from BrowserStack servers and thus can no longer be tested.

Get test-suite details

GET /app-automate/xcuitest/v2/test-suites/{test_suite_id}

Get details of an uploaded test-suite.

Request Parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/test-suites/{test_suite_id}"
  • test_suite_id* String

    Test-suite ID of the uploaded test-suite.

Response Attributes 200 application/json

Response

{
  "test_suite" : {
    "test_suite_name": "app-debug-SampleXCUITest.zip",
    "test_suite_url": "bs://89c874f21852ba57957a3fdc33f47514288c4ba1",
    "test_suite_id": "89c874f21852ba57957a3fdc33f47514288c4ba1",
    "uploaded_at": "2020-09-09 15:35:00 UTC",
    "custom_id": "SampleTest",
    "shareable_id": "Steve/SampleTest",
    "framework": "xcuitest",
    "expiry": "2020-10-09 15:35:00 UTC",
  }
}
  • test_suite Object

    Details of the uploaded test-suite

    SHOW VALUES
    • test_suite_name String

      Filename of the uploaded test-suite.

    • test_suite_url String

      Unique identifier returned upon successful upload of your test-suite on BrowserStack. This value can be used later to specify the test-suite for your test execution.
      Example: bs://c8ddcb5649a8280ca800075bfd8f151115bba6b3

    • test_suite_id String

      Unique identifier returned upon successful upload of your test-suite on BrowserStack.
      Example: c8ddcb5649a8280ca800075bfd8f151115bba6b3

    • uploaded_at String

      Test-suite upload timestamp.

    • framework String

      Name of the automation framework. This is set to by default.

    • custom_id String

      Custom ID defined for the uploaded test-suite.
      Example: SampleTest. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.

    • shareable_id String

      Shareable ID allows other users in your organization to test with an test-suite you uploaded .
      Example: user/SampleTest

    • expiry String

      By default, an uploaded test-suite expires in 30 days. Upon expiry, the uploaded test-suite is deleted from BrowserStack servers and thus can no longer be tested.

Delete a test-suite

DELETE /app-automate/xcuitest/v2/test-suites/{test_suite_id}

Delete an uploaded test suite. Note that test suites once deleted cannot be recovered.

Request Parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X DELETE "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/test-suites/6c4a46de7b0361585594fd3e5464bddff95d581b"
  • test_suite_id* String

    Test-suite ID of the uploaded test-suite.

Response Attributes 200 application/json

Response

{
    "success": {
        "message": "Test Suite with url bs://6c4a46de7b0361585594fd3e5464bddff95d581b was deleted."
    }
}
  • success Object

    This is returned when the test-suite is successfully deleted from BrowserStack servers.

    SHOW VALUES
    • message String

      Confirmation message for test-suite deletion.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Download Copy Check Circle