Services and Component Documentation

This documentation describes the available AludraTest services and components which can be configured from client test projects.

Services

These are the services which can be queried from an AludraTestCase for use.

Service Interface Service Name Description Default implementation
org.aludratest.service.cmdline.CommandLineService Command Line Service Provides invocation and I/O of command line processes. org.aludratest.service.cmdline.impl.CommandLineServiceImpl
org.aludratest.service.edifactfile.EdifactFileService EDIFACT File Service Offers EDIFACT and X12 related access and verifaction methods. Uses the Edifatto Library to perform operations. org.aludratest.service.edifactfile.edifatto.EdifattoFileService
org.aludratest.service.file.FileService File Service Offers file related access and verifaction methods. org.aludratest.service.file.impl.FileServiceImpl
org.aludratest.service.flatfile.FlatFileService Flatfile Service Offers flatfile related access and verifaction methods. org.aludratest.service.flatfile.impl.DefaultFlatFileService
org.aludratest.service.gui.web.AludraWebGUI Aludra Web GUI Allows testing of a web based GUI, e.g. a web application. org.aludratest.service.gui.web.selenium.selenium1.AludraSelenium1
org.aludratest.service.separatedfile.SeparatedFileService Separated File Service Offers separated-value file (e.g. CSV) related access and verifaction methods. org.aludratest.service.separatedfile.impl.DefaultSeparatedFileService

Configuration

Most of the services and some internal components of AludraTest can be configured. For information on configuration files and properties, please refer to the following link:

AludraTest Service Configuration

The following sections describe the configurable services and components, and which configuration properties are available for each.

AludraTestConfig

Provides the central configuration of AludraTest.
If you need access to an instance of this interface, the preferred way is to ask your context object for a newComponentInstance() using this Interface class as the key.

Interface class: org.aludratest.config.AludraTestConfig
Default implementation: org.aludratest.config.impl.AludraTestConfigImpl
All known implementations: org.aludratest.config.impl.AludraTestConfigImpl


Common properties
Name Type Description Default value Required
number.of.threads int The number of threads to use for parallel test case execution 1 no
stop.testcase.on.verification.exception boolean If set to true, test execution stops if an exception is thrown on verfication actions. true no
stop.testcase.on.interaction.exception boolean If set to true, test execution stops if an exception is thrown on interaction actions. true no
javatest.xls.root String The root directory containing Excel files with test data ./src/main/resources/testdata no
default.locale String The locale to use as default locale. If not specified, the system default locale is used. no
config.tab.required boolean If set to true, a configuration tab is required in Excel files, and its absence will cause an exception. false no
ignore.enabled boolean If set to true, test case classes can be marked as ignored. Otherwise, the @Ignored annotation will itself be ignored, causing the marked tests to be executed. false no
verification.numeric.difference double The maximum allowed difference of a current and an expected value. This is for handling rounding issues when dealing with double precision values. 0.00000001 no
debug.attachments.on.framework.exception boolean If set to true, debug attachments (e.g. screenshots) will be created also on framework (blue) errors. false no

DataConfiguration

Configuration component for special data markers. The markers are special keywords that allow a String with the same value to be treated as null, as empty, or as an "ALL"-match.

Interface class: org.aludratest.data.DataConfiguration
Default implementation: org.aludratest.data.DataConfigurationImpl
All known implementations: org.aludratest.data.DataConfigurationImpl


Common properties
Name Type Description Default value Required
NULL String Marker to treat Strings as null when String value equals the marker <NULL> no
EMPTY String Marker to treat Strings as empty when String value equals the marker <EMPTY> no
ALL String Marker to treat Strings as ALL-match when String value equals the marker <ALL> no

CommandLineService

Provides command line operations, like executíng a program or script and check the results. The service provides an interface with streams for sending data to the executable and reading results back.

Interface class: org.aludratest.service.cmdline.CommandLineService
Default implementation: org.aludratest.service.cmdline.impl.CommandLineServiceImpl
All known implementations: org.aludratest.service.cmdline.impl.CommandLineServiceImpl


Common properties
Name Type Description Default value Required
base.directory String The base URL of the service. On a local filesystem, this is a folder path. ${user.home} yes

FileService

An AludraTest service which provides access to and file operations on local and network file systems as well as on (S)FTP and HTTP(S) servers.

Interface class: org.aludratest.service.file.FileService
Default implementation: org.aludratest.service.file.impl.FileServiceImpl
All known implementations: org.aludratest.service.file.impl.FileServiceImpl


Common properties
Name Type Description Default value Required
protocol String The name of the used protocol: file, ftp, sftp, http or https. file yes
base.url String The base URL of the service. On a local filesystem, this is a folder path. ${user.home} yes
encoding String The encoding to use when reading / writing text files. UTF-8 yes
linefeed String The line feed to use when reading / writing text files. Can be WINDOWS or UNIX UNIX yes
writing.permitted boolean Activates a "write lock" if set to false, so all modification operations on this file system will fail. false yes
user String The user name to use for login purposes (unused for file protocol) no
password String The password to use for login purposes (unused for file protocol) no
Properties for implementation org.aludratest.service.file.impl.FileServiceImpl
Name Type Description Default value Required
wait.max.retries int The maximum number of retries when polling files. 15 no
wait.timeout int The maximum time to wait when polling, in milliseconds. The retries are distributed over this time 30000 no

FlatFileService

AludraTest service interface for flat files support.

Interface class: org.aludratest.service.flatfile.FlatFileService
Default implementation: org.aludratest.service.flatfile.impl.DefaultFlatFileService
All known implementations: org.aludratest.service.flatfile.impl.DefaultFlatFileService


Common properties
Name Type Description Default value Required
locale String The locale to use for type conversions, as a Java Locale String representation. en_US no

AludraWebGUI

AludraGUI specialization for Web GUIs.

Interface class: org.aludratest.service.gui.web.AludraWebGUI
Default implementation: org.aludratest.service.gui.web.selenium.selenium1.AludraSelenium1
All known implementations: org.aludratest.service.gui.web.selenium.selenium1.AludraSelenium1, org.aludratest.service.gui.web.selenium.selenium2.AludraSelenium2


Common properties
Name Type Description Default value Required
url.of.aut String URL of the application under test. http://localhost/ yes
close.testapp.after.execution boolean Indicates if the application under test shall be closed after test execution. true no
Properties for implementation org.aludratest.service.gui.web.selenium.selenium1.AludraSelenium1
Name Type Description Default value Required
timeout int Timeout in milliseconds after which a test step stops retrying doing a action. 15000 no
speed int Speed in milliseconds. What means that between each Selenium command Selenium waits x milliseconds where x is the speed. 50 no
browser.log.level String The browser log level. One of debug, info, warn, error. error no
highlight.elements boolean Activates or deactivates highlighting of web GUI elements currently being used. true no
pause.between.retries int If execution of an action fails, Selenium has to pause until it retries to execute this action again. This value specifies how long the program will pause, in milliseconds. 100 no
locator.prefix String This value specifies the default prefix of an ID locator. With the help of this prefix, Selenium can be influenced how it locates elements. Selenium provides several mechanisms for that like regular expressions etc. css=[id$=" no
locator.suffix String The matching suffix to the ID locator prefix. "] no
screenshot.attachment.extension String The file extension to use for screenshot attachments. png no
page.source.attachment.extension String The file extension to use for HTML page source attachments. html no
task.start.timeout int The time the Selenium service waits for an activity to start, in milliseconds. 2000 no
task.completion.timeout int The time the Selenium service waits for an activity to finish, in milliseconds. 45000 no
task.polling.interval int The polling interval for checking task states, in milliseconds. 1000 no
browser String The Selenium 1 browser name to use. *firefoxproxy no
Properties for implementation org.aludratest.service.gui.web.selenium.selenium2.AludraSelenium2
Name Type Description Default value Required
timeout int Timeout in milliseconds after which a test step stops retrying doing a action. 15000 no
speed int Speed in milliseconds. What means that between each Selenium command Selenium waits x milliseconds where x is the speed. 50 no
browser.log.level String The browser log level. One of debug, info, warn, error. error no
highlight.elements boolean Activates or deactivates highlighting of web GUI elements currently being used. true no
pause.between.retries int If execution of an action fails, Selenium has to pause until it retries to execute this action again. This value specifies how long the program will pause, in milliseconds. 100 no
locator.prefix String This value specifies the default prefix of an ID locator. With the help of this prefix, Selenium can be influenced how it locates elements. Selenium provides several mechanisms for that like regular expressions etc. css=[id$=" no
locator.suffix String The matching suffix to the ID locator prefix. "] no
screenshot.attachment.extension String The file extension to use for screenshot attachments. png no
page.source.attachment.extension String The file extension to use for HTML page source attachments. html no
task.start.timeout int The time the Selenium service waits for an activity to start, in milliseconds. 2000 no
task.completion.timeout int The time the Selenium service waits for an activity to finish, in milliseconds. 45000 no
task.polling.interval int The polling interval for checking task states, in milliseconds. 1000 no
use.local.proxy boolean If true, a local HTTP proxy will be used to allow adding custom HTTP headers. If set to false, no proxy will be used, but the method addCustomHttpHeaderCommand will have no effect. true no
proxy.port.min int The lowest port number to use for the authenticating proxy. 19600 no
driver String The Selenium 2 driver name. Have a look at the org.aludratest.service.gui.web.selenium.selenium2.Drivers enumeration for potential values FIREFOX no
use.remotedriver boolean If true, use Selenium Remote Driver (talk to Selenium RC), otherwise, directly use driver class. false no
browser.arguments String Space-separated list of arguments to pass to the browser. Currently, only the CHROME driver supports additional arguments. no

SeleniumResourceService

Abstraction of a service that provides server resources to AludraTest.

Interface class: org.aludratest.service.gui.web.selenium.SeleniumResourceService
Default implementation: org.aludratest.service.gui.web.selenium.LocalSeleniumResourceService
All known implementations: org.aludratest.service.gui.web.selenium.LocalSeleniumResourceService


Properties for implementation org.aludratest.service.gui.web.selenium.LocalSeleniumResourceService
Name Type Description Default value Required
execution.hosts String Comma-separated list of host names running Selenium. For each Thread configured for AludraTest, one entry must be present. Host names can be appended with :port to specify a different than the default selenium port, e.g. localhost:4445. localhost no
default.selenium.port String The default port for Selenium hosts to use, when no port is specified for a host. 4444 no

AutoRetry

The AutoRetry component is responsible for a given method invocation which caused a given exception if the operation shall be retried, even after a given already performed retry count.
The default implementation can easily be configured using a properties based configuration.

Interface class: org.aludratest.util.retry.AutoRetry
Default implementation: org.aludratest.util.retry.AutoRetryImpl
All known implementations: org.aludratest.util.retry.AutoRetryImpl


Properties for implementation org.aludratest.util.retry.AutoRetryImpl
Name Type Description Default value Required
retry[1..999] AutoRetryEntry A list of retry entries. Each entry configures a circumstance which allows a configured number of retries of the failed operation. no
AutoRetryEntry Type
An entry in the internal list of retry elements.

Name Type Description Default value Required
maxCount int The maximum retry count before no more retries are performed. yes
method String The name of the invoked method for which to perform the retries in case of an exception. yes
interface String The name of a service interface for which this retry entry shall be applied. yes
exception String The name of the exception class which forces a retry when raised on the given method in a service of the given type. yes