Interface BrowserStack

All Superinterfaces:
org.aeonbits.owner.Config, EngineProperties<BrowserStack>, Serializable

@Sources({"system:properties","file:src/main/resources/properties/browserStack.properties","file:src/main/resources/properties/default/browserStack.properties","classpath:browserStack.properties"}) public interface BrowserStack extends EngineProperties<BrowserStack>
Configuration properties interface for BrowserStack cloud execution in the SHAFT framework. Covers all capabilities required for both desktop-web and native-mobile testing via BrowserStack's Automate and App Automate platforms.

Refer to the BrowserStack capability builders for the full list of supported options:

Use set() to override values programmatically:

SHAFT.Properties.browserStack.set()
    .userName("myUser")
    .accessKey("myKey")
    .osVersion("11")
    .browserVersion("latest");
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Fluent builder that allows programmatic override of individual BrowserStack configuration properties at runtime.

    Nested classes/interfaces inherited from interface org.aeonbits.owner.Config

    org.aeonbits.owner.Config.ConverterClass, org.aeonbits.owner.Config.DecryptorClass, org.aeonbits.owner.Config.DefaultValue, org.aeonbits.owner.Config.DisableableFeature, org.aeonbits.owner.Config.DisableFeature, org.aeonbits.owner.Config.EncryptedValue, org.aeonbits.owner.Config.HotReload, org.aeonbits.owner.Config.HotReloadType, org.aeonbits.owner.Config.Key, org.aeonbits.owner.Config.LoadPolicy, org.aeonbits.owner.Config.LoadType, org.aeonbits.owner.Config.PreprocessorClasses, org.aeonbits.owner.Config.Separator, org.aeonbits.owner.Config.Sources, org.aeonbits.owner.Config.TokenizerClass
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Whether to accept insecure SSL certificates during test execution on BrowserStack.
    BrowserStack access key used for authentication alongside userName().
    Appium version to use on BrowserStack App Automate for mobile native testing.
    Name assigned to a new app file being uploaded to BrowserStack App Automate.
    Relative file path of the app to be uploaded to BrowserStack App Automate.
    URL of a previously uploaded app on BrowserStack App Automate.
    boolean
    Whether BrowserStack Automation is enabled in the SDK configuration.
    Target browser version for desktop web testing on BrowserStack Automate.
    Custom build name for BrowserStack dashboard reporting.
    Path to a custom browserstack.yml file to use instead of auto-generating one from SHAFT properties.
    Custom ID assigned to an app uploaded to BrowserStack App Automate.
    boolean
    Whether BrowserStack debug mode is enabled, capturing additional screenshots to aid in diagnosing test failures.
    Target device name for mobile app testing on BrowserStack App Automate (e.g., "Samsung Galaxy S21").
    Geographic location code for IP geolocation testing on BrowserStack (enterprise accounts only).
    boolean
    Whether BrowserStack Local testing is enabled for accessing localhost or internal servers.
    boolean
    Whether network log capture is enabled during test execution on BrowserStack.
    Target operating system version for desktop web testing on BrowserStack Automate (e.g., "10" for Windows 10).
    int
    Number of parallel test threads to run per platform on BrowserStack.
    JSON array defining multiple platform entries for parallel testing across different devices or browsers on BrowserStack.
    Target mobile platform version for native app testing on BrowserStack App Automate (e.g., "11" for Android 11).
    Custom project name for BrowserStack dashboard reporting.
    Selenium version to use on BrowserStack Automate.
    set()
    Returns a fluent EngineProperties.SetProperty builder that allows programmatic override of individual configuration properties at runtime.
    BrowserStack account username used for authentication.
  • Method Details

    • userName

      @Key("browserStack.userName") @DefaultValue("mohabmohie1") String userName()
      BrowserStack account username used for authentication.

      Property key: browserStack.userName. The default value is the project's shared test account; override via a properties file or system property for your own account.

      Returns:
      the BrowserStack username string
    • accessKey

      @Key("browserStack.accessKey") @DefaultValue("8K4Eukj3pii3tD2vuti9") String accessKey()
      BrowserStack access key used for authentication alongside userName().

      Property key: browserStack.accessKey — default: the project's shared test account key. Override via a properties file or system property for your own account.

      Returns:
      the BrowserStack access key string
    • platformVersion

      @Key("browserStack.platformVersion") @DefaultValue("") String platformVersion()
      Target mobile platform version for native app testing on BrowserStack App Automate (e.g., "11" for Android 11).

      Property key: browserStack.platformVersion — default: ""

      Returns:
      the platform version string, or empty if not configured
    • deviceName

      @Key("browserStack.deviceName") @DefaultValue("") String deviceName()
      Target device name for mobile app testing on BrowserStack App Automate (e.g., "Samsung Galaxy S21").

      Property key: browserStack.deviceName — default: ""

      Returns:
      the device name string, or empty if not configured
    • appUrl

      @Key("browserStack.appUrl") @DefaultValue("") String appUrl()
      URL of a previously uploaded app on BrowserStack App Automate. Note that this URL expires regularly; use customID() to reference the latest upload.

      Property key: browserStack.appUrl — default: ""

      Returns:
      the app URL string, or empty if not configured
    • customID

      @Key("browserStack.customID") @DefaultValue("") String customID()
      Custom ID assigned to an app uploaded to BrowserStack App Automate. Using a custom ID always resolves to the latest uploaded version with that ID, avoiding expiry issues associated with appUrl().

      Property key: browserStack.customID — default: ""

      Returns:
      the custom ID string, or empty if not configured
    • appName

      @Key("browserStack.appName") @DefaultValue("") String appName()
      Name assigned to a new app file being uploaded to BrowserStack App Automate. Used together with appRelativeFilePath().

      Property key: browserStack.appName — default: ""

      Returns:
      the app name string, or empty if not configured
    • appRelativeFilePath

      @Key("browserStack.appRelativeFilePath") @DefaultValue("") String appRelativeFilePath()
      Relative file path of the app to be uploaded to BrowserStack App Automate. Used together with appName().

      Property key: browserStack.appRelativeFilePath — default: ""

      Returns:
      the relative file path string, or empty if not configured
    • osVersion

      @Key("browserStack.osVersion") @DefaultValue("") String osVersion()
      Target operating system version for desktop web testing on BrowserStack Automate (e.g., "10" for Windows 10).

      Property key: browserStack.osVersion — default: ""

      Returns:
      the OS version string, or empty if not configured
    • browserVersion

      @Key("browserStack.browserVersion") @DefaultValue("") String browserVersion()
      Target browser version for desktop web testing on BrowserStack Automate. When empty, BrowserStack selects an available version at random.

      Property key: browserStack.browserVersion — default: ""

      Returns:
      the browser version string, or empty to use a random version
    • local

      @Key("browserStack.local") @DefaultValue("false") boolean local()
      Whether BrowserStack Local testing is enabled for accessing localhost or internal servers. Requires the BrowserStack Local binary to be running.

      Property key: browserStack.local — default: false

      Returns:
      true to enable Local testing; false otherwise
    • seleniumVersion

      @Key("browserStack.seleniumVersion") @DefaultValue("4.40.0") String seleniumVersion()
      Selenium version to use on BrowserStack Automate.

      Property key: browserStack.seleniumVersion — default: "4.41.0"

      Returns:
      the Selenium version string
    • acceptInsecureCerts

      @Key("browserStack.acceptInsecureCerts") @DefaultValue("true") boolean acceptInsecureCerts()
      Whether to accept insecure SSL certificates during test execution on BrowserStack.

      Property key: browserStack.acceptInsecureCerts — default: true

      Returns:
      true to accept insecure certificates; false otherwise
    • debug

      @Key("browserStack.debug") @DefaultValue("false") boolean debug()
      Whether BrowserStack debug mode is enabled, capturing additional screenshots to aid in diagnosing test failures.

      Property key: browserStack.debug — default: false

      Returns:
      true to enable debug mode; false otherwise
    • networkLogs

      @Key("browserStack.networkLogs") @DefaultValue("false") boolean networkLogs()
      Whether network log capture is enabled during test execution on BrowserStack.

      Property key: browserStack.networkLogs — default: false

      Returns:
      true to capture network logs; false otherwise
    • geoLocation

      @Key("browserStack.geoLocation") @DefaultValue("") String geoLocation()
      Geographic location code for IP geolocation testing on BrowserStack (enterprise accounts only). Refer to BrowserStack IP Geolocation for supported location codes.

      Property key: browserStack.geoLocation — default: ""

      Returns:
      the geolocation code string, or empty if not configured
    • appiumVersion

      @Key("browserStack.appiumVersion") @DefaultValue("3.1.0") String appiumVersion()
      Appium version to use on BrowserStack App Automate for mobile native testing.

      Property key: browserStack.appiumVersion — default: "3.1.0"

      Returns:
      the Appium version string
    • buildName

      @Key("browserStack.buildName") @DefaultValue("") String buildName()
      Custom build name for BrowserStack dashboard reporting. When empty, a name is auto-generated from the project directory and current timestamp.

      Property key: browserStack.buildName — default: ""

      Returns:
      the build name string, or empty for auto-generation
    • projectName

      @Key("browserStack.projectName") @DefaultValue("") String projectName()
      Custom project name for BrowserStack dashboard reporting. When empty, the current test class name is used.

      Property key: browserStack.projectName — default: ""

      Returns:
      the project name string, or empty for auto-detection
    • parallelsPerPlatform

      @Key("browserStack.parallelsPerPlatform") @DefaultValue("1") int parallelsPerPlatform()
      Number of parallel test threads to run per platform on BrowserStack. Used by the BrowserStack SDK for parallelization. When set to 0 or less, parallelization is not configured in the SDK YAML.

      Property key: browserStack.parallelsPerPlatform — default: 1

      Returns:
      the number of parallel threads per platform
    • browserstackAutomation

      @Key("browserStack.browserstackAutomation") @DefaultValue("true") boolean browserstackAutomation()
      Whether BrowserStack Automation is enabled in the SDK configuration. When set to true, the SDK intercepts WebDriver creation and routes tests to BrowserStack. When false, the SDK only provides integrations (e.g., Observability, Percy) without redirecting WebDriver sessions.

      Property key: browserStack.browserstackAutomation — default: true

      Returns:
      true to enable BrowserStack Automation via SDK; false otherwise
    • platformsList

      @Key("browserStack.platformsList") @DefaultValue("") String platformsList()
      JSON array defining multiple platform entries for parallel testing across different devices or browsers on BrowserStack. When set to a non-empty value, this overrides the single-platform configuration derived from deviceName(), osVersion(), browserVersion(), etc.

      Each entry in the JSON array is a map of platform attributes. For mobile native:

      [
        {"deviceName": "Samsung Galaxy S22", "osVersion": "12.0", "platformName": "android"},
        {"deviceName": "Google Pixel 6", "osVersion": "12.0", "platformName": "android"}
      ]
      

      For desktop web:

      [
        {"os": "Windows", "osVersion": "10", "browserName": "Chrome", "browserVersion": "latest"},
        {"os": "OS X", "osVersion": "Monterey", "browserName": "Safari", "browserVersion": "latest"}
      ]
      

      Property key: browserStack.platformsList — default: ""

      Returns:
      a JSON array string of platform entries, or empty to use single-platform configuration
      See Also:
    • customBrowserStackYmlPath

      @Key("browserStack.customBrowserStackYmlPath") @DefaultValue("") String customBrowserStackYmlPath()
      Path to a custom browserstack.yml file to use instead of auto-generating one from SHAFT properties. When set to a non-empty value, the specified file is copied to the project root as browserstack.yml and all SHAFT BrowserStack properties are ignored by the SDK YAML generator.

      This allows advanced users to maintain full control over the SDK configuration by providing their own YAML file, bypassing SHAFT's property-to-YAML mapping entirely.

      Property key: browserStack.customBrowserStackYmlPath — default: ""

      Returns:
      the path to the custom YAML file, or empty to auto-generate from SHAFT properties
    • set

      default BrowserStack.SetProperty set()
      Description copied from interface: EngineProperties
      Returns a fluent EngineProperties.SetProperty builder that allows programmatic override of individual configuration properties at runtime.
      Specified by:
      set in interface EngineProperties<BrowserStack>
      Returns:
      a new EngineProperties.SetProperty instance for chaining property overrides