@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, MilestoneHolder
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_REF_SIZE |
| 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 |
bindAllMilsetones(List<Milestone> ms) |
void |
bindMilestone(Milestone milestone) |
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.
|
void |
clearMilestones() |
static TestCase |
createBlankTestCase()
Creates a test case which non-collection, non-primitive type fields are set to null.
|
TestCase |
createCopy()
Will create a copy from this instance.
|
List<RequirementVersionCoverage> |
createRequirementVersionCoveragesForCopy(TestCase copy)
Copy this.requirementVersionCoverages .
|
Boolean |
doMilestonesAllowCreation() |
Boolean |
doMilestonesAllowEdition() |
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() |
Set<Milestone> |
getAllMilestones() |
AutomatedTest |
getAutomatedTest() |
Long |
getBoundEntityId() |
BindableEntity |
getBoundEntityType() |
String |
getClassName() |
String |
getClassSimpleName() |
Set<Dataset> |
getDatasets() |
TestCaseExecutionMode |
getExecutionMode() |
String |
getFullName() |
TestCaseImportance |
getImportance() |
Boolean |
getImportanceAuto()
Same as
isImportanceAuto(), required as per javabean spec since it returns a Boolean instead of a
boolean. |
Set<Milestone> |
getMilestones() |
InfoListItem |
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() |
InfoListItem |
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() |
boolean |
isMemberOf(Milestone milestone) |
boolean |
isModifiable() |
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 |
removeDataset(Dataset dataset) |
void |
removeRequirementVersionCoverage(RequirementVersionCoverage requirementVersionCoverage)
Deprecated.
does not seem to be used in 1.14 - to be removed
|
void |
setAutomatedTest(AutomatedTest testAutomationTest) |
void |
setExecutionMode(TestCaseExecutionMode executionMode) |
void |
setImportance(TestCaseImportance weight) |
void |
setImportanceAuto(Boolean importanceAuto) |
void |
setNature(InfoListItem nature) |
void |
setPrerequisite(String prerequisite) |
void |
setReference(String reference)
Set the test-case reference
|
void |
setStatus(TestCaseStatus status) |
void |
setType(InfoListItem type) |
void |
unbindAllMilestones() |
void |
unbindMilestone(Long milestoneId) |
void |
unbindMilestone(Milestone milestone) |
boolean |
verifies(RequirementVersion rVersion) |
getAllAttachments, getGenericNodeClass, getId, getLibraryequals, getAttachmentList, getDescription, getName, getProject, hashCode, notifyAssociatedWithProject, setDescription, setNameclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetAttachmentListgetProjectgetIdgetProjectpublic static final int MAX_REF_SIZE
public 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 InfoListItem getNature()
public void setNature(@NotNull
InfoListItem nature)
public InfoListItem getType()
public void setType(@NotNull
InfoListItem 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(@NotNull
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.@Deprecated 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 void removeDataset(@NotNull
Dataset dataset)
public Set<Milestone> getMilestones()
getMilestones in interface MilestoneMemberpublic void bindMilestone(Milestone milestone)
bindMilestone in interface MilestoneHolderpublic void unbindMilestone(Milestone milestone)
unbindMilestone in interface MilestoneHolderpublic void unbindMilestone(Long milestoneId)
unbindMilestone in interface MilestoneHolderpublic void clearMilestones()
public boolean isMemberOf(Milestone milestone)
isMemberOf in interface MilestoneMemberpublic Parameter findParameterByName(String name)
name - : the name of the parameter to returnnullpublic Set<String> findUsedParamsNamesInSteps()
public static TestCase createBlankTestCase()
public Boolean getImportanceAuto()
isImportanceAuto(), required as per javabean spec since it returns a Boolean instead of a
boolean.public void unbindAllMilestones()
unbindAllMilestones in interface MilestoneHolderMilestoneHolder.unbindAllMilestones()public boolean isModifiable()
public Boolean doMilestonesAllowCreation()
doMilestonesAllowCreation in interface MilestoneMemberpublic Boolean doMilestonesAllowEdition()
doMilestonesAllowEdition in interface MilestoneMemberCopyright © 2010–2016 Henix, henix.fr. All rights reserved.