Skip to content

[XCUI] --env doesn't work for iOS xcuitest suites #398

@renaud-vmg

Description

@renaud-vmg

Current behavior

The current behaviour of --env SOME=THING appears to not set environment variables "in" the device when launching a test (as is supported by xcodebuild-run tests). I can see USER, XPC_FLAGS, XPC_SERVICE_NAME and others, but additional --env-provided values seems to be broken.

Desired behavior

The expected behaviour is that using saucectl's --env SOME=THING cli option would set environment variables on the target as is being done by xcodebuild-driven testsé

Config to reproduce

Run any iOS xcuiapplication-based tests that print out the whole environment. Example code to do that in a setup method:

    for (NSString* key in [[NSProcessInfo processInfo] environment].allKeys) {
        NSLog(@"Full map reveal - key: %@", key);
        NSLog(@"Full map reveal - element: %@", [[NSProcessInfo processInfo] environment][key]);
        NSLog(@"==================================================");
    }

Versions

0.59.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions