org.squashtest.tm.domain.testcase
@Entity
@Indexed
@ClassBridges(value={@ClassBridge(name="attachments",store=YES,impl=TestCaseAttachmentBridge.class),@ClassBridge(name="callsteps",store=YES,impl=TestCaseCallStepBridge.class),@ClassBridge(name="iterations",store=YES,impl=TestCaseIterationBridge.class),@ClassBridge(name="executions",store=YES,impl=TestCaseExecutionBridge.class),@ClassBridge(name="issues",store=YES,impl=TestCaseIssueBridge.class),@ClassBridge(name="cufs",store=YES,impl=CUFBridge.class,params={,}),@ClassBridge(name="cufs",store=YES,analyze=NO,impl=CUFBridge.class,params={,})})
public class TestCase
extends TestCaseLibraryNode
implements AttachmentHolder, BoundEntity
| Constructor and Description |
|---|
TestCase() |
TestCase(Date createdOn,
String createdBy) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(NodeVisitor visitor) |
void |
accept(TestCaseLibraryNodeVisitor visitor) |
void |
addDataset(Dataset dataset) |
protected void |
addParameter(Parameter parameter)
If the given parameter doesn't already exists in this.parameters, and, if the given parameter's name is not found
in this.parmeters : will add the given parameter to this.parameters.
|
void |
addRequirementCoverage(RequirementVersionCoverage requirementVersionCoverage)
Set the verifying test case as this, and add the coverage the the this.requirementVersionCoverage
|
void |
addStep(int index,
TestStep step) |
void |
addStep(TestStep step) |
void |
checkRequirementNotVerified(RequirementVersion version)
checks if the given version is already verified.
|
void |
checkRequirementNotVerified(RequirementVersionCoverage requirementVersionCoverage,
RequirementVersion version)
Checks if the given version is already verified, avoiding to look at the given requirementVersionCoverage.
|
TestCase |
createCopy()
Will create a copy from this instance.
|
List<RequirementVersionCoverage> |
createRequirementVersionCoveragesForCopy(TestCase copy)
Copy this.requirementVersionCoverages .
|
Parameter |
findParameterByName(String name)
Will go through this.parameters and return the Parameter matching the given name
|
Set<String> |
findUsedParamsNamesInSteps()
Will find the names of all parameters used in this test case's steps.
|
List<ActionTestStep> |
getActionSteps() |
AutomatedTest |
getAutomatedTest() |
Long |
getBoundEntityId() |
BindableEntity |
getBoundEntityType() |
String |
getClassName() |
String |
getClassSimpleName() |
Set<Dataset> |
getDatasets() |
TestCaseExecutionMode |
getExecutionMode() |
String |
getFullName() |
TestCaseImportance |
getImportance() |
TestCaseNature |
getNature() |
Set<Parameter> |
getParameters() |
int |
getPositionOfStep(long stepId)
Will compare id of test-case steps with given id and return the index of the matching step.
|
String |
getPrerequisite() |
String |
getReference() |
Set<RequirementVersionCoverage> |
getRequirementVersionCoverages() |
TestCaseStatus |
getStatus() |
List<TestStep> |
getSteps() |
TestCaseType |
getType() |
Set<RequirementVersion> |
getVerifiedRequirementVersions() |
int |
getVersion() |
boolean |
hasStep(TestStep step)
Returns true if a step of the same id is found in this.steps.
|
boolean |
isAutomated() |
boolean |
isImportanceAuto() |
void |
moveStep(int stepIndex,
int newIndex) |
void |
moveSteps(int newIndex,
List<TestStep> movedSteps)
Will move a list of steps to a new position.
|
void |
removeAutomatedScript() |
void |
removeRequirementVersionCoverage(RequirementVersionCoverage requirementVersionCoverage)
Simply remove the RequirementVersionCoverage from this.requirementVersionCoverages.
|
void |
setAutomatedTest(AutomatedTest testAutomationTest) |
void |
setExecutionMode(TestCaseExecutionMode executionMode) |
void |
setImportance(TestCaseImportance weight) |
void |
setImportanceAuto(boolean importanceAuto) |
void |
setNature(TestCaseNature nature) |
void |
setPrerequisite(String prerequisite) |
void |
setReference(String reference)
Set the test-case reference
|
void |
setStatus(TestCaseStatus status) |
void |
setType(TestCaseType type) |
boolean |
verifies(RequirementVersion rVersion) |
equals, getAllAttachments, getId, getLibrary, hashCodegetAttachmentList, getDescription, getName, getProject, notifyAssociatedWithProject, setDescription, setNameclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetAttachmentListgetProjectpublic int getVersion()
public String getReference()
public String getFullName()
public void setReference(String reference)
reference - public String getPrerequisite()
public TestCaseExecutionMode getExecutionMode()
isAutomated()public void setExecutionMode(@NotNull
TestCaseExecutionMode executionMode)
public void addStep(@NotNull
TestStep step)
public void addStep(int index,
@NotNull
TestStep step)
public void moveStep(int stepIndex,
int newIndex)
public void moveSteps(int newIndex,
List<TestStep> movedSteps)
newIndex - the position we want the first element of movedSteps to be once the operation is completemovedSteps - the list of steps to move, sorted by rank among each others.public void accept(TestCaseLibraryNodeVisitor visitor)
accept in class TestCaseLibraryNodepublic TestCase createCopy()
RequirementVersionCoverages !createCopy in interface CopiableTestCasepublic int getPositionOfStep(long stepId)
throws UnknownEntityException
stepId - UnknownEntityExceptionpublic String getClassSimpleName()
getClassSimpleName in interface SelfClassAwarepublic String getClassName()
getClassName in interface SelfClassAwarepublic TestCaseImportance getImportance()
public void setImportance(@NotNull
TestCaseImportance weight)
weight - the weight to setpublic TestCaseNature getNature()
public void setNature(@NotNull
TestCaseNature nature)
public TestCaseType getType()
public void setType(@NotNull
TestCaseType type)
public TestCaseStatus getStatus()
public void setStatus(@NotNull
TestCaseStatus status)
public void setPrerequisite(@NotNull
String prerequisite)
prerequisite - the prerequisite to setpublic boolean isImportanceAuto()
public void setImportanceAuto(boolean importanceAuto)
importanceAuto - the importanceAuto to setpublic AutomatedTest getAutomatedTest()
public void setAutomatedTest(AutomatedTest testAutomationTest)
public void removeAutomatedScript()
public boolean isAutomated()
public Long getBoundEntityId()
getBoundEntityId in interface BoundEntitypublic BindableEntity getBoundEntityType()
getBoundEntityType in interface BoundEntitypublic void accept(NodeVisitor visitor)
public List<ActionTestStep> getActionSteps()
ActionTestStep or empty listpublic Set<RequirementVersion> getVerifiedRequirementVersions()
public void checkRequirementNotVerified(RequirementVersionCoverage requirementVersionCoverage, RequirementVersion version) throws RequirementAlreadyVerifiedException
requirementVersionCoverage - version - RequirementAlreadyVerifiedExceptionpublic void addRequirementCoverage(RequirementVersionCoverage requirementVersionCoverage)
requirementVersionCoverage - public List<RequirementVersionCoverage> createRequirementVersionCoveragesForCopy(TestCase copy)
RequirementVersionCoverage having for verifying test case the
copy param.copy - : the TestCase that will verify the copied coveragesRequirementVersionCoveragespublic boolean hasStep(TestStep step)
step - : the step to checkTestCase has the given step.public void removeRequirementVersionCoverage(RequirementVersionCoverage requirementVersionCoverage)
requirementVersionCoverage - : the entity to remove from this test case's RequirementVersionCoverages list.public Set<RequirementVersionCoverage> getRequirementVersionCoverages()
RequirementVersionCoveragespublic boolean verifies(RequirementVersion rVersion)
calledVersion - TestCase verifies the RequirementVersionpublic void checkRequirementNotVerified(RequirementVersion version) throws RequirementAlreadyVerifiedException
version - RequirementAlreadyVerifiedExceptionprotected void addParameter(@NotNull
Parameter parameter)
parameter - NameAlreadyInUseExceptionpublic void addDataset(@NotNull
Dataset dataset)
public Parameter findParameterByName(String name)
name - : the name of the parameter to returnnullCopyright © 2010-2014 Henix, henix.fr. All Rights Reserved.