Package com.piketec.tpt.api
Interface TestSet
-
- All Superinterfaces:
IdentifiableRemote
,NamedObject
,java.rmi.Remote
,TestSetOrGroup
,TptRemote
,UUIDObject
public interface TestSet extends TestSetOrGroup
ATestSet
represents a set oftest cases
. Test cases have to be selected explicitly but they can be restricted further dynamically by atest set conditon
or by restricting}them to test cases linked to requirments of aselected requirement set
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addTestCase(Scenario tc)
Deprecated.will be removed in TPT 21.void
addTestCaseOrGroup(ScenarioOrGroup tcg)
Add a new test case to the test set.java.lang.String
getCondition()
Get the test set condition.RequirementSet
getRequirementSet()
Get the requirement set.RemoteCollection<ScenarioOrGroup>
getSelectedTestCasesOrGroups()
Get the selected test cases and test case groups without taking the test set condition into account.RemoteCollection<Scenario>
getTestCases()
Deprecated.boolean
isConditionEnabled()
Returns whether thetest set condition
is enabled.boolean
isLocked()
A test set can be locked to avoid accidental changes of the set of selectedtest cases or test case groups
.boolean
isRestrictedToLinkedTestCases()
Returnstrue
iff only test cases linked to a requirement that is part of the selected requirement set are considered as part of the test set.void
setCondition(java.lang.String condition)
Get the test set condition.void
setConditionEnabled(boolean enabled)
Set if thetest set condition
is enabled.void
setLocked(boolean locked)
A test set can be locked to avoid accidental changes of the set of selectedtest cases or test case groups
.void
setRequirementSet(RequirementSet requirementSet)
Set the requirement set.void
setRestrictedToLinkedTestCases(boolean restrict)
Set iff only test cases linked to a requirement that is part of the selected requirement set are considered as part of the test set.-
Methods inherited from interface com.piketec.tpt.api.IdentifiableRemote
getIdentifier
-
Methods inherited from interface com.piketec.tpt.api.NamedObject
getName, setName
-
Methods inherited from interface com.piketec.tpt.api.TestSetOrGroup
copy, getGroup, isGroup, move
-
Methods inherited from interface com.piketec.tpt.api.util.UUIDObject
getUUID
-
-
-
-
Method Detail
-
getTestCases
@Deprecated RemoteCollection<Scenario> getTestCases() throws java.rmi.RemoteException
Deprecated.UsegetSelectedTestCasesOrGroups()
. Removed in TPT-19. ThrowsDeprecatedAndRemovedException
- Returns:
- The
set
of alltest cases
that are assigned to thisTestSet
and are not suppresed by its test set condition (using default values to evaluate the condition). - Throws:
java.rmi.RemoteException
- remote communication problem
-
getSelectedTestCasesOrGroups
RemoteCollection<ScenarioOrGroup> getSelectedTestCasesOrGroups() throws java.rmi.RemoteException
Get the selected test cases and test case groups without taking the test set condition into account. If a group is contained in the set all descendent scenarios in this group are contained in the set as well. Please note that you cannot remove items from this collection if test setisLocked()
- Returns:
- The raw selected test cases and test case groups.
- Throws:
java.rmi.RemoteException
- remote communication problem- See Also:
isLocked()
,getCondition()
,isRestrictedToLinkedTestCases()
-
addTestCase
@Deprecated void addTestCase(Scenario tc) throws ApiException, java.rmi.RemoteException
Deprecated.will be removed in TPT 21. UseaddTestCaseOrGroup(ScenarioOrGroup tcg)
wich support sceanrio groups.Add a new test case to the test set.A test case is a
Scenario
that is placed directly or in any sub-group of the top levelScenarioGroup
of the top levelTestlet
of a TPT project.- Parameters:
tc
- The test case to be added to theTestSet
- Throws:
ApiException
-- If the test set is locked
- If the given
Scenario
is not a test case or not from the current TPT instance.
java.rmi.RemoteException
- remote communication problem- See Also:
ScenarioOrGroup.isTestcaseOrGroup()
,Project.getTopLevelTestlet()
,Testlet.getTopLevelScenarioOrGroup()
,isLocked()
-
addTestCaseOrGroup
void addTestCaseOrGroup(ScenarioOrGroup tcg) throws ApiException, java.rmi.RemoteException
Add a new test case to the test set.A test case is a
Scenario
that is placed directly or in any sub-group of the top levelScenarioGroup
of the top levelTestlet
of a TPT project.- Parameters:
tcg
- The test case or the test case group to be added to theTestSet
- Throws:
ApiException
-- If the test set is locked
- If the given
Scenario
is not a test case or not from the current TPT instance.
java.rmi.RemoteException
- remote communication problem- See Also:
ScenarioOrGroup.isTestcaseOrGroup()
,Project.getTopLevelTestlet()
,Testlet.getTopLevelScenarioOrGroup()
,isLocked()
-
isLocked
boolean isLocked() throws java.rmi.RemoteException
A test set can be locked to avoid accidental changes of the set of selectedtest cases or test case groups
. No test cases can be added to or removed from a locked test set.- Returns:
false
if the scenario selection can be changedtrue
otherwise- Throws:
java.rmi.RemoteException
- remote communication problem
-
setLocked
void setLocked(boolean locked) throws java.rmi.RemoteException
A test set can be locked to avoid accidental changes of the set of selectedtest cases or test case groups
. No test cases can be added to or removed from a locked test set.- Parameters:
locked
-false
to make the scenario selection editabletrue
otherwise- Throws:
java.rmi.RemoteException
- remote communication problem
-
getCondition
java.lang.String getCondition() throws java.rmi.RemoteException
Get the test set condition. If the condition isenabled
only test cases that fulfill the condition are considered as part of the test set.Selected
test cases that do not fulfill the condition will be suppressed.- Returns:
- the test set condition
- Throws:
java.rmi.RemoteException
- remote communication problem- See Also:
isConditionEnabled()
-
setCondition
void setCondition(java.lang.String condition) throws java.rmi.RemoteException
Get the test set condition. If the condition isenabled
only test cases that fulfill the condition are considered as part of the test set.Selected
test cases that do not fulfill the condition will be suppressed.- Parameters:
condition
- The condition to set.null
will be corrected to an empty string.- Throws:
java.rmi.RemoteException
- remote communication problem- See Also:
setConditionEnabled(boolean)
-
isConditionEnabled
boolean isConditionEnabled() throws java.rmi.RemoteException
Returns whether thetest set condition
is enabled. The condition will only be evaluated and will only suppress selected test cases iff it is enabled.- Returns:
true
if the test case condition will suppress selected test casesfalse
otherwise.- Throws:
java.rmi.RemoteException
- remote communication problem- See Also:
getCondition()
-
setConditionEnabled
void setConditionEnabled(boolean enabled) throws java.rmi.RemoteException
Set if thetest set condition
is enabled. The condition will only be evaluated and will only suppress selected test cases iff it is enabled.- Parameters:
enabled
-true
if the test case condition shall suppress selected test casesfalse
otherwise.- Throws:
java.rmi.RemoteException
- remote communication problem- See Also:
setCondition(String)
-
getRequirementSet
RequirementSet getRequirementSet() throws java.rmi.RemoteException
Get the requirement set. The requirement set can be used to restrict the selected test cases to test cases that are linked to a requirement of the given requirement set.- Returns:
- The selected requirement set or
null
for the implicit requirement set containing all requirements. - Throws:
java.rmi.RemoteException
- remote communication problem- See Also:
isRestrictedToLinkedTestCases()
-
setRequirementSet
void setRequirementSet(RequirementSet requirementSet) throws java.rmi.RemoteException
Set the requirement set. The requirement set can be used to restrict the selected test cases to test cases that are linked to a requirement of the given requirement set.- Parameters:
requirementSet
- The requirement set to set ornull
for the implicit requirement set containing all requirements.- Throws:
java.rmi.RemoteException
- remote communication problem- See Also:
setRestrictedToLinkedTestCases(boolean)
-
isRestrictedToLinkedTestCases
boolean isRestrictedToLinkedTestCases() throws java.rmi.RemoteException
Returnstrue
iff only test cases linked to a requirement that is part of the selected requirement set are considered as part of the test set.Selected
test cases that are not linked to such a requirement are suppressed.- Returns:
true
if test cases are suppressed based on the selected requirement setfalse
otherwise.- Throws:
java.rmi.RemoteException
- remote communication problem- See Also:
getRequirementSet()
-
setRestrictedToLinkedTestCases
void setRestrictedToLinkedTestCases(boolean restrict) throws java.rmi.RemoteException
Set iff only test cases linked to a requirement that is part of the selected requirement set are considered as part of the test set.Selected
test cases that are not linked to such a requirement will be suppressed.- Parameters:
restrict
-true
if test cases shall be suppressed based on the selected requirement setfalse
otherwise.- Throws:
java.rmi.RemoteException
- remote communication problem- See Also:
setRequirementSet(RequirementSet)
-
-