Class SauceOnDemandBuildWrapper

    • Field Detail

      • SELENIUM_DRIVER

        public static final String SELENIUM_DRIVER
        Environment variable key which contains Selenium Client Factory driver for selected browser.
        See Also:
        Constant Field Values
      • SAUCE_ONDEMAND_BROWSERS

        public static final String SAUCE_ONDEMAND_BROWSERS
        Environment variable key which contains a JSON formatted list of selected browsers.
        See Also:
        Constant Field Values
      • SELENIUM_HOST

        public static final String SELENIUM_HOST
        Environment variable key which contains the selenium host.
        See Also:
        Constant Field Values
      • SELENIUM_PORT

        public static final String SELENIUM_PORT
        Environment variable key which contains the selenium port.
        See Also:
        Constant Field Values
      • SAUCE_USERNAME

        public static final String SAUCE_USERNAME
        Environment variable key which contains the Sauce user name.
        See Also:
        Constant Field Values
      • SAUCE_ACCESS_KEY

        public static final String SAUCE_ACCESS_KEY
        Environment variable key which contains the Sauce access key.
        See Also:
        Constant Field Values
      • SAUCE_REST_ENDPOINT

        public static final String SAUCE_REST_ENDPOINT
        Environment variable key which contains the Sauce REST endpoint.
        See Also:
        Constant Field Values
      • SELENIUM_DEVICE

        public static final String SELENIUM_DEVICE
        Environment variable key which contains the device value for the selected browser.
        See Also:
        Constant Field Values
      • SELENIUM_DEVICE_TYPE

        public static final String SELENIUM_DEVICE_TYPE
        Environment variable key which contains the device type for the selected browser.
        See Also:
        Constant Field Values
      • SELENIUM_DEVICE_ORIENTATION

        public static final String SELENIUM_DEVICE_ORIENTATION
        Environment variable key which contains the device orientation for the selected browser.
        See Also:
        Constant Field Values
      • ENVIRONMENT_VARIABLE_PATTERN

        public static final Pattern ENVIRONMENT_VARIABLE_PATTERN
        Regex pattern which is used to identify replacement parameters.
      • SELENIUM_BROWSER

        public static final String SELENIUM_BROWSER
        Environment variable key which contains the browser value for the selected browser.
        See Also:
        Constant Field Values
      • SELENIUM_PLATFORM

        public static final String SELENIUM_PLATFORM
        Environment variable key which contains the platform for the selected browser.
        See Also:
        Constant Field Values
      • SELENIUM_VERSION

        public static final String SELENIUM_VERSION
        Environment variable key which contains the version for the selected browser.
        See Also:
        Constant Field Values
      • JENKINS_BUILD_NUMBER

        @Deprecated
        public static final String JENKINS_BUILD_NUMBER
        Deprecated.
        Should use the standard SAUCE_BUILD_NAME
        Environment variable key which contains the Jenkins build number.
        See Also:
        Constant Field Values
      • SAUCE_BUILD_NAME

        public static final String SAUCE_BUILD_NAME
        Environment variable key which contains the Jenkins build number.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SauceOnDemandBuildWrapper

        @DataBoundConstructor
        public SauceOnDemandBuildWrapper​(boolean enableSauceConnect,
                                         org.jenkins_ci.plugins.run_condition.RunCondition condition,
                                         String credentialId,
                                         SeleniumInformation seleniumInformation,
                                         String seleniumHost,
                                         String seleniumPort,
                                         String options,
                                         String sauceConnectPath,
                                         boolean launchSauceConnectOnSlave,
                                         boolean verboseLogging,
                                         boolean useLatestVersion,
                                         boolean useLatestSauceConnect,
                                         boolean forceCleanup,
                                         List<String> webDriverBrowsers,
                                         List<String> appiumBrowsers,
                                         String nativeAppPackage,
                                         boolean useGeneratedTunnelIdentifier)
        Constructs a new instance using data entered on the job configuration screen.
        Parameters:
        enableSauceConnect - indicates whether Sauce Connect should be started as part of the build.
        condition - allows users to define rules which enable Sauce Connect
        seleniumInformation - the browser information that is to be used for the build.
        seleniumHost - host location of the selenium server.
        seleniumPort - port location of the selenium server.
        options - the Sauce Connect command line options to be used
        sauceConnectPath - Path to sauce connect
        launchSauceConnectOnSlave - indicates whether Sauce Connect should be launched on the slave or master node
        verboseLogging - indicates whether the Sauce Connect output should be written to the Jenkins job output
        useLatestVersion - indicates whether the latest version of the selected browser(s) should be used
        useLatestSauceConnect - indicates whether the latest version of Sauce Connect should always be used
        forceCleanup - indicates whether to force cleanup for jobs/tunnels instead of waiting for timeout
        webDriverBrowsers - which browser(s) should be used for web driver
        appiumBrowsers - which browser(s) should be used for appium
        nativeAppPackage - the path to the native app package to be tested
        useGeneratedTunnelIdentifier - indicated whether tunnel names and ports should be managed by the plugin
        credentialId - Which credential a build should use
    • Method Detail

      • getSauceTunnelManager

        public static com.saucelabs.ci.sauceconnect.AbstractSauceTunnelManager getSauceTunnelManager()
                                                                                              throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
        Retrieve the AbstractSauceTunnelManager instance to be used to launch Sauce Connect.
        Returns:
        AbstractSauceTunnelManager instance
        Throws:
        org.codehaus.plexus.component.repository.exception.ComponentLookupException - see plexus
      • isDisableUsageStats

        public boolean isDisableUsageStats()
      • isUseLatestVersion

        public boolean isUseLatestVersion()
      • isForceCleanup

        public boolean isForceCleanup()
      • getSeleniumHost

        public String getSeleniumHost()
      • setSeleniumHost

        public void setSeleniumHost​(String seleniumHost)
      • getSeleniumPort

        public String getSeleniumPort()
      • setSeleniumPort

        public void setSeleniumPort​(String seleniumPort)
      • setSeleniumInformation

        public void setSeleniumInformation​(SeleniumInformation seleniumInformation)
      • isEnableSauceConnect

        public boolean isEnableSauceConnect()
      • setEnableSauceConnect

        public void setEnableSauceConnect​(boolean enableSauceConnect)
      • getWebDriverBrowsers

        public List<String> getWebDriverBrowsers()
      • setWebDriverBrowsers

        public void setWebDriverBrowsers​(List<String> webDriverBrowsers)
      • getAppiumBrowsers

        public List<String> getAppiumBrowsers()
      • setAppiumBrowsers

        public void setAppiumBrowsers​(List<String> appiumBrowsers)
      • isLaunchSauceConnectOnSlave

        public boolean isLaunchSauceConnectOnSlave()
      • setLaunchSauceConnectOnSlave

        public void setLaunchSauceConnectOnSlave​(boolean launchSauceConnectOnSlave)
      • isUseLatestSauceConnect

        public boolean isUseLatestSauceConnect()
      • setUseLatestSauceConnect

        public void setUseLatestSauceConnect​(boolean useLatestSauceConnect)
      • isUseGeneratedTunnelIdentifier

        public boolean isUseGeneratedTunnelIdentifier()
      • setUseGeneratedTunnelIdentifier

        public void setUseGeneratedTunnelIdentifier​(boolean useGeneratedTunnelIdentifier)
      • isVerboseLogging

        public boolean isVerboseLogging()
      • setVerboseLogging

        public void setVerboseLogging​(boolean verboseLogging)
      • getOptions

        public String getOptions()
      • setOptions

        public void setOptions​(String options)
      • getCondition

        public org.jenkins_ci.plugins.run_condition.RunCondition getCondition()
      • getSauceConnectPath

        public String getSauceConnectPath()
      • setSauceConnectPath

        public void setSauceConnectPath​(String sauceConnectPath)
      • isUseChromeForAndroid

        public boolean isUseChromeForAndroid()
      • getNativeAppPackage

        public String getNativeAppPackage()
      • setUseLatestVersion

        public void setUseLatestVersion​(boolean useLatestVersion)
      • setForceCleanup

        public void setForceCleanup​(boolean forceCleanup)
      • setNativeAppPackage

        public void setNativeAppPackage​(String nativeAppPackage)
      • setUseChromeForAndroid

        public void setUseChromeForAndroid​(boolean useChromeForAndroid)
      • getCredentialId

        public String getCredentialId()
      • setCredentialId

        public void setCredentialId​(String credentialId)
      • migrateCredentials

        protected boolean migrateCredentials​(AbstractProject project)