Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add xctest support #1005

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

rillgen-saucelabs
Copy link

Description

Adds xctest test type support. Unlike xcuitest it doesn't require a "test" .ipa but a xctestrun file which is an Apple plist format as a descriptor. Here is what the configuration looks like:

apiVersion: v1alpha
kind: xctest
sauce:
  metadata:
    build: XCUITest Basic
  concurrency: 1
xctest:
  app: /Users/ricardoillgen/projects/saucelabs/rdc-xcuitest-test/apps/FlutterTestApp.ipa
  xcTestRunFile: /Users/ricardoillgen/projects/saucelabs/rdc-xcuitest-test/FlutterTest.xctestrun
suites:
  - name: "Basic XCTest"
    devices:
      - name: $DEVICE_NAME
        platformVersion: $PLATFORM_VERSION
artifacts:
  download:
    when: always
    match:
      - junit.xml
    directory: ./

@rillgen-saucelabs rillgen-saucelabs added the enhancement New feature or request label Jan 17, 2025
@rillgen-saucelabs rillgen-saucelabs requested a review from a team as a code owner January 17, 2025 17:43
Copy link
Contributor

@alexplischke alexplischke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Json Schema

Missing json schema update 🙏 See https://github.com/saucelabs/saucectl/tree/68fdc19a9eec4c8282d372b9ac9b2d7ea73589af/api/v1alpha/framework for framework specific schemas.

After you make changes to the relevant schemas and include it in the global schema as well, the final combined schema has to be re-generated via make schema.

E2E Tests

We have at least one e2e test for each framework/workflow we support. Here's one for xcuitest. We'll need one for xctest as well 🙏

EnvFlag map[string]string `yaml:"-" json:"-"`
}

// Xcuitest represents xcuitest apps configuration.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Xcuitest represents xcuitest apps configuration.
// Xctest represents xctest apps configuration.

ARMRequired: d.armRequired,

// Overwrite device settings
RealDeviceKind: strings.ToLower(xcuitest.IOS),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for consistency (since this const exists in both packages):

Suggested change
RealDeviceKind: strings.ToLower(xcuitest.IOS),
RealDeviceKind: strings.ToLower(xctest.IOS),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants