org.aludratest.service
Interface AludraService

All Superinterfaces:
AludraCloseable, Closeable
All Known Subinterfaces:
AludraGUI, AludraJMS, AludraWebGUI, CommandLineService, DatabaseService, EdifactFileService, FileService, FlatFileService, SeparatedFileService
All Known Implementing Classes:
AbstractAludraService, AbstractConfigurableAludraService, AbstractSeleniumService, AludraJMSImpl, AludraSelenium1, AludraSelenium2, CommandLineServiceImpl, DefaultFlatFileService, DefaultSeparatedFileService, EdifattoFileService, FileServiceImpl

public interface AludraService
extends AludraCloseable

Common interface for all services that can be tested by AludraTest. Service implementors must provide a default constructor (public and without parameters) and need to initialize when the framework calls the service's init(AludraServiceContext) method.

Author:
Volker Bergmann

Method Summary
 Condition check()
          Called by test code to create a service specific child class of the Condition interface.
 String getDescription()
          Provides a textual description of the most important configuration information to be logged when the service is configured.
 String getInstanceName()
          Returns the instance name which applies to this service instance.
 void init(AludraServiceContext context)
          This method is called by the framework when the service is about to be used.
 Interaction perform()
          Called by test code to create a service specific child class of the Interaction interface.
 void setSystemConnector(SystemConnector connector)
          Allows the client code to inject an SystemConnector for providing informations of a SUT asynchronously.
 Verification verify()
          Called by test code to create a service specific child class of the Verification interface.
 
Methods inherited from interface org.aludratest.service.AludraCloseable
close
 

Method Detail

init

void init(AludraServiceContext context)
This method is called by the framework when the service is about to be used. The service can use the provided context parameter to retrieve instances of other services, and can also store the context parameter reference for later use.

Parameters:
context - Service context which can be used to access other services
Throws:
AutomationException - if the service is misconfigured
AccessFailure - if a required system cannot be connected

getInstanceName

String getInstanceName()
Returns the instance name which applies to this service instance. Could be null in some cases (for some service types), so be careful to handle this case.

Returns:
The instance name which applies to this service instance, or null if not set.

getDescription

String getDescription()
Provides a textual description of the most important configuration information to be logged when the service is configured.

Returns:
a textual description of the most important configuration information

perform

Interaction perform()
Called by test code to create a service specific child class of the Interaction interface. Note that a service interfaces may override this method's signature to declare a more specific Interaction child interface with additional features.

Returns:
the service's Interaction object

verify

Verification verify()
Called by test code to create a service specific child class of the Verification interface. Note that a service interfaces may override this method's signature to declare a more specific Verification child interface with additional features.

Returns:
the service's Verification object

check

Condition check()
Called by test code to create a service specific child class of the Condition interface. Note that a service interfaces may override this method's signature to declare a more specific Condition child interface with additional features.

Returns:
the service's Condition object

setSystemConnector

void setSystemConnector(SystemConnector connector)
Allows the client code to inject an SystemConnector for providing informations of a SUT asynchronously.

Parameters:
connector - the connector to apply


Copyright © 2015 aludratest.org. All rights reserved.