com.projectdarkstar.tools.dtc.data
Class TestSpecDTO

java.lang.Object
  extended by com.projectdarkstar.tools.dtc.data.AbstractDTO
      extended by com.projectdarkstar.tools.dtc.data.TestSpecDTO
All Implemented Interfaces:
Serializable

public class TestSpecDTO
extends AbstractDTO

Represents a complete test specification that pulls together all of the details and parameters necessary to run a DTC test.

See Also:
Serialized Form

Constructor Summary
TestSpecDTO(Long id, Long versionNumber, String name, String description, String testRunner, Long timeLimit, Long maxClients)
           
 
Method Summary
 boolean equals(Object o)
           
 List<ClientAppConfigDTO> getClientAppConfigs()
          Returns the list of client application simulator configurations to be used to stress the server during the test.
 List<HardwareResourceFamilyDTO> getClientResources()
           Returns a list of HardwareResourceFamilyDTO objects representing the class of hardware resources that the client application simulators should be run on.
 String getDescription()
           
 Long getId()
          Returns the id of the entity in persistent storage
 Long getMaxClients()
           
 String getName()
           
 List<PropertyDTO> getProperties()
          Returns a list of arguments in the form of PropertyDTO objects to be passed to the TestRunner during run time.
 ServerAppConfigDTO getServerAppConfig()
          Returns the complete configuration required to run the server application to be used as the central process of this test.
 List<HardwareResourceFamilyDTO> getServerResources()
           Returns a list of HardwareResourceFamilyDTO objects representing the class of hardware resources that the server application should be run on.
 List<SystemProbeDTO> getSystemProbes()
          Returns the list of system probes that are to be used to monitor the state of the system while the test is running.
 String getTestRunner()
           Returns the fully qualified class name of the test runner to be used to execute the tests.
 Long getTimeLimit()
          Time limit in seconds to allow the test to run.
 Long getVersionNumber()
          Returns the version number in the data store that this entity represents.
 int hashCode()
           
protected  void setClientAppConfigs(List<ClientAppConfigDTO> clientAppConfigs)
           
protected  void setClientResources(List<HardwareResourceFamilyDTO> clientResources)
           
protected  void setDescription(String description)
           
 void setId(Long id)
           
protected  void setMaxClients(Long maxClients)
           
protected  void setName(String name)
           
protected  void setProperties(List<PropertyDTO> properties)
           
protected  void setServerAppConfig(ServerAppConfigDTO serverAppConfig)
           
protected  void setServerResources(List<HardwareResourceFamilyDTO> serverResources)
           
protected  void setSystemProbes(List<SystemProbeDTO> systemProbes)
           
protected  void setTestRunner(String testRunner)
           
protected  void setTimeLimit(Long timeLimit)
           
 void updateClientAppConfigs(List<ClientAppConfigDTO> clientAppConfigs)
           
 void updateClientResources(List<HardwareResourceFamilyDTO> clientResources)
           
 void updateDescription(String description)
           
 void updateMaxClient(Long maxClients)
           
 void updateName(String name)
           
 void updateProperties(List<PropertyDTO> properties)
           
 void updateServerAppConfig(ServerAppConfigDTO serverAppConfig)
           
 void updateServerResources(List<HardwareResourceFamilyDTO> serverResources)
           
 void updateSystemProbes(List<SystemProbeDTO> systemProbes)
           
 void updateTestRunner(String testRunner)
           
 void updateTimeLimit(Long timeLimit)
           
 void validate()
          Validates that each attribute and pending updated attribute (from the updatedAttributes Map) has a valid value in the context of the particular object.
 
Methods inherited from class com.projectdarkstar.tools.dtc.data.AbstractDTO
checkBlank, checkNull, getFullyPopulated, getUpdatedAttributes, updateAttribute, valueToValidate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestSpecDTO

public TestSpecDTO(Long id,
                   Long versionNumber,
                   String name,
                   String description,
                   String testRunner,
                   Long timeLimit,
                   Long maxClients)
Method Detail

getId

public Long getId()
Returns the id of the entity in persistent storage

Specified by:
getId in class AbstractDTO
Returns:
id of the entity

setId

public void setId(Long id)

getVersionNumber

public Long getVersionNumber()
Returns the version number in the data store that this entity represents. Whenever an update to an object is pushed to the persistent data store, the version number is incremented.

Returns:
version number of the entity

getName

public String getName()

setName

protected void setName(String name)

updateName

public void updateName(String name)
                throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getDescription

public String getDescription()

setDescription

protected void setDescription(String description)

updateDescription

public void updateDescription(String description)
                       throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getTestRunner

public String getTestRunner()

Returns the fully qualified class name of the test runner to be used to execute the tests. Different types of test runners have different behaviors:

Returns:
test runner to be used for the tests

setTestRunner

protected void setTestRunner(String testRunner)

updateTestRunner

public void updateTestRunner(String testRunner)
                      throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getTimeLimit

public Long getTimeLimit()
Time limit in seconds to allow the test to run. If the test runs beyond the time limit, it is terminated.

Returns:
time limit of test

setTimeLimit

protected void setTimeLimit(Long timeLimit)

updateTimeLimit

public void updateTimeLimit(Long timeLimit)
                     throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getMaxClients

public Long getMaxClients()

setMaxClients

protected void setMaxClients(Long maxClients)

updateMaxClient

public void updateMaxClient(Long maxClients)
                     throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getProperties

public List<PropertyDTO> getProperties()
Returns a list of arguments in the form of PropertyDTO objects to be passed to the TestRunner during run time.

Returns:
list of arguments

setProperties

protected void setProperties(List<PropertyDTO> properties)

updateProperties

public void updateProperties(List<PropertyDTO> properties)
                      throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getServerAppConfig

public ServerAppConfigDTO getServerAppConfig()
Returns the complete configuration required to run the server application to be used as the central process of this test.

Returns:
the server application configuration

setServerAppConfig

protected void setServerAppConfig(ServerAppConfigDTO serverAppConfig)

updateServerAppConfig

public void updateServerAppConfig(ServerAppConfigDTO serverAppConfig)
                           throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getClientAppConfigs

public List<ClientAppConfigDTO> getClientAppConfigs()
Returns the list of client application simulator configurations to be used to stress the server during the test.

Returns:
the client application simulator configurations

setClientAppConfigs

protected void setClientAppConfigs(List<ClientAppConfigDTO> clientAppConfigs)

updateClientAppConfigs

public void updateClientAppConfigs(List<ClientAppConfigDTO> clientAppConfigs)
                            throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getSystemProbes

public List<SystemProbeDTO> getSystemProbes()
Returns the list of system probes that are to be used to monitor the state of the system while the test is running.

Returns:
the system probes used to monitor the system during testing

setSystemProbes

protected void setSystemProbes(List<SystemProbeDTO> systemProbes)

updateSystemProbes

public void updateSystemProbes(List<SystemProbeDTO> systemProbes)
                        throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getServerResources

public List<HardwareResourceFamilyDTO> getServerResources()

Returns a list of HardwareResourceFamilyDTO objects representing the class of hardware resources that the server application should be run on. Before running a test, one resource of each family type must be locked.

If there is only one resource in the list, a single node instance of the server is started. If there are multiple resources, the first node is used to startup the core node, while the remaining are used for app nodes.

Returns:
list of server resources

setServerResources

protected void setServerResources(List<HardwareResourceFamilyDTO> serverResources)

updateServerResources

public void updateServerResources(List<HardwareResourceFamilyDTO> serverResources)
                           throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getClientResources

public List<HardwareResourceFamilyDTO> getClientResources()

Returns a list of HardwareResourceFamilyDTO objects representing the class of hardware resources that the client application simulators should be run on. Before running a test, one resource of each family type must be locked.

Each client is assigned to a resource in round-robin fashion. A resource may be assigned more than one client application simulator.

Returns:
list of client resources

setClientResources

protected void setClientResources(List<HardwareResourceFamilyDTO> clientResources)

updateClientResources

public void updateClientResources(List<HardwareResourceFamilyDTO> clientResources)
                           throws DTCInvalidDataException
Throws:
DTCInvalidDataException

validate

public void validate()
              throws DTCInvalidDataException
Description copied from class: AbstractDTO
Validates that each attribute and pending updated attribute (from the updatedAttributes Map) has a valid value in the context of the particular object.

Specified by:
validate in class AbstractDTO
Throws:
DTCInvalidDataException

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2013. All Rights Reserved.