com.projectdarkstar.tools.dtc.data
Class TestExecutionDTO

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

public class TestExecutionDTO
extends AbstractDTO

Represents an instance of an execution of a TestSuiteDTO. A TestExecution also retains all of the configuration options, parameters, and names of the TestSuiteDTO as it was at the point in time that the TestExecution was created. Additionally, complete result information and log files for the executed test are stored.

See Also:
Serialized Form

Constructor Summary
TestExecutionDTO(Long id, Long versionNumber, String name, Date dateStarted, Date dateFinished, String originalTestSuiteName, String originalTestSuiteDescription)
           
 
Method Summary
 boolean equals(Object o)
           
 Date getDateFinished()
           
 Date getDateStarted()
           
 Long getId()
          Returns the id of the entity in persistent storage
 String getName()
           
 TestSuiteDTO getOriginalTestSuite()
          Returns the original TestSuiteDTO that this test execution is based on.
 PkgLibraryDTO getOriginalTestSuiteDarkstarPkg()
          Returns the original PkgLibraryDTO for the darkstar package required to run the tests.
 String getOriginalTestSuiteDescription()
           
 String getOriginalTestSuiteName()
           
 List<TestExecutionResultDTO> getResults()
          Returns a list of TestExecutionResultDTO objects that were executed as part of this test execution.
 List<TestExecutionTagDTO> getTags()
          Returns a list of TestExecutionTagDTO objects that are used to categorize test executions into groups.
 Long getVersionNumber()
          Returns the version number in the data store that this entity represents.
 int hashCode()
           
protected  void setDateFinished(Date dateFinished)
           
protected  void setDateStarted(Date dateStarted)
           
 void setId(Long id)
           
protected  void setName(String name)
           
protected  void setOriginalTestSuiteDarkstarPkg(PkgLibraryDTO originalTestSuiteDarkstarPkg)
           
protected  void setResults(List<TestExecutionResultDTO> results)
           
protected  void setTags(List<TestExecutionTagDTO> tags)
           
 void updateDateFinished(Date dateFinished)
           
 void updateDateStarted(Date dateStarted)
           
 void updateName(String name)
           
 void updateOriginalTestSuiteDarkstarPkg(PkgLibraryDTO originalTestSuiteDarkstarPkg)
           
 void updateResults(List<TestExecutionResultDTO> results)
           
 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

TestExecutionDTO

public TestExecutionDTO(Long id,
                        Long versionNumber,
                        String name,
                        Date dateStarted,
                        Date dateFinished,
                        String originalTestSuiteName,
                        String originalTestSuiteDescription)
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

getDateStarted

public Date getDateStarted()

setDateStarted

protected void setDateStarted(Date dateStarted)

updateDateStarted

public void updateDateStarted(Date dateStarted)
                       throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getDateFinished

public Date getDateFinished()

setDateFinished

protected void setDateFinished(Date dateFinished)

updateDateFinished

public void updateDateFinished(Date dateFinished)
                        throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getTags

public List<TestExecutionTagDTO> getTags()
Returns a list of TestExecutionTagDTO objects that are used to categorize test executions into groups.

Returns:
list of tags for this test execution

setTags

protected void setTags(List<TestExecutionTagDTO> tags)

getResults

public List<TestExecutionResultDTO> getResults()
Returns a list of TestExecutionResultDTO objects that were executed as part of this test execution.

Returns:
list of results

setResults

protected void setResults(List<TestExecutionResultDTO> results)

updateResults

public void updateResults(List<TestExecutionResultDTO> results)
                   throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getOriginalTestSuiteDarkstarPkg

public PkgLibraryDTO getOriginalTestSuiteDarkstarPkg()
Returns the original PkgLibraryDTO for the darkstar package required to run the tests. This attribute can be customized to run this test execution against a different darkstar package if required.

Returns:
original darkstar package required to run the tests

setOriginalTestSuiteDarkstarPkg

protected void setOriginalTestSuiteDarkstarPkg(PkgLibraryDTO originalTestSuiteDarkstarPkg)

updateOriginalTestSuiteDarkstarPkg

public void updateOriginalTestSuiteDarkstarPkg(PkgLibraryDTO originalTestSuiteDarkstarPkg)
                                        throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getOriginalTestSuiteName

public String getOriginalTestSuiteName()

getOriginalTestSuiteDescription

public String getOriginalTestSuiteDescription()

getOriginalTestSuite

public TestSuiteDTO getOriginalTestSuite()
Returns the original TestSuiteDTO that this test execution is based on.

Returns:
original TestSuiteDTO used to create the test execution

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.