Interface BrowserStack
- All Superinterfaces:
org.aeonbits.owner.Config, EngineProperties<BrowserStack>, Serializable
Refer to the BrowserStack capability builders for the full list of supported options:
- Mobile Native: App Automate Capabilities
- Web: Automate Capabilities
Use set() to override values programmatically:
SHAFT.Properties.browserStack.set()
.userName("myUser")
.accessKey("myKey")
.osVersion("11")
.browserVersion("latest");
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent 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 TypeMethodDescriptionbooleanWhether to accept insecure SSL certificates during test execution on BrowserStack.BrowserStack access key used for authentication alongsideuserName().Appium version to use on BrowserStack App Automate for mobile native testing.appName()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.appUrl()URL of a previously uploaded app on BrowserStack App Automate.booleanWhether 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 custombrowserstack.ymlfile to use instead of auto-generating one from SHAFT properties.customID()Custom ID assigned to an app uploaded to BrowserStack App Automate.booleandebug()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).booleanlocal()Whether BrowserStack Local testing is enabled for accessing localhost or internal servers.booleanWhether 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).intNumber 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.default BrowserStack.SetPropertyset()Returns a fluentEngineProperties.SetPropertybuilder that allows programmatic override of individual configuration properties at runtime.userName()BrowserStack account username used for authentication.
-
Method Details
-
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
BrowserStack access key used for authentication alongsideuserName().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
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
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
URL of a previously uploaded app on BrowserStack App Automate. Note that this URL expires regularly; usecustomID()to reference the latest upload.Property key:
browserStack.appUrl— default:""- Returns:
- the app URL string, or empty if not configured
-
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 withappUrl().Property key:
browserStack.customID— default:""- Returns:
- the custom ID string, or empty if not configured
-
appName
Name assigned to a new app file being uploaded to BrowserStack App Automate. Used together withappRelativeFilePath().Property key:
browserStack.appName— default:""- Returns:
- the app name string, or empty if not configured
-
appRelativeFilePath
Relative file path of the app to be uploaded to BrowserStack App Automate. Used together withappName().Property key:
browserStack.appRelativeFilePath— default:""- Returns:
- the relative file path string, or empty if not configured
-
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
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:
trueto enable Local testing;falseotherwise
-
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:
trueto accept insecure certificates;falseotherwise
-
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:
trueto enable debug mode;falseotherwise
-
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:
trueto capture network logs;falseotherwise
-
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
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
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
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 totrue, the SDK intercepts WebDriver creation and routes tests to BrowserStack. Whenfalse, the SDK only provides integrations (e.g., Observability, Percy) without redirecting WebDriver sessions.Property key:
browserStack.browserstackAutomation— default:true- Returns:
trueto enable BrowserStack Automation via SDK;falseotherwise
-
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 fromdeviceName(),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
Path to a custombrowserstack.ymlfile 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 asbrowserstack.ymland 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
Description copied from interface:EnginePropertiesReturns a fluentEngineProperties.SetPropertybuilder that allows programmatic override of individual configuration properties at runtime.- Specified by:
setin interfaceEngineProperties<BrowserStack>- Returns:
- a new
EngineProperties.SetPropertyinstance for chaining property overrides
-