net.thucydides.core
Enum ThucydidesSystemProperty

Package class diagram package ThucydidesSystemProperty
java.lang.Object
  extended by java.lang.Enum<ThucydidesSystemProperty>
      extended by net.thucydides.core.ThucydidesSystemProperty
All Implemented Interfaces:
Serializable, Comparable<ThucydidesSystemProperty>

public enum ThucydidesSystemProperty
extends Enum<ThucydidesSystemProperty>

Properties that can be passed to a web driver test to customize its behaviour. This class is mainly for internal use.

Author:
johnsmart

Enum Constant Summary
ACTIVATE_FIREBUGS
          Activate the Firebugs plugin for firefox.
ACTIVTE_HIGHLIGHTING
           
ASSUME_UNTRUSTED_CERTIFICATE_ISSUER
          Don't accept sites using untrusted certificates.
BASE_URL
          The default starting URL for the application, and base URL for relative paths.
BATCH_COUNT
          A deprecated property that is synonymous with thucydides.batch.size
BATCH_NUMBER
          If batch testing is being used, this is the number of the batch being run on this machine.
BATCH_SIZE
          If batch testing is being used, this is the size of the batches being executed.
DRIVER
          The WebDriver driver - firefox or chrome.
ELEMENT_TIMEOUT
          How long should the driver wait for elements not immediately visible.
ESTIMATED_AVERAGE_STEP_COUNT
          The estimated number of steps in a pending scenario.
EXTENSION_PACKAGES
          Extension packages.
FILE_IO_RETRY_TIMEOUT
          Timeout (in seconds) for retrying file I/O.
HISTORY_BASE_DIRECTORY
          Base directory in which history files are stored.
ISSUE_TRACKER_URL
          Base URL for the issue tracking system to be referred to in the reports.
JIRA_PROJECT
          If defined, the JIRA project id will be prepended to issue numbers.
JIRA_URL
          If the base JIRA URL is defined, Thucydides will build the issue tracker url using the standard JIRA form.
JQUERY_INTEGRATION
          Enable JQuery integration.
LOGGING
          Three levels are supported: QUIET, NORMAL and VERBOSE
NATIVE_EVENTS
          Activate native events in Firefox.
ONLY_SAVE_FAILING_SCREENSHOTS
          Should Thucydides only store screenshots for failing steps? This can save disk space and speed up the tests somewhat.
OUTPUT_DIRECTORY
          Where should reports be generated.
PROJECT_KEY
          A unique identifier for the project under test, used to record test statistics.
PROXY_PORT
          HTTP Proxy port configuration for Firefox
PROXY_URL
          HTTP Proxy URL configuration for Firefox
PUBLIC_URL
          Public URL where the Thucydides reports will be displayed.
RECORD_STATISTICS
          Record test result statistics in a database for reporting purposes.
REMOTE_URL
          The URL to be used for remote drivers
REPORT_RESOURCE_PATH
          Indicates a directory from which the resources for the HTML reports should be copied.
RESTART_BROWSER_FREQUENCY
          Restart the browser every so often during data-driven tests.
SAUCELABS_ACCESS_KEY
          SauceLabs access key - if provided, Thucydides can generate links to the SauceLabs reports that don't require a login.
SAUCELABS_DRIVER_VERSION
           
SAUCELABS_IMPLICIT_TIMEOUT
          Override the default implicit timeout value for the Saucelabs driver.
SAUCELABS_TARGET_PLATFORM
           
SAUCELABS_TEST_NAME
           
SAUCELABS_URL
          SauceLabs URL if running the web tests on SauceLabs
SAUCELABS_USER_ID
          SauceLabs user id - if provided with the access key, Thucydides can generate links to the SauceLabs reports that don't require a login.
SNAPSHOT_HEIGHT
          Redimension the browser to enable larger screenshots.
SNAPSHOT_WIDTH
          Redimension the browser to enable larger screenshots.
STEP_DELAY
          Pause (in ms) between each test step.
TEST_ROOT_PACKAGE
          The root package for the tests in a given project.
THUCYDIDES_HOME
          The home directory for Thucydides output and data files - by default, $USER_HOME/.thucydides
THUCYDIDES_PORT
          The port used by Thucydides for the local statistics database.
THUCYDIDES_USE_LOCAL_SERVER
          Run the local Thucydides database as an in-memory server, as opposed to a file-based database.
TIMEOUTS_IMPLICIT_WAIT
          How long webdriver waits for elements to appear by default, in milliseconds.
UNIQUE_BROWSER
          Use the same browser for all tests (the "Highlander" rule)
VERBOSE_SCREENSHOTS
          Should Thucydides take screenshots for every clicked button and every selected link? If this option is set to true (the default value), Thucydides will record screenshots for any action performed on a WebElementFacade, i.e.
 
Field Summary
static int DEFAULT_HEIGHT
           
static int DEFAULT_WIDTH
           
 
Method Summary
 String from(EnvironmentVariables environmentVariables)
           
 String from(EnvironmentVariables environmentVariables, String defaultValue)
           
 String getPropertyName()
           
 boolean isDefinedIn(EnvironmentVariables environmentVariables)
           
 String toString()
           
static ThucydidesSystemProperty valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ThucydidesSystemProperty[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DRIVER

public static final ThucydidesSystemProperty DRIVER
The WebDriver driver - firefox or chrome.


BASE_URL

public static final ThucydidesSystemProperty BASE_URL
The default starting URL for the application, and base URL for relative paths.


REMOTE_URL

public static final ThucydidesSystemProperty REMOTE_URL
The URL to be used for remote drivers


PROJECT_KEY

public static final ThucydidesSystemProperty PROJECT_KEY
A unique identifier for the project under test, used to record test statistics.


THUCYDIDES_HOME

public static final ThucydidesSystemProperty THUCYDIDES_HOME
The home directory for Thucydides output and data files - by default, $USER_HOME/.thucydides


THUCYDIDES_PORT

public static final ThucydidesSystemProperty THUCYDIDES_PORT
The port used by Thucydides for the local statistics database.


THUCYDIDES_USE_LOCAL_SERVER

public static final ThucydidesSystemProperty THUCYDIDES_USE_LOCAL_SERVER
Run the local Thucydides database as an in-memory server, as opposed to a file-based database. This is useful if the Thucydides tests are to be run in parallel on different JVM forks.


RECORD_STATISTICS

public static final ThucydidesSystemProperty RECORD_STATISTICS
Record test result statistics in a database for reporting purposes.


REPORT_RESOURCE_PATH

public static final ThucydidesSystemProperty REPORT_RESOURCE_PATH
Indicates a directory from which the resources for the HTML reports should be copied. This directory currently needs to be provided in a JAR file.


OUTPUT_DIRECTORY

public static final ThucydidesSystemProperty OUTPUT_DIRECTORY
Where should reports be generated.


ONLY_SAVE_FAILING_SCREENSHOTS

public static final ThucydidesSystemProperty ONLY_SAVE_FAILING_SCREENSHOTS
Should Thucydides only store screenshots for failing steps? This can save disk space and speed up the tests somewhat. Useful for data-driven testing.


VERBOSE_SCREENSHOTS

public static final ThucydidesSystemProperty VERBOSE_SCREENSHOTS
Should Thucydides take screenshots for every clicked button and every selected link? If this option is set to true (the default value), Thucydides will record screenshots for any action performed on a WebElementFacade, i.e. any time you use an expression like element(...).click(), findBy(...).click() and so on. This will be overridden if the ONLY_SAVE_FAILING_SCREENSHOTS option is activated.


RESTART_BROWSER_FREQUENCY

public static final ThucydidesSystemProperty RESTART_BROWSER_FREQUENCY
Restart the browser every so often during data-driven tests.


STEP_DELAY

public static final ThucydidesSystemProperty STEP_DELAY
Pause (in ms) between each test step.


ELEMENT_TIMEOUT

public static final ThucydidesSystemProperty ELEMENT_TIMEOUT
How long should the driver wait for elements not immediately visible.


ASSUME_UNTRUSTED_CERTIFICATE_ISSUER

public static final ThucydidesSystemProperty ASSUME_UNTRUSTED_CERTIFICATE_ISSUER
Don't accept sites using untrusted certificates. By default, Thucydides accepts untrusted certificates - use this to change this behaviour.


UNIQUE_BROWSER

public static final ThucydidesSystemProperty UNIQUE_BROWSER
Use the same browser for all tests (the "Highlander" rule)


ESTIMATED_AVERAGE_STEP_COUNT

public static final ThucydidesSystemProperty ESTIMATED_AVERAGE_STEP_COUNT
The estimated number of steps in a pending scenario. The estimated number of steps in a pending sceario. This is used for stories where no scenarios have been defined.


ISSUE_TRACKER_URL

public static final ThucydidesSystemProperty ISSUE_TRACKER_URL
Base URL for the issue tracking system to be referred to in the reports. If defined, any issues quoted in the form #1234 will be linked to the relevant issue in the issue tracking system. Works with JIRA, Trac etc.


NATIVE_EVENTS

public static final ThucydidesSystemProperty NATIVE_EVENTS
Activate native events in Firefox. This is true by default, but can cause issues with some versions of linux.


JIRA_URL

public static final ThucydidesSystemProperty JIRA_URL
If the base JIRA URL is defined, Thucydides will build the issue tracker url using the standard JIRA form.


JIRA_PROJECT

public static final ThucydidesSystemProperty JIRA_PROJECT
If defined, the JIRA project id will be prepended to issue numbers.


HISTORY_BASE_DIRECTORY

public static final ThucydidesSystemProperty HISTORY_BASE_DIRECTORY
Base directory in which history files are stored.


SNAPSHOT_HEIGHT

public static final ThucydidesSystemProperty SNAPSHOT_HEIGHT
Redimension the browser to enable larger screenshots.


SNAPSHOT_WIDTH

public static final ThucydidesSystemProperty SNAPSHOT_WIDTH
Redimension the browser to enable larger screenshots.


PUBLIC_URL

public static final ThucydidesSystemProperty PUBLIC_URL
Public URL where the Thucydides reports will be displayed. This is mainly for use by plugins.


ACTIVATE_FIREBUGS

public static final ThucydidesSystemProperty ACTIVATE_FIREBUGS
Activate the Firebugs plugin for firefox. Useful for debugging, but not very when running the tests on a build server. It is not activated by default.


ACTIVTE_HIGHLIGHTING

public static final ThucydidesSystemProperty ACTIVTE_HIGHLIGHTING

BATCH_COUNT

public static final ThucydidesSystemProperty BATCH_COUNT
A deprecated property that is synonymous with thucydides.batch.size


BATCH_SIZE

public static final ThucydidesSystemProperty BATCH_SIZE
If batch testing is being used, this is the size of the batches being executed.


BATCH_NUMBER

public static final ThucydidesSystemProperty BATCH_NUMBER
If batch testing is being used, this is the number of the batch being run on this machine.


PROXY_URL

public static final ThucydidesSystemProperty PROXY_URL
HTTP Proxy URL configuration for Firefox


PROXY_PORT

public static final ThucydidesSystemProperty PROXY_PORT
HTTP Proxy port configuration for Firefox


TIMEOUTS_IMPLICIT_WAIT

public static final ThucydidesSystemProperty TIMEOUTS_IMPLICIT_WAIT
How long webdriver waits for elements to appear by default, in milliseconds.


EXTENSION_PACKAGES

public static final ThucydidesSystemProperty EXTENSION_PACKAGES
Extension packages. This is a list of packages that will be scanned for custom TagProvider implementations. To add a custom tag provider, just implement the TagProvider interface and specify the root package for this provider in this parameter.


JQUERY_INTEGRATION

public static final ThucydidesSystemProperty JQUERY_INTEGRATION
Enable JQuery integration. If set to true (the default), JQuery will be injected into any page that does not already have it. You can turn this option off for performance reasons if you are not using JQuery selectors.


SAUCELABS_TARGET_PLATFORM

public static final ThucydidesSystemProperty SAUCELABS_TARGET_PLATFORM

SAUCELABS_DRIVER_VERSION

public static final ThucydidesSystemProperty SAUCELABS_DRIVER_VERSION

SAUCELABS_TEST_NAME

public static final ThucydidesSystemProperty SAUCELABS_TEST_NAME

SAUCELABS_URL

public static final ThucydidesSystemProperty SAUCELABS_URL
SauceLabs URL if running the web tests on SauceLabs


SAUCELABS_ACCESS_KEY

public static final ThucydidesSystemProperty SAUCELABS_ACCESS_KEY
SauceLabs access key - if provided, Thucydides can generate links to the SauceLabs reports that don't require a login.


SAUCELABS_USER_ID

public static final ThucydidesSystemProperty SAUCELABS_USER_ID
SauceLabs user id - if provided with the access key, Thucydides can generate links to the SauceLabs reports that don't require a login.


SAUCELABS_IMPLICIT_TIMEOUT

public static final ThucydidesSystemProperty SAUCELABS_IMPLICIT_TIMEOUT
Override the default implicit timeout value for the Saucelabs driver.


FILE_IO_RETRY_TIMEOUT

public static final ThucydidesSystemProperty FILE_IO_RETRY_TIMEOUT
Timeout (in seconds) for retrying file I/O. Used in net.thucydides.core.resources.FileResources.copyResourceTo(). Sometimes, file I/O fails on Windows machine due to the way Windows handles memory-mapped files (http://stackoverflow.com/questions/3602783/file-access-synchronized-on-java-object). This property, if set, will retry copying the resource till timeout. A default value is used if the property is not set.


LOGGING

public static final ThucydidesSystemProperty LOGGING
Three levels are supported: QUIET, NORMAL and VERBOSE


TEST_ROOT_PACKAGE

public static final ThucydidesSystemProperty TEST_ROOT_PACKAGE
The root package for the tests in a given project. If provided, Thucydides will log information about the total number of tests to be executed, and keep a tally of the executed tests.

Field Detail

DEFAULT_HEIGHT

public static final int DEFAULT_HEIGHT
See Also:
Constant Field Values

DEFAULT_WIDTH

public static final int DEFAULT_WIDTH
See Also:
Constant Field Values
Method Detail

values

public static ThucydidesSystemProperty[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ThucydidesSystemProperty c : ThucydidesSystemProperty.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ThucydidesSystemProperty valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getPropertyName

public String getPropertyName()

toString

public String toString()
Overrides:
toString in class Enum<ThucydidesSystemProperty>

from

public String from(EnvironmentVariables environmentVariables)

from

public String from(EnvironmentVariables environmentVariables,
                   String defaultValue)

isDefinedIn

public boolean isDefinedIn(EnvironmentVariables environmentVariables)


Copyright © 2011-2012 Wakaleo Consulting. All Rights Reserved.