public class Parameters extends Object
| Constructor and Description |
|---|
Parameters() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getHubHostname()
Gets host name of the hub to run tests on.
|
static int |
getMaxAttempts()
Gets the maximum number of times to run the test in case of a random failure.
|
static int |
getMaxScreenshotRetries() |
static int |
getMaxThreads()
Deprecated.
|
static String |
getRunLocallyBrowserName()
Gets the name of the browser to use for a local test.
|
static String |
getRunLocallyBrowserVersion()
Gets the version of the browser to use for a local test.
|
static double |
getScreenshotComparisonTolerance() |
static String |
getScreenshotErrorDirectory() |
static String |
getScreenshotReferenceDirectory() |
static int |
getScreenshotRetryDelay() |
static int |
getTestsInParallel() |
static int |
getTestSuitesInParallel() |
static boolean |
isCaptureScreenshotOnFailure()
Deprecated.
This does nothing, use
ScreenshotOnFailureRule |
static boolean |
isDebug() |
static boolean |
isLocalWebDriverUsed() |
static boolean |
isScreenshotComparisonCursorDetection()
Tells whether to treat screen shots with the only difference being a text
input cursor as equal or not.
|
static void |
setCaptureScreenshotOnFailure(boolean isCaptureScreenshotOnFailure)
Deprecated.
This does nothing, use
ScreenshotOnFailureRule |
static void |
setDebug(boolean isDebug)
Turns debugging info on/off
|
static void |
setMaxAttempts(int maxAttempts)
Sets the maximum number of times to run the test in case of a random
failure.
|
static void |
setMaxScreenshotRetries(int maxRetries)
Sets the maximum allowed retries when comparing screen shots.
|
static void |
setMaxThreads(int maxThreads)
Deprecated.
|
static void |
setScreenshotComparisonCursorDetection(boolean isScreenshotComparisonCursorDetection)
Turns cursor detection on/off when comparing screen shots.
|
static void |
setScreenshotComparisonTolerance(double tolerance)
Sets the error tolerance for screen shot comparisons.
|
static void |
setScreenshotErrorDirectory(String screenshotErrorDirectory)
Sets the directory where error screen shots are stored.
|
static void |
setScreenshotReferenceDirectory(String screenshotReferenceDirectory)
Sets the directory to search for reference images.
|
static void |
setScreenshotRetryDelay(int retryDelay)
Sets the delay between screen shot comparison retries.
|
static void |
setTestsInParallel(int testsInParallel)
Sets the maximum number of tests to run in parallel.
|
static void |
setTestSuitesInParallel(int testSuitesInParallel)
Sets the maximum number of test suites to run in parallel.
|
public static void setDebug(boolean isDebug)
isDebug - true to turn on, false to turn offpublic static boolean isDebug()
public static void setScreenshotComparisonCursorDetection(boolean isScreenshotComparisonCursorDetection)
isScreenshotComparisonCursorDetection - true to turn on, false to turn offpublic static boolean isScreenshotComparisonCursorDetection()
public static void setScreenshotReferenceDirectory(String screenshotReferenceDirectory)
screenshotReferenceDirectory - directory pathpublic static String getScreenshotReferenceDirectory()
public static void setScreenshotErrorDirectory(String screenshotErrorDirectory)
screenshotErrorDirectory - directory pathpublic static String getScreenshotErrorDirectory()
public static void setScreenshotComparisonTolerance(double tolerance)
tolerance - the error tolerance.public static double getScreenshotComparisonTolerance()
@Deprecated public static void setCaptureScreenshotOnFailure(boolean isCaptureScreenshotOnFailure)
ScreenshotOnFailureRuleisCaptureScreenshotOnFailure - true to turn on, false to turn offUnsupportedOperationException - always@Deprecated public static boolean isCaptureScreenshotOnFailure()
ScreenshotOnFailureRuleUnsupportedOperationException - alwayspublic static void setMaxScreenshotRetries(int maxRetries)
maxRetries - retry amount maximumpublic static int getMaxScreenshotRetries()
public static void setScreenshotRetryDelay(int retryDelay)
retryDelay - the delay in milliseconds.public static int getScreenshotRetryDelay()
@Deprecated public static int getMaxThreads()
getTestsInParallel()@Deprecated public static void setMaxThreads(int maxThreads)
setTestsInParallel(int)maxThreads - maximum number of tests to run in parallel.public static void setTestsInParallel(int testsInParallel)
testsInParallel - maximum number of tests to run in parallel.public static int getTestsInParallel()
public static void setTestSuitesInParallel(int testSuitesInParallel)
testSuitesInParallel - maximum number of testSuites to run in parallel.public static int getTestSuitesInParallel()
public static String getHubHostname()
This will override any @RunOnHub annotation present on
the test class.
public static String getRunLocallyBrowserName()
Reads the value from the
com.vaadin.testbench.Parameters.runLocally system property. If
the parameter is defined, it will override any
@RunLocally annotation.
The format of the system property is "[browsername]" or "[browsername]-[version]" where the version is optional.
If the system property is defined, the test will be run locally and not
on a hub. The property effectively does the same thing as a
@RunLocally annotation on the test class.
public static String getRunLocallyBrowserVersion()
Reads the value from the
com.vaadin.testbench.Parameters.runLocally system property. If
the parameter is defined, it will override any
@RunLocally annotation.
The format of the system property is "[browsername]" or "[browsername]-[version]" where the version is optional.
public static boolean isLocalWebDriverUsed()
public static int getMaxAttempts()
RetryRule for details.public static void setMaxAttempts(int maxAttempts)
maxAttempts - maximum attempts the test can be run.Copyright © 2012-2025 Vaadin Ltd. All Rights Reserved.