org.squashtest.csp.tm.domain.execution
Class Execution

java.lang.Object
  extended by org.squashtest.csp.tm.domain.execution.Execution
All Implemented Interfaces:
org.squashtest.csp.core.domain.Identified, AttachmentHolder, IssueDetector, HasExecutionStatus

@Entity
public class Execution
extends Object
implements AttachmentHolder, IssueDetector, org.squashtest.csp.core.domain.Identified, HasExecutionStatus


Field Summary
protected  TestCaseExecutionMode executionMode
           
 
Constructor Summary
Execution()
           
Execution(TestCase testCase)
          Creates an execution for the test case references by the given tess plan item.
 
Method Summary
 ExecutionStep findFirstRunnableStep()
           
 ExecutionStep findFirstUnexecutedStep()
           return the first step with a running or a ready state.
 List<Long> getAllIssueListId()
           
 AttachmentList getAttachmentList()
          Should return the container for this object's attachments.
 AutomatedExecutionExtender getAutomatedExecutionExtender()
           
 AutomatedSuite getAutomatedSuite()
           
 AutomatedTest getAutomatedTest()
           
 org.squashtest.csp.core.bugtracker.domain.BugTracker getBugTracker()
           
 CampaignLibrary getCampaignLibrary()
           
 String getDescription()
           
 TestCaseExecutionMode getExecutionMode()
           
 Integer getExecutionOrder()
           
 ExecutionStatus getExecutionStatus()
           
 Long getId()
           
 IssueList getIssueList()
           
 Long getIssueListId()
           
 String getLastExecutedBy()
           
 Date getLastExecutedOn()
           
 ExecutionStep getLastStep()
           
 Set<ExecutionStatus> getLegalStatusSet()
           
 String getName()
           
 String getPrerequisite()
           
 Project getProject()
          will return the (Squash) project that entity belongs to
 TestCase getReferencedTestCase()
           
 String getResultSummary()
           
 URL getResultURL()
           
 List<ExecutionStep> getSteps()
           
 IterationTestPlanItem getTestPlan()
           
 boolean hasUnexecutedSteps()
           
 boolean isAutomated()
           
 void notifyAddedTo(IterationTestPlanItem testPlan)
           
 void setAutomatedExecutionExtender(AutomatedExecutionExtender extender)
           
 void setDescription(String description)
           
 void setExecutionStatus(ExecutionStatus status)
           
 void setLastExecutedBy(String lastExecutedBy)
           
 void setLastExecutedOn(Date lastExecutedOn)
           
 void setName(String name)
           
 void setPrerequisite(String prerequisite)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

executionMode

protected TestCaseExecutionMode executionMode
Constructor Detail

Execution

public Execution()

Execution

public Execution(TestCase testCase)
Creates an execution for the test case references by the given tess plan item. Should be used by IterationTestPlanItem only.

Parameters:
testPlanItem -
Method Detail

getSteps

public List<ExecutionStep> getSteps()

getExecutionStatus

public ExecutionStatus getExecutionStatus()
Specified by:
getExecutionStatus in interface HasExecutionStatus

getExecutionOrder

public Integer getExecutionOrder()

getLastExecutedBy

public String getLastExecutedBy()

setLastExecutedBy

public void setLastExecutedBy(String lastExecutedBy)

getLastExecutedOn

public Date getLastExecutedOn()

setLastExecutedOn

public void setLastExecutedOn(Date lastExecutedOn)

getExecutionMode

public TestCaseExecutionMode getExecutionMode()

getId

public Long getId()
Specified by:
getId in interface org.squashtest.csp.core.domain.Identified

getReferencedTestCase

public TestCase getReferencedTestCase()

getName

public String getName()

setName

public final void setName(String name)

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

getPrerequisite

public String getPrerequisite()

setPrerequisite

public void setPrerequisite(@NotNull
                            String prerequisite)
Parameters:
prerequisite - the prerequisite to set

findFirstUnexecutedStep

public ExecutionStep findFirstUnexecutedStep()

return the first step with a running or a ready state.
Or null if there is none or the execution has no steps

Returns:

hasUnexecutedSteps

public boolean hasUnexecutedSteps()

getAttachmentList

public AttachmentList getAttachmentList()
Description copied from interface: AttachmentHolder
Should return the container for this object's attachments. Should never return null.

Specified by:
getAttachmentList in interface AttachmentHolder
Returns:
the AttachmentList of this object.

getTestPlan

public IterationTestPlanItem getTestPlan()

getCampaignLibrary

public CampaignLibrary getCampaignLibrary()

getProject

public Project getProject()
Description copied from interface: IssueDetector
will return the (Squash) project that entity belongs to

Specified by:
getProject in interface IssueDetector
Returns:
the project of that entity

getIssueList

public IssueList getIssueList()
Specified by:
getIssueList in interface IssueDetector
Returns:
its IssueList

getIssueListId

public Long getIssueListId()
Specified by:
getIssueListId in interface IssueDetector
Returns:
the Id of its IssueList

notifyAddedTo

public void notifyAddedTo(IterationTestPlanItem testPlan)

findFirstRunnableStep

public ExecutionStep findFirstRunnableStep()
                                    throws ExecutionHasNoStepsException,
                                           ExecutionHasNoRunnableStepException
Returns:
the first step not in success.
Throws:
ExecutionHasNoStepsException
ExecutionHasNoRunnableStepException

getLastStep

public ExecutionStep getLastStep()
                          throws ExecutionHasNoStepsException
Returns:
the last step of the execution.
Throws:
ExecutionHasNoStepsException - if there are no steps

getAllIssueListId

public List<Long> getAllIssueListId()
Specified by:
getAllIssueListId in interface IssueDetector
Returns:
the list of ids of its own IssueList and the result of getAllIssueListIds of other Bugged entities to which that Bugged is bound to.

getBugTracker

public org.squashtest.csp.core.bugtracker.domain.BugTracker getBugTracker()
Specified by:
getBugTracker in interface IssueDetector
Returns:
the bugTracker the entity is associated to

getAutomatedExecutionExtender

public AutomatedExecutionExtender getAutomatedExecutionExtender()

setAutomatedExecutionExtender

public void setAutomatedExecutionExtender(AutomatedExecutionExtender extender)

isAutomated

public boolean isAutomated()

setExecutionStatus

public void setExecutionStatus(ExecutionStatus status)

getLegalStatusSet

public Set<ExecutionStatus> getLegalStatusSet()
Specified by:
getLegalStatusSet in interface HasExecutionStatus
Returns:
which ExecutionStatus are available for the implementor : among all ExecutionStatus available not all might be relevant for that entity. The given collection is unmodifiable.

getAutomatedTest

public AutomatedTest getAutomatedTest()

getResultURL

public URL getResultURL()

getAutomatedSuite

public AutomatedSuite getAutomatedSuite()

getResultSummary

public String getResultSummary()


Copyright © 2010-2012 Henix, henix.fr. All Rights Reserved.