Interface Project
-
- All Superinterfaces:
AssessmentOwner
,ExecutionConfigurationOwner
,IdentifiableRemote
,java.rmi.Remote
,TestSetOwner
,TptRemote
public interface Project extends AssessmentOwner, ExecutionConfigurationOwner, TestSetOwner
This object represents a TPT project. It has been either newly created withTptApi.newProject(File)
or opened viaTptApi.openProject(File)
.- Author:
- Copyright (c) 2014-2024 Piketec GmbH - MIT License (MIT) - All rights reserved
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Project.RequirementsLinking
Modes that determine which types of requirement links are included in calculations.static class
Project.SynchronizationMethod
Modes how to match existing declarations and imported declarations.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description FormalRequirementDefine
addFormalRequirementDefine(java.lang.String name, java.lang.String value)
Adds adefine
to the current TPT project.boolean
closeProject()
Closes the project represented by this object in the TPT GUI.Assessment
createAssessment(java.lang.String name, java.lang.String type, AssessmentGroup groupOrNull)
Creates a newAssessment
with the given name and the given type below the givenAssessmentGroup
.AssessmentGroup
createAssessmentGroup(java.lang.String name, AssessmentGroup groupOrNull)
Create aAssessmentGroup
with the given name and within the given parentAssessmentGroup
.AssessmentVariable
createAssessmentVariable(java.lang.String name)
Creates a new assessment variable with the given name.Channel
createChannel(java.lang.String name)
Creates a new channel with the given name.Constant
createConstant(java.lang.String name)
Creates a new constant with the given name.boolean
createdWithCurrentVersion()
ExecutionConfiguration
createExecutionConfiguration(java.lang.String name)
Creates a newExecutionConfiguration
with the given name at top level.ExecutionConfiguration
createExecutionConfiguration(java.lang.String name, ExecutionConfigurationGroup groupOrNull)
Creates a newExecutionConfiguration
with the given name below the givenExecutionConfigurationGroup
.ExecutionConfigurationGroup
createExecutionConfigurationGroup(java.lang.String name, ExecutionConfigurationGroup groupOrNull)
Creates a newExecutionConfigurationGroup
with the given name below the givenExecutionConfigurationGroup
.Mapping
createMapping(java.lang.String name)
Create a newMapping
with thegiven
name.Measurement
createMeasurement(java.lang.String name)
Creates a new measurement with the given name.Parameter
createParameter(java.lang.String name)
Creates a new parameter with the given name.PlatformConfiguration
createPlatformConfiguration(java.lang.String name, java.lang.String type)
Create a newPlatformConfiguration
with the given name and the given type.Requirement
createRequirement(java.lang.String id, java.lang.String document, java.lang.String text, Requirement.RequirementType type)
Adds a new requirement to this project.RequirementSet
createRequirementSet(java.lang.String name, java.lang.String condition)
Add a new requirement set to this project.void
createStatusType(java.lang.String status)
Creates a new status type for this project.TestCaseAttribute
createTestCaseAttribute(java.lang.String name, TestCaseAttribute.TestCaseAttributeType type)
Create a newTestCaseAttribute
TestCaseAttribute
createTestCaseAttribute(java.lang.String name, java.lang.String type)
Deprecated.will be removed in TPT-21.TestSet
createTestSet(java.lang.String name)
Create a newTestSet
with the given name.TestSet
createTestSet(java.lang.String name, TestSetGroup groupOrNull)
Creates a newTestSet
with the given name below the givenTestSetGroup
.TestSetGroup
createTestSetGroup(java.lang.String name, TestSetGroup groupOrNull)
Creates a newTestSetGroup
with the given name below the givenTestSetGroup
.Type
createType(java.lang.String nameOrNull, java.lang.String typeString)
Create a new type.Unit
createUnit(java.lang.String name, java.lang.String symbol)
Creates a newUnit
for this project.java.util.List<java.lang.String>
exportEquivalenceClasses(java.io.File f)
java.util.List<java.lang.String>
exportEquivalenceClassesByPath(java.lang.String f)
void
exportRequirements(RequirementsExportSettings exportSettings)
Exports the requirements to a CSV or an Excel file to import the changes to a test management tool.void
exportTestCases(TestCasesExportSettings exportSettings)
Exports the test cases to a CSV, Excel, or ReqIF file to import the changes to a test management tool.void
exportTestResults(TestResultsExporterKey key)
Exports the last test results to an extern destination.java.util.List<java.lang.String>
generateTestCasesFromEquivalenceClasses(ScenarioOrGroup scenarioOrGroup, GenerateTestCasesFromEquivalenceClassessSettings settings, java.util.Map<Declaration,java.util.Collection<java.lang.String>> equivalenceClassMap)
This method provides the functionality to generatetest cases
from equivalence classes.java.lang.String
generateTestCasesFromTestData(ScenarioGroup scenarioGroup, java.io.File dir, java.lang.String filePatternOrNull, boolean includeSubdirs, java.lang.String channelPatternOrNull, boolean linkSignals, java.lang.String renameMappingNameOrNull, boolean createAssesslets, java.lang.String timeTolOrNull, java.lang.String valueTolOrNull, boolean createLocalReferenceChannels, boolean addTerminationCondition, boolean assignParameters, boolean updateExistingGeneratedScenarios)
Imports existing test data as step lists to TPT.java.lang.String
generateTestCasesFromTestDataByPath(ScenarioGroup scenarioGroup, java.lang.String dir, java.lang.String filePatternOrNull, boolean includeSubdirs, java.lang.String channelPatternOrNull, boolean linkSignals, java.lang.String renameMappingNameOrNull, boolean createAssesslets, java.lang.String timeTolOrNull, java.lang.String valueTolOrNull, boolean createLocalReferenceChannels, boolean addTerminationCondition, boolean assignParameters, boolean updateExistingGeneratedScenarios)
Imports existing test data as step lists to TPT.AssessmentOrGroup
getAssessmentOrGroupByID(java.lang.String id)
Delivers the assessment or assessment group with the given id ornull
if no such assessment or assessment group exists.AssessmentOrGroup
getAssessmentOrGroupByName(java.lang.String name)
Delivers the first assessment or assessment group with the given name ornull
if no such assessment or assessment group exists.java.util.Collection<AssessmentOrGroup>
getAssessmentOrGroupByNamePattern(java.lang.String namepattern)
Delivers all assessments and/or assessment groups, matching the given name pattern.java.util.Collection<AssessmentOrGroup>
getAssessmentOrGroupByNamePattern(java.util.regex.Pattern namepattern)
Delivers all assessments and/or assessment groups, matching the given name pattern.AssessmentOrGroup
getAssessmentOrGroupByUUID(java.util.UUID uuid)
Delivers the assessment or assessment group with the given uuid ornull
if no such assessment or assessment group exists.int
getCreatedWithFileFormatVersion()
java.lang.String
getCreatedWithTptVersionName()
RemoteIndexedList<java.lang.String,Declaration>
getDeclarations()
Returns an indexed list of allDeclarations
defined in this project.Assessment
getDefaultReportSection()
Get the default report section.ExecutionConfigurationOrGroup
getExecutionConfigurationOrGroupByName(java.lang.String name)
Delivers the first execution configuration or group with the given name ornull
if no such execution configuration or group exists.java.util.Collection<ExecutionConfigurationOrGroup>
getExecutionConfigurationOrGroupByNamePattern(java.lang.String namepattern)
Delivers all execution configurations and/or groups, matching the given name pattern.java.util.Collection<ExecutionConfigurationOrGroup>
getExecutionConfigurationOrGroupByNamePattern(java.util.regex.Pattern namepattern)
Delivers all execution configurations and/or groups, matching the given name pattern.RemoteCollection<ExecutionConfiguration>
getExecutionConfigurations()
java.rmi.Remote
getExtensionOrNull(java.lang.String key)
Returns an entry point for an API extension of the given type.java.io.File
getFile()
Returns theFile
that is associated with this TPT project.java.lang.String
getFilePath()
Returns the path to the file that is associated with this TPT project.RemoteIndexedList<java.lang.String,FormalRequirementDefine>
getFormalRequirementDefines()
Returns alldefines
of allRequirement
of the current TPT project.RequirementsImportSettings
getLastImportRequirementsSettings(java.lang.String documentName)
Delivers the last used requirements import settings for the given document name ornull
if no settings exist.Mapping
getMappingByName(java.lang.String name)
Delivers the first mapping with the given name ornull
if no such mapping exists.java.util.Collection<Mapping>
getMappingByNamePattern(java.lang.String namepattern)
Delivers all mappings, matching the given name pattern.java.util.Collection<Mapping>
getMappingByNamePattern(java.util.regex.Pattern namepattern)
Delivers all mappings, matching the given name pattern.RemoteList<Mapping>
getMappings()
PlatformConfiguration
getPlatformConfigurationByName(java.lang.String name)
Delivers the first platform configuration with the given name ornull
if no such platform configuration exists.java.util.Collection<PlatformConfiguration>
getPlatformConfigurationByNamePattern(java.lang.String namepattern)
Delivers all Platform configurations, matching the given name pattern.java.util.Collection<PlatformConfiguration>
getPlatformConfigurationByNamePattern(java.util.regex.Pattern namepattern)
Delivers all Platform configurations, matching the given name pattern.RemoteList<PlatformConfiguration>
getPlatformConfigurations()
RemoteIndexedList<java.lang.String,Requirement>
getRequirements()
Get the list of all requirements of this project.java.util.List<java.lang.String>
getRequirementsDocuments()
Delivers the names of all requirements documents contained in the project in alphabetical order.RemoteList<RequirementSet>
getRequirementSets()
Get the list of all requirement sets of this project.Project.RequirementsLinking
getRequirementsLinking()
Returns theProject.RequirementsLinking
used for this project.ScenarioOrGroup
getScenarioOrGroupByID(java.lang.String id)
Delivers the scenario or scenario group with the given id ornull
if no such scenario or scenario group exists.ScenarioOrGroup
getScenarioOrGroupByName(java.lang.String name)
Delivers the first scenario or scenario group with the given name ornull
if no such scenario or scenario group exists.java.util.Collection<ScenarioOrGroup>
getScenarioOrGroupByNamePattern(java.lang.String namepattern)
Delivers all scenarios and/or scenario groups, matching the given name pattern.java.util.Collection<ScenarioOrGroup>
getScenarioOrGroupByNamePattern(java.util.regex.Pattern namepattern)
Delivers all scenarios and/or scenario groups, matching the given name pattern.ScenarioOrGroup
getScenarioOrGroupByUUID(java.util.UUID uuid)
Delivers the scenario or scenario group with the given uuid ornull
if no such scenario or scenario group exists.java.util.Set<java.lang.String>
getStatusTags()
Get all tags already used for tagging statuses.RemoteList<java.lang.String>
getStatusTypes()
A list of all status types defined for this project.RemoteCollection<TestCaseAttribute>
getTestCaseAttributes()
Returns the list of declaredTestCaseAttributes
for this project.TestSetOrGroup
getTestSetOrGroupByName(java.lang.String name)
Delivers the first test set or test set group with the given name ornull
if no such test set or test set group exists.java.util.Collection<TestSetOrGroup>
getTestSetOrGroupByNamePattern(java.lang.String namepattern)
Delivers all test sets and test set groups, matching the given name pattern.java.util.Collection<TestSetOrGroup>
getTestSetOrGroupByNamePattern(java.util.regex.Pattern namepattern)
Delivers all test sets and test set groups, matching the given name pattern.RemoteCollection<TestSet>
getTestSets()
RemoteList<AssessmentOrGroup>
getTopLevelAssessments()
Returns the list all top levelAssessments
andAssessmentGroups
of this project.RemoteList<ExecutionConfigurationOrGroup>
getTopLevelExecutionConfigurations()
Testlet
getTopLevelTestlet()
This function returns the top level testlet of a TPT project for which all other testlets are child nodes.RemoteList<TestSetOrGroup>
getTopLevelTestSets()
Type
getTypeBoolean()
The predefined Types are not returned bygetTypes()
.Type
getTypeDouble()
The predefined Types are not returned bygetTypes()
.Type
getTypeFloat()
The predefined Types are not returned bygetTypes()
.Type
getTypeInt16()
The predefined Types are not returned bygetTypes()
.Type
getTypeInt32()
The predefined Types are not returned bygetTypes()
.Type
getTypeInt64()
The predefined Types are not returned bygetTypes()
.Type
getTypeInt8()
The predefined Types are not returned bygetTypes()
.RemoteCollection<Type>
getTypes()
Get a collection of all known types.Type
getTypeString()
The predefined Types are not returned bygetTypes()
.Type
getTypeUInt16()
The predefined Types are not returned bygetTypes()
.Type
getTypeUInt32()
The predefined Types are not returned bygetTypes()
.Type
getTypeUInt8()
The predefined Types are not returned bygetTypes()
.RemoteList<Unit>
getUnits()
java.lang.String
getUsedNameSpaces()
Gets the name spaces which will be used for the Defines of this TPT project.java.util.List<java.lang.String>
importEquivalenceClasses(java.io.File f)
java.util.List<java.lang.String>
importEquivalenceClassesByPath(java.lang.String f)
Log
importIO(ImportInterfaceSettings settings)
Imports the interface by selecting the suitable importer by the givenImportInterfaceSettings
sub class ofsettings
, using the configuration contained in this instance.java.util.List<java.lang.String>
importIO(java.io.File f, Mapping mappingOrNull, Project.SynchronizationMethod syncMethod)
Imports the interface from the given file.java.util.List<java.lang.String>
importIOByPath(java.lang.String f, Mapping mappingOrNull, Project.SynchronizationMethod syncMethod)
Imports the interface from the given file.void
importRequirements(RequirementsImportSettings importSettings)
Imports the requirements from a CSV, Excel, or ReqIF file.void
importTestCases(TestCasesImportSettings importSettings)
Imports the test cases from a CSV or an Excel file.void
removeRequirementAttribute(java.lang.String attributeName)
Removes the requirement attribute with the given name.void
renameType(java.lang.String oldName, java.lang.String newName)
A declared type can be renamed using this method.java.util.List<java.lang.String>
saveAsProject(java.io.File file)
Saves the project in the given file.java.util.List<java.lang.String>
saveAsProjectByPath(java.lang.String file)
Saves the project in the file at the given path.java.util.List<java.lang.String>
saveProject()
Saves the project in its assigned file.void
setDefaultReportSection(Assessment reportSection)
Set the default report section.void
setRequirementsLinking(Project.RequirementsLinking requirementsLinking)
Sets theProject.RequirementsLinking
for this project.void
setUsedNameSpaces(java.lang.String nameSpaces)
Sets the name spaces which will be used for the Defines of this TPT project.void
tagCurrentRevisions(java.lang.String tag)
Adds the same tag to all current revisions of test cases and assesslets.-
Methods inherited from interface com.piketec.tpt.api.IdentifiableRemote
getIdentifier
-
-
-
-
Method Detail
-
closeProject
boolean closeProject() throws ApiException, java.rmi.RemoteException
Closes the project represented by this object in the TPT GUI.It discards all changes since the last time the project has been saved. Closed projects cannot be saved anymore.
- Returns:
false
if the Project could not be closed.- Throws:
java.rmi.RemoteException
- remote communication problemApiException
- The project is not open/unknown
-
saveProject
java.util.List<java.lang.String> saveProject() throws ApiException, java.rmi.RemoteException
Saves the project in its assigned file. The file has been specified in one of the following functions:- Returns:
- A list of messages that have occurred while saving the project.
- Throws:
java.rmi.RemoteException
- remote communication problemApiException
- If the project is not opened or if the file cannot be written.
-
saveAsProject
java.util.List<java.lang.String> saveAsProject(java.io.File file) throws ApiException, java.rmi.RemoteException
Saves the project in the given file. The file can be changed by this method. This function basically represents the "Save as..." menu item.The file extension defines the save format for the file (*.tpt, *.tptz, *.tptprj)
- Parameters:
file
- the file to save the project to- Returns:
- A list of messages that have occurred during the save operation.
- Throws:
java.rmi.RemoteException
- remote communication problemApiException
- If the project is not open or it the project cannot be written to the given file,- See Also:
saveProject()
,TptApi.newProject(File)
,TptApi.openProject(File)
-
saveAsProjectByPath
java.util.List<java.lang.String> saveAsProjectByPath(java.lang.String file) throws ApiException, java.rmi.RemoteException
Saves the project in the file at the given path. The file can be changed by this method. This function basically represents the "Save as..." menu item.The file extension defines the save format for the file (*.tpt, *.tptz, *.tptprj)
- Parameters:
file
- the path to the file to save the project to- Returns:
- A list of messages that have occurred during the save operation.
- Throws:
java.rmi.RemoteException
- remote communication problemApiException
- If the project is not open or it the project cannot be written to the given file,- See Also:
saveProject()
,TptApi.newProject(File)
,TptApi.openProject(File)
-
getFile
java.io.File getFile() throws java.rmi.RemoteException
Returns theFile
that is associated with this TPT project. If no file has been specified so far, it returnsnull
.- Returns:
- A TPT file or
null
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getFilePath
java.lang.String getFilePath() throws java.rmi.RemoteException
Returns the path to the file that is associated with this TPT project. If no file has been specified so far, it returnsnull
.- Returns:
- A path to a TPT file or
null
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getTopLevelExecutionConfigurations
RemoteList<ExecutionConfigurationOrGroup> getTopLevelExecutionConfigurations() throws java.rmi.RemoteException
- Returns:
- Returns the list of all
ExecutionConfigurations
andExecutionConfigurationGroups
defined at the top level of this project. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getExecutionConfigurations
RemoteCollection<ExecutionConfiguration> getExecutionConfigurations() throws java.rmi.RemoteException
- Returns:
- Returns the set of all
ExecutionConfigurations
defined in this project i.e. a flat list of the execution configuration tree containingExecutionConfigurations
only. The returned RemoteCollection is a virtual collection. Changes to the returned RemoteCollection will change the TPT model but changes in the TPT model will not be reflected here. - Throws:
java.rmi.RemoteException
- remote communication problem- See Also:
getTopLevelExecutionConfigurations()
-
getExecutionConfigurationOrGroupByName
ExecutionConfigurationOrGroup getExecutionConfigurationOrGroupByName(java.lang.String name) throws java.rmi.RemoteException
Delivers the first execution configuration or group with the given name ornull
if no such execution configuration or group exists.- Parameters:
name
- The name of theExecutionConfigurationOrGroup
.- Returns:
- The
ExecutionConfigurationOrGroup
ornull
. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getExecutionConfigurationOrGroupByNamePattern
java.util.Collection<ExecutionConfigurationOrGroup> getExecutionConfigurationOrGroupByNamePattern(java.util.regex.Pattern namepattern) throws java.rmi.RemoteException
Delivers all execution configurations and/or groups, matching the given name pattern.- Parameters:
namepattern
- A regular expression for the name pattern.- Returns:
- Collection of all
ExecutionConfigurationOrGroups
, matching the given name pattern. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getExecutionConfigurationOrGroupByNamePattern
java.util.Collection<ExecutionConfigurationOrGroup> getExecutionConfigurationOrGroupByNamePattern(java.lang.String namepattern) throws java.util.regex.PatternSyntaxException, java.rmi.RemoteException
Delivers all execution configurations and/or groups, matching the given name pattern.- Parameters:
namepattern
- A regular expression for the name pattern.- Returns:
- Collection of all
ExecutionConfigurationOrGroups
, matching the given name pattern. - Throws:
java.util.regex.PatternSyntaxException
- If the expression's syntax is invalidjava.rmi.RemoteException
- remote communication problem
-
getTestSets
RemoteCollection<TestSet> getTestSets() throws java.rmi.RemoteException
- Returns:
- Returns the set of all
TestSets
defined in this project. Changes to the returned RemoteCollection will change the TPT model but changes in the TPT model will not be reflected here. - Throws:
java.rmi.RemoteException
- remote communication problem- See Also:
getTopLevelTestSets()
-
getTestSetOrGroupByName
TestSetOrGroup getTestSetOrGroupByName(java.lang.String name) throws java.rmi.RemoteException
Delivers the first test set or test set group with the given name ornull
if no such test set or test set group exists.- Parameters:
name
- The name of theTestSet
.- Returns:
- The
TestSets
/TestSetGroups
ornull
. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getTestSetOrGroupByNamePattern
java.util.Collection<TestSetOrGroup> getTestSetOrGroupByNamePattern(java.util.regex.Pattern namepattern) throws java.rmi.RemoteException
Delivers all test sets and test set groups, matching the given name pattern.- Parameters:
namepattern
- A regular expression for the name pattern.- Returns:
- Collection of all
TestSets
andTestSetGroups
, matching the given name pattern. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getTestSetOrGroupByNamePattern
java.util.Collection<TestSetOrGroup> getTestSetOrGroupByNamePattern(java.lang.String namepattern) throws java.rmi.RemoteException, java.util.regex.PatternSyntaxException
Delivers all test sets and test set groups, matching the given name pattern.- Parameters:
namepattern
- A regular expression for the name pattern.- Returns:
- Collection of all
TestSets
andTestSetGroups
, matching the given name pattern. - Throws:
java.util.regex.PatternSyntaxException
- If the expression's syntax is invalidjava.rmi.RemoteException
- remote communication problem
-
getTopLevelTestSets
RemoteList<TestSetOrGroup> getTopLevelTestSets() throws java.rmi.RemoteException
- Returns:
- Returns the list of all
TestSets
andTestSetGroups
defined at the top level of this project. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getPlatformConfigurations
RemoteList<PlatformConfiguration> getPlatformConfigurations() throws java.rmi.RemoteException
- Returns:
- Returns the list of all
PlatformConfigurations
defined for this project. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getPlatformConfigurationByName
PlatformConfiguration getPlatformConfigurationByName(java.lang.String name) throws java.rmi.RemoteException
Delivers the first platform configuration with the given name ornull
if no such platform configuration exists.- Parameters:
name
- The name of thePlatformConfiguration
.- Returns:
- The
PlatformConfiguration
ornull
. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getPlatformConfigurationByNamePattern
java.util.Collection<PlatformConfiguration> getPlatformConfigurationByNamePattern(java.util.regex.Pattern namepattern) throws java.rmi.RemoteException
Delivers all Platform configurations, matching the given name pattern.- Parameters:
namepattern
- A regular expression for the name pattern.- Returns:
- Collection of all
PlatformConfigurations
, matching the given name pattern. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getPlatformConfigurationByNamePattern
java.util.Collection<PlatformConfiguration> getPlatformConfigurationByNamePattern(java.lang.String namepattern) throws java.util.regex.PatternSyntaxException, java.rmi.RemoteException
Delivers all Platform configurations, matching the given name pattern.- Parameters:
namepattern
- A regular expression for the name pattern.- Returns:
- Collection of all
PlatformConfigurations
, matching the given name pattern. - Throws:
java.util.regex.PatternSyntaxException
- If the expression's syntax is invalidjava.rmi.RemoteException
- remote communication problem
-
getTopLevelAssessments
RemoteList<AssessmentOrGroup> getTopLevelAssessments() throws java.rmi.RemoteException
Returns the list all top levelAssessments
andAssessmentGroups
of this project. These are basically those elements that are placed on the highest hierarchy level in the Assessment view.- Returns:
- A list of
AssessmentOrGroup
representing the top level assessments and assessment groups. - Throws:
java.rmi.RemoteException
- remote communication problem
-
setRequirementsLinking
void setRequirementsLinking(Project.RequirementsLinking requirementsLinking) throws java.rmi.RemoteException
Sets theProject.RequirementsLinking
for this project.- Parameters:
requirementsLinking
- the requirements linking to be used- Throws:
java.rmi.RemoteException
- remote communication problem
-
getRequirementsLinking
Project.RequirementsLinking getRequirementsLinking() throws java.rmi.RemoteException
Returns theProject.RequirementsLinking
used for this project.- Returns:
- the requirements linking used for this project
- Throws:
java.rmi.RemoteException
- remote communication problem
-
createRequirement
Requirement createRequirement(java.lang.String id, java.lang.String document, java.lang.String text, Requirement.RequirementType type) throws ApiException, java.rmi.RemoteException
Adds a new requirement to this project.- Parameters:
id
- The unique ID of the requirementdocument
- The requirements document ornull
.text
- The describing requirement text.type
- The type of the requirement.- Returns:
- The newly created requirement.
- Throws:
ApiException
- If a requirement with the same id already exists.java.rmi.RemoteException
- remote communication problem
-
getRequirements
RemoteIndexedList<java.lang.String,Requirement> getRequirements() throws java.rmi.RemoteException
Get the list of all requirements of this project.- Returns:
- The list of requirements.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
createRequirementSet
RequirementSet createRequirementSet(java.lang.String name, java.lang.String condition) throws ApiException, java.rmi.RemoteException
Add a new requirement set to this project.- Parameters:
name
- The name of the requirement setcondition
- the condtion of the requirement set. The valuenull
will be corrected to an empty string.- Returns:
- The newly created requirement set.
- Throws:
ApiException
- Ifname
isnull
.java.rmi.RemoteException
- remote communication problem
-
getRequirementSets
RemoteList<RequirementSet> getRequirementSets() throws java.rmi.RemoteException
Get the list of all requirement sets of this project.- Returns:
- The list of requirement sets.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getFormalRequirementDefines
RemoteIndexedList<java.lang.String,FormalRequirementDefine> getFormalRequirementDefines() throws java.rmi.RemoteException
Returns alldefines
of allRequirement
of the current TPT project.- Returns:
- all
defines
of allRequirement
of the current TPT project. - Throws:
java.rmi.RemoteException
- remote communication problem
-
addFormalRequirementDefine
FormalRequirementDefine addFormalRequirementDefine(java.lang.String name, java.lang.String value) throws java.rmi.RemoteException, ApiException
Adds adefine
to the current TPT project.- Parameters:
name
- The name of the definevalue
- The value of the define- Returns:
define
which was created and added to the current TPT project- Throws:
java.rmi.RemoteException
- remote communication problemApiException
- If the name already exists or is illegal
-
removeRequirementAttribute
void removeRequirementAttribute(java.lang.String attributeName) throws java.rmi.RemoteException
Removes the requirement attribute with the given name. The attribute will be removed in all requirements of the project.- Parameters:
attributeName
- The name of the attribute to remove.- Throws:
java.rmi.RemoteException
- remote communication problemApiException
- if the name of the attribute is empty ornull
-
setUsedNameSpaces
void setUsedNameSpaces(java.lang.String nameSpaces) throws java.rmi.RemoteException, ApiException
Sets the name spaces which will be used for the Defines of this TPT project. If several name spaces are used the names have to be comma separated.- Parameters:
nameSpaces
- the name space, comma separated- Throws:
java.rmi.RemoteException
- remote communication problemApiException
- if nameSpace isnull
-
getUsedNameSpaces
java.lang.String getUsedNameSpaces() throws java.rmi.RemoteException
Gets the name spaces which will be used for the Defines of this TPT project.- Returns:
- the name spaces as String
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getScenarioOrGroupByID
ScenarioOrGroup getScenarioOrGroupByID(java.lang.String id) throws java.rmi.RemoteException
Delivers the scenario or scenario group with the given id ornull
if no such scenario or scenario group exists.- Parameters:
id
- The ID of theScenarioOrGroup
.- Returns:
- The
ScenarioOrGroup
ornull
. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getScenarioOrGroupByUUID
ScenarioOrGroup getScenarioOrGroupByUUID(java.util.UUID uuid) throws java.rmi.RemoteException
Delivers the scenario or scenario group with the given uuid ornull
if no such scenario or scenario group exists.- Parameters:
uuid
- TheUUID
of theScenarioOrGroup
.- Returns:
- The
ScenarioOrGroup
ornull
. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getScenarioOrGroupByName
ScenarioOrGroup getScenarioOrGroupByName(java.lang.String name) throws java.rmi.RemoteException
Delivers the first scenario or scenario group with the given name ornull
if no such scenario or scenario group exists.- Parameters:
name
- The name of theScenarioOrGroup
.- Returns:
- The
ScenarioOrGroup
ornull
. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getScenarioOrGroupByNamePattern
java.util.Collection<ScenarioOrGroup> getScenarioOrGroupByNamePattern(java.util.regex.Pattern namepattern) throws java.rmi.RemoteException
Delivers all scenarios and/or scenario groups, matching the given name pattern.- Parameters:
namepattern
- A regular expression for the name pattern.- Returns:
- Collection of all
ScenarioOrGroups
, matching the given name pattern. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getScenarioOrGroupByNamePattern
java.util.Collection<ScenarioOrGroup> getScenarioOrGroupByNamePattern(java.lang.String namepattern) throws java.util.regex.PatternSyntaxException, java.rmi.RemoteException
Delivers all scenarios and/or scenario groups, matching the given name pattern.- Parameters:
namepattern
- A regular expression for the name pattern.- Returns:
- Collection of all
ScenarioOrGroups
, matching the given name pattern. - Throws:
java.util.regex.PatternSyntaxException
- If the expression's syntax is invalidjava.rmi.RemoteException
- remote communication problem
-
createTestSet
TestSet createTestSet(java.lang.String name) throws java.rmi.RemoteException
Create a newTestSet
with the given name.- Parameters:
name
- The name of the new test set.Null
will be reduced to an empty string.- Returns:
- The freshly created and empty test set.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
createTestSet
TestSet createTestSet(java.lang.String name, TestSetGroup groupOrNull) throws java.rmi.RemoteException
Creates a newTestSet
with the given name below the givenTestSetGroup
. IfgroupOrNull == null
the newTestSet
will automatically become a top level item.- Parameters:
name
- The name of the new Test Set.Null
will be reduced to an empty string.groupOrNull
- The parent group for the new Test Set or null.- Returns:
- The object representing the new TestSet.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
createTestSetGroup
TestSetGroup createTestSetGroup(java.lang.String name, TestSetGroup groupOrNull) throws java.rmi.RemoteException
Creates a newTestSetGroup
with the given name below the givenTestSetGroup
. IfgroupOrNull == null
the newTestSetGroup
will automatically become a top level item.- Parameters:
name
- The name of the new Test Set Group.Null
will be reduced to an empty string.groupOrNull
- The parent group for the new Test Set Group or null.- Returns:
- The object representing the new TestSet Group.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
createType
Type createType(java.lang.String nameOrNull, java.lang.String typeString) throws ApiException, java.rmi.RemoteException
Create a new type. The structure of the type is given by thetypeString
argument. You can see this string in TPT in the type editor in the "Type String" field at the bottom or in an tptaif export.Patterns:
- Array : "primitive_type[]"
- Curve : "curve[primitive_type1,primitive_type2]"
- Map : "map[primitive_type1,primitive_type2,primitive_type3]"
- Matrix : "primitive_type[][]"
- Struct : "struct[e1:primitive_type1, e2:primitive_type2, e3:primitive_type3, ...]"
- Enums : "int8 [ a = 1, b = 2 ]"
- Parameters:
nameOrNull
- The name of the declared type ornull
to create an anonymous type.typeString
- The type definition in the same format as seen in tptaif or in the type editor.- Returns:
- the new created type object.
- Throws:
ApiException
- If the given name is not a legal identifier name, a type with the given name already exists or the given type string could not be parsed.java.rmi.RemoteException
- remote communication problem
-
getTypes
RemoteCollection<Type> getTypes() throws java.rmi.RemoteException
Get a collection of all known types. Anonymous and predefined types are not included. If you call this method multiple times the returned lists will have different hashes and equals will return false when comparing these objects.- Returns:
- The collection of all explicitly declared types.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
renameType
void renameType(java.lang.String oldName, java.lang.String newName) throws ApiException, java.rmi.RemoteException
A declared type can be renamed using this method. This replaces the old type (declared under nameoldName
before) with a new type (declared under namenewName
) with the same structure (just renamed). This method has no effect if there is no type declared with nameoldName
.- Parameters:
oldName
- name of the declared type to be renamednewName
- new name for the renamed type. No other type must ne declared using this name.- Throws:
ApiException
- if another type namednewName
exists.java.rmi.RemoteException
- remote communication problem
-
getTypeBoolean
Type getTypeBoolean() throws java.rmi.RemoteException
The predefined Types are not returned bygetTypes()
. This method returns the predefined typeboolean
.- Returns:
- The predefined Type
boolean
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getTypeUInt8
Type getTypeUInt8() throws java.rmi.RemoteException
The predefined Types are not returned bygetTypes()
. This method returns the predefined typeuint8
.- Returns:
- The predefined Type
uint8
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getTypeInt8
Type getTypeInt8() throws java.rmi.RemoteException
The predefined Types are not returned bygetTypes()
. This method returns the predefined typeint8
.- Returns:
- The predefined Type
int8
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getTypeUInt16
Type getTypeUInt16() throws java.rmi.RemoteException
The predefined Types are not returned bygetTypes()
. This method returns the predefined typeuint16
.- Returns:
- The predefined Type
uint16
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getTypeInt16
Type getTypeInt16() throws java.rmi.RemoteException
The predefined Types are not returned bygetTypes()
. This method returns the predefined typeint16
.- Returns:
- The predefined Type
int16
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getTypeUInt32
Type getTypeUInt32() throws java.rmi.RemoteException
The predefined Types are not returned bygetTypes()
. This method returns the predefined typeuint32
.- Returns:
- The predefined Type
uint32
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getTypeInt32
Type getTypeInt32() throws java.rmi.RemoteException
The predefined Types are not returned bygetTypes()
. This method returns the predefined typeint32
.- Returns:
- The predefined Type
int32
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getTypeInt64
Type getTypeInt64() throws java.rmi.RemoteException
The predefined Types are not returned bygetTypes()
. This method returns the predefined typeint64
.- Returns:
- The predefined Type
int64
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getTypeFloat
Type getTypeFloat() throws java.rmi.RemoteException
The predefined Types are not returned bygetTypes()
. This method returns the predefined typefloat
.- Returns:
- The predefined Type
float
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getTypeDouble
Type getTypeDouble() throws java.rmi.RemoteException
The predefined Types are not returned bygetTypes()
. This method returns the predefined typedouble
.- Returns:
- The predefined Type
double
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getTypeString
Type getTypeString() throws java.rmi.RemoteException
The predefined Types are not returned bygetTypes()
. This method returns the predefined typestring
.- Returns:
- The predefined Type
string
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getDeclarations
RemoteIndexedList<java.lang.String,Declaration> getDeclarations() throws java.rmi.RemoteException
Returns an indexed list of allDeclarations
defined in this project. The name of theDeclaration
serves as index.- Returns:
- The list of all declarations (assessment variables, channels, constants, parameters, measurements).
- Throws:
java.rmi.RemoteException
- remote communication problem
-
createChannel
Channel createChannel(java.lang.String name) throws ApiException, java.rmi.RemoteException
Creates a new channel with the given name.- Parameters:
name
- The name of the channel- Returns:
- The new created channel
- Throws:
ApiException
- If the given name is not a legal identifier name or a declaration with the given name already exists.java.rmi.RemoteException
- remote communication problem
-
createParameter
Parameter createParameter(java.lang.String name) throws ApiException, java.rmi.RemoteException
Creates a new parameter with the given name. The default exchange mode is "exchange".- Parameters:
name
- The name of the parameter- Returns:
- The new created parameter
- Throws:
ApiException
- If the given name is not a legal identifier name or a declaration with the given name already exists.java.rmi.RemoteException
- remote communication problem
-
createConstant
Constant createConstant(java.lang.String name) throws ApiException, java.rmi.RemoteException
Creates a new constant with the given name.- Parameters:
name
- The name of the constant- Returns:
- The new created constant
- Throws:
ApiException
- If the given name is not a legal identifier name or a declaration with the given name already exists.java.rmi.RemoteException
- remote communication problem
-
createMeasurement
Measurement createMeasurement(java.lang.String name) throws ApiException, java.rmi.RemoteException
Creates a new measurement with the given name.- Parameters:
name
- The name of the measurement- Returns:
- The new created measurement
- Throws:
ApiException
- If the given name is not a legal identifier name or a declaration with the given name already exists.java.rmi.RemoteException
- remote communication problem
-
createAssessmentVariable
AssessmentVariable createAssessmentVariable(java.lang.String name) throws ApiException, java.rmi.RemoteException
Creates a new assessment variable with the given name.- Parameters:
name
- The name of the assessment variable- Returns:
- The new created assessment variable
- Throws:
ApiException
- If the given name is not a legal identifier name or a declaration with the given name already exists.java.rmi.RemoteException
- remote communication problem
-
createExecutionConfiguration
ExecutionConfiguration createExecutionConfiguration(java.lang.String name) throws java.rmi.RemoteException
Creates a newExecutionConfiguration
with the given name at top level.- Parameters:
name
- The name of the new Execution Configuration.null
will be reduced to an empty string.- Returns:
- The object representing the new Execution Configuration
- Throws:
java.rmi.RemoteException
- remote communication problem
-
createExecutionConfiguration
ExecutionConfiguration createExecutionConfiguration(java.lang.String name, ExecutionConfigurationGroup groupOrNull) throws java.rmi.RemoteException
Creates a newExecutionConfiguration
with the given name below the givenExecutionConfigurationGroup
. IfgroupOrNull == null
the newExecutionConfiguration
will automatically become a top level item.- Parameters:
name
- The name of the new Execution Configuration.Null
will be reduced to an empty string.groupOrNull
- The parent group for the new Execution Configuration or null.- Returns:
- The object representing the new Execution Configuration
- Throws:
java.rmi.RemoteException
- remote communication problem
-
createExecutionConfigurationGroup
ExecutionConfigurationGroup createExecutionConfigurationGroup(java.lang.String name, ExecutionConfigurationGroup groupOrNull) throws java.rmi.RemoteException
Creates a newExecutionConfigurationGroup
with the given name below the givenExecutionConfigurationGroup
. IfgroupOrNull == null
the newExecutionConfigurationGroup
will automatically become a top level item.- Parameters:
name
- The name of the new Execution Configuration Group.Null
will be reduced to an empty string.groupOrNull
- The parent group for the new Execution Configuration Group or null.- Returns:
- The object representing the new Execution Configuration Group.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
createPlatformConfiguration
PlatformConfiguration createPlatformConfiguration(java.lang.String name, java.lang.String type) throws ApiException, java.rmi.RemoteException
Create a newPlatformConfiguration
with the given name and the given type.- Parameters:
name
- The name for the new PlatformConfiguration.Null
will be reduced to an empty string.type
- AString
representing the platform type.- Returns:
- Returns an object representing the new
PlatformConfiguration
. - Throws:
java.rmi.RemoteException
- remote communication problemApiException
- iftype==null
ortype
is unknown.
-
getAssessmentOrGroupByID
AssessmentOrGroup getAssessmentOrGroupByID(java.lang.String id) throws java.rmi.RemoteException
Delivers the assessment or assessment group with the given id ornull
if no such assessment or assessment group exists.- Parameters:
id
- The ID of theAssessmentOrGroup
.- Returns:
- The
AssessmentOrGroup
ornull
. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getAssessmentOrGroupByUUID
AssessmentOrGroup getAssessmentOrGroupByUUID(java.util.UUID uuid) throws java.rmi.RemoteException
Delivers the assessment or assessment group with the given uuid ornull
if no such assessment or assessment group exists.- Parameters:
uuid
- TheUUID
of theAssessmentOrGroup
.- Returns:
- The
AssessmentOrGroup
ornull
. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getAssessmentOrGroupByName
AssessmentOrGroup getAssessmentOrGroupByName(java.lang.String name) throws java.rmi.RemoteException
Delivers the first assessment or assessment group with the given name ornull
if no such assessment or assessment group exists.- Parameters:
name
- The name of theAssessmentOrGroup
.- Returns:
- The
AssessmentOrGroup
ornull
. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getAssessmentOrGroupByNamePattern
java.util.Collection<AssessmentOrGroup> getAssessmentOrGroupByNamePattern(java.util.regex.Pattern namepattern) throws java.rmi.RemoteException
Delivers all assessments and/or assessment groups, matching the given name pattern.- Parameters:
namepattern
- A regular expression for the name pattern.- Returns:
- Collection of all
AssessmentOrGroups
, matching the given name pattern. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getAssessmentOrGroupByNamePattern
java.util.Collection<AssessmentOrGroup> getAssessmentOrGroupByNamePattern(java.lang.String namepattern) throws java.util.regex.PatternSyntaxException, java.rmi.RemoteException
Delivers all assessments and/or assessment groups, matching the given name pattern.- Parameters:
namepattern
- A regular expression for the name pattern.- Returns:
- Collection of all
AssessmentOrGroups
, matching the given name pattern. - Throws:
java.util.regex.PatternSyntaxException
- If the expression's syntax is invalidjava.rmi.RemoteException
- remote communication problem
-
createAssessmentGroup
AssessmentGroup createAssessmentGroup(java.lang.String name, AssessmentGroup groupOrNull) throws java.rmi.RemoteException
Create aAssessmentGroup
with the given name and within the given parentAssessmentGroup
.If
groupOrNull==null
, the newly createdAssessmentGroup
automatically becomes a top level item.- Parameters:
name
- The name for the newAssessmentGroup
.Null
will be reduced to an empty string.groupOrNull
- Either the parentAssessmentGroup
ornull
- Returns:
- An object representing the newly created
AssessmentGroup
- Throws:
java.rmi.RemoteException
- remote communication problem
-
createAssessment
Assessment createAssessment(java.lang.String name, java.lang.String type, AssessmentGroup groupOrNull) throws ApiException, java.rmi.RemoteException
Creates a newAssessment
with the given name and the given type below the givenAssessmentGroup
. IfgroupOrNull==null
, the newly createdAssessment
automatically becomes a top level assessment- Parameters:
name
- The name of the newAssessment
.Null
will be reduced to an empty string.type
- AString
representing the assessment type. Constants for available types can be found inAssessment
.groupOrNull
- The parent group for the newAssessment
ornull
- Returns:
- The object representing the newly created
Assessment
- Throws:
java.rmi.RemoteException
- remote communication problemApiException
-type==null
-
getTopLevelTestlet
Testlet getTopLevelTestlet() throws java.rmi.RemoteException
This function returns the top level testlet of a TPT project for which all other testlets are child nodes.In the project tree, this testlet is represented by the project node. Its variants are test cases.
- Returns:
- The top level
Testlet
for this project. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getTestCaseAttributes
RemoteCollection<TestCaseAttribute> getTestCaseAttributes() throws java.rmi.RemoteException
Returns the list of declaredTestCaseAttributes
for this project.- Returns:
- A list of TestCaseAttributes.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
createTestCaseAttribute
@Deprecated TestCaseAttribute createTestCaseAttribute(java.lang.String name, java.lang.String type) throws ApiException, java.rmi.RemoteException
Deprecated.will be removed in TPT-21. UsecreateTestCaseAttribute(String, TestCaseAttributeType)
instead.Create a newTestCaseAttribute
- Parameters:
name
- The name for the new attribute.type
- The type of the attribute as String- Returns:
- A newly created
TestCaseAttribute
- Throws:
ApiException
- If there already exists aTestCaseAttribute
with the given name orname==null
ortype==null
or if the giventype
is unknown.java.rmi.RemoteException
- remote communication problem- See Also:
TestCaseAttribute.getType()
-
createTestCaseAttribute
TestCaseAttribute createTestCaseAttribute(java.lang.String name, TestCaseAttribute.TestCaseAttributeType type) throws ApiException, java.rmi.RemoteException
Create a newTestCaseAttribute
- Parameters:
name
- The name for the new attribute.type
- The type of the attribute as TestCaseAttributeType.- Returns:
- A newly created
TestCaseAttribute
- Throws:
ApiException
- If there already exists aTestCaseAttribute
with the given name orname==null
ortype==null
.java.rmi.RemoteException
- remote communication problem- See Also:
TestCaseAttribute.getAttributeType()
-
getExtensionOrNull
java.rmi.Remote getExtensionOrNull(java.lang.String key) throws java.rmi.RemoteException, ApiException
Returns an entry point for an API extension of the given type. The Return value needs to be cast accordingly. Returnsnull
, if no extension was registered forkey
.- Parameters:
key
- Name of the extension- Returns:
null
, if no extension could have been found with the givenkey
. Otherwise, an object representing the entry point.- Throws:
java.rmi.RemoteException
- remote communication problemApiException
- If an extension has been found but is not available for the current TPT instance (e.g. missing license option).
-
getMappings
RemoteList<Mapping> getMappings() throws java.rmi.RemoteException
- Returns:
- Returns a list of the
Mappings
that are defined for this project. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getMappingByName
Mapping getMappingByName(java.lang.String name) throws java.rmi.RemoteException
Delivers the first mapping with the given name ornull
if no such mapping exists.- Parameters:
name
- The name of theMapping
.- Returns:
- The
Mapping
ornull
. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getMappingByNamePattern
java.util.Collection<Mapping> getMappingByNamePattern(java.util.regex.Pattern namepattern) throws java.rmi.RemoteException
Delivers all mappings, matching the given name pattern.- Parameters:
namepattern
- A regular expression for the name pattern.- Returns:
- Collection of all
Mappings
, matching the given name pattern. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getMappingByNamePattern
java.util.Collection<Mapping> getMappingByNamePattern(java.lang.String namepattern) throws java.util.regex.PatternSyntaxException, java.rmi.RemoteException
Delivers all mappings, matching the given name pattern.- Parameters:
namepattern
- A regular expression for the name pattern.- Returns:
- Collection of all
Mappings
, matching the given name pattern. - Throws:
java.util.regex.PatternSyntaxException
- If the expression's syntax is invalidjava.rmi.RemoteException
- remote communication problem
-
createMapping
Mapping createMapping(java.lang.String name) throws java.rmi.RemoteException
Create a newMapping
with thegiven
name. If thename
already exists, a suffix (_00<n>) is added to the name of the new mapping.- Parameters:
name
- The intendedname
for the new mapping.Null
will be reduced to an empty string.- Returns:
- An object representing the new
Mapping
- Throws:
java.rmi.RemoteException
- remote communication problem
-
generateTestCasesFromTestData
java.lang.String generateTestCasesFromTestData(ScenarioGroup scenarioGroup, java.io.File dir, java.lang.String filePatternOrNull, boolean includeSubdirs, java.lang.String channelPatternOrNull, boolean linkSignals, java.lang.String renameMappingNameOrNull, boolean createAssesslets, java.lang.String timeTolOrNull, java.lang.String valueTolOrNull, boolean createLocalReferenceChannels, boolean addTerminationCondition, boolean assignParameters, boolean updateExistingGeneratedScenarios) throws ApiException, java.rmi.RemoteException
Imports existing test data as step lists to TPT. This corresponds to "Tools | Generate Test Cases from Test Data". This function could either try to update an already existing set of imported test data or create a new set. *- Parameters:
scenarioGroup
- A variant group where the imported test data should be inserted.dir
- The directory where the test data resides.filePatternOrNull
- A regular expression to constrain the set of files that are imported to TPT.
For example, use".*\.mdf"
to consider only MDF files (i.e., all files whose file name ends with '.mdf').
If the expression isnull
or empty, all available files with supported file format will be imported.includeSubdirs
- Enable/disable the traversal of sub-directories ofdir
for further data to import.channelPatternOrNull
- Provide a regular expression to define a mapping between channels in TPT and signal names in the file. The placeholder ${CHANNEL} can be used to refer to a arbitrary channel name in TPT: the expression"prefix_${CHANNEL}_postfix"
would match a TPT channel"mysignal"
to the signal"prefix_mysignal_postfix"
in the file.linkSignals
- Enable or disable the linking of test data files. If set tofalse
, test date will be imported as Embedded Signal Step, instead.renameMappingNameOrNull
- The name of a existing mapping with a rename flavor, that should be used to map the channels in TPT to the signal in the file.createAssesslets
- Enable/Disable the automatic creation of Signal Comparison Assesslets for the input channels in the test data.timeTolOrNull
- Specify the time tolerance for the Signal Comparison Assesslets.null
means none.valueTolOrNull
- Specify the value tolerance for the Signal Comparison Assesslets.null
means none.createLocalReferenceChannels
- Create local signals for the reference channels of the Signal comparison from the channels of the file to have the reference data available for embedded signals, too.addTerminationCondition
- Add a wait stept that terminates the variant when the test data has been fully replayed.assignParameters
- Enable the assignment of parameter values to test cases, if those are present in the test data file and a respective mapping flavor is present.updateExistingGeneratedScenarios
- If this argument is set totrue
, TPT tries to find an older import to update with the new data. If it finds an older import, TPT updates already existing test cases, adds missing test cases, and removes such test cases, that do not have corresponding test data anymore.A older updateable import exists, if the testlet for the provided
scenarioGroup
contains exactly one child group that matches the name scheme"Import DD.MM.YY HH:MM:SS - RootDirName"
and there exists a test case group of the same name.- Returns:
- Returns a
String
containing the error and warning messages occurred during the import. - Throws:
ApiException
-- If
dir
cannot be read. - If no mapping with the name
renameMappingNameOrNull
can be found or the Mapping does not have a Rename Flavor. - If
createAssesslets == true
, but are no TPT-Input-Channels for which a Signal Comparison Assesslet could be created. - If an error occurs during the import.
- If
java.rmi.RemoteException
- remote communication problem
-
generateTestCasesFromTestDataByPath
java.lang.String generateTestCasesFromTestDataByPath(ScenarioGroup scenarioGroup, java.lang.String dir, java.lang.String filePatternOrNull, boolean includeSubdirs, java.lang.String channelPatternOrNull, boolean linkSignals, java.lang.String renameMappingNameOrNull, boolean createAssesslets, java.lang.String timeTolOrNull, java.lang.String valueTolOrNull, boolean createLocalReferenceChannels, boolean addTerminationCondition, boolean assignParameters, boolean updateExistingGeneratedScenarios) throws ApiException, java.rmi.RemoteException
Imports existing test data as step lists to TPT. This corresponds to "Tools | Generate Test Cases from Test Data". This function could either try to update an already existing set of imported test data or create a new set. *- Parameters:
scenarioGroup
- A variant group where the imported test data should be inserted.dir
- The path to the directory where the test data resides.filePatternOrNull
- A regular expression to constrain the set of files that are imported to TPT.
For example, use".*\.mdf"
to consider only MDF files (i.e., all files whose file name ends with '.mdf').
If the expression isnull
or empty, all available files with supported file format will be imported.includeSubdirs
- Enable/disable the traversal of sub-directories ofdir
for further data to import.channelPatternOrNull
- Provide a regular expression to define a mapping between channels in TPT and signal names in the file. The placeholder ${CHANNEL} can be used to refer to a arbitrary channel name in TPT: the expression"prefix_${CHANNEL}_postfix"
would match a TPT channel"mysignal"
to the signal"prefix_mysignal_postfix"
in the file.linkSignals
- Enable or disable the linking of test data files. If set tofalse
, test date will be imported as Embedded Signal Step, instead.renameMappingNameOrNull
- The name of a existing mapping with a rename flavor, that should be used to map the channels in TPT to the signal in the file.createAssesslets
- Enable/Disable the automatic creation of Signal Comparison Assesslets for the input channels in the test data.timeTolOrNull
- Specify the time tolerance for the Signal Comparison Assesslets.null
means none.valueTolOrNull
- Specify the value tolerance for the Signal Comparison Assesslets.null
means none.createLocalReferenceChannels
- Create local signals for the reference channels of the Signal comparison from the channels of the file to have the reference data available for embedded signals, too.addTerminationCondition
- Add a wait stept that terminates the variant when the test data has been fully replayed.assignParameters
- Enable the assignment of parameter values to test cases, if those are present in the test data file and a respective mapping flavor is present.updateExistingGeneratedScenarios
- If this argument is set totrue
, TPT tries to find an older import to update with the new data. If it finds an older import, TPT updates already existing test cases, adds missing test cases, and removes such test cases, that do not have corresponding test data anymore.A older updateable import exists, if the testlet for the provided
scenarioGroup
contains exactly one child group that matches the name scheme"Import DD.MM.YY HH:MM:SS - RootDirName"
and there exists a test case group of the same name.- Returns:
- Returns a
String
containing the error and warning messages occurred during the import. - Throws:
ApiException
-- If
dir
cannot be read. - If no mapping with the name
renameMappingNameOrNull
can be found or the Mapping does not have a Rename Flavor. - If
createAssesslets == true
, but are no TPT-Input-Channels for which a Signal Comparison Assesslet could be created. - If an error occurs during the import.
- If
java.rmi.RemoteException
- remote communication problem
-
importIO
java.util.List<java.lang.String> importIO(java.io.File f, Mapping mappingOrNull, Project.SynchronizationMethod syncMethod) throws ApiException, java.rmi.RemoteException
Imports the interface from the given file. Supported are tpt, tptprj, tptz, tptaif, xml and xlsx files.- Parameters:
f
- The interface file containing the declarations to import.mappingOrNull
- The mapping where mapping information shall be imported ornull
if a new mapping should be created if needed.syncMethod
- Specifies how the existing and imported declarations are matched.- Returns:
- A list of warnings that occurred during import.
- Throws:
ApiException
- If an error occurs during import or the file format is not supported.java.rmi.RemoteException
- remote communication problem
-
importIOByPath
java.util.List<java.lang.String> importIOByPath(java.lang.String f, Mapping mappingOrNull, Project.SynchronizationMethod syncMethod) throws ApiException, java.rmi.RemoteException
Imports the interface from the given file. Supported are tpt, tptprj, tptz, tptaif, xml and xlsx files.- Parameters:
f
- The path to the interface file containing the declarations to import.mappingOrNull
- The mapping where mapping information shall be imported ornull
if a new mapping should be created if needed.syncMethod
- Specifies how the existing and imported declarations are matched.- Returns:
- A list of warnings that occurred during import.
- Throws:
ApiException
- If an error occurs during import or the file format is not supported.java.rmi.RemoteException
- remote communication problem
-
importIO
Log importIO(ImportInterfaceSettings settings) throws ApiException, java.rmi.RemoteException
Imports the interface by selecting the suitable importer by the givenImportInterfaceSettings
sub class ofsettings
, using the configuration contained in this instance.- Parameters:
settings
- A sub class ofImportInterfaceSettings
for a specific import type containing the needed information to execute the import without user interactions.- Returns:
- The log containing warning und error messages, that occured during import and did not
result in an
ApiException
- Throws:
ApiException
- If an error occurs during import or the file format is not supported.java.rmi.RemoteException
- remote communication problem
-
createdWithCurrentVersion
boolean createdWithCurrentVersion() throws java.rmi.RemoteException
- Returns:
- is this ProjectFile created with the current TPT-version?
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getCreatedWithFileFormatVersion
int getCreatedWithFileFormatVersion() throws java.rmi.RemoteException
- Returns:
- Fileformat version number of the tpt-project-file.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getCreatedWithTptVersionName
java.lang.String getCreatedWithTptVersionName() throws java.rmi.RemoteException
- Returns:
- TPT version name of the tpt-project-file.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
importEquivalenceClasses
java.util.List<java.lang.String> importEquivalenceClasses(java.io.File f) throws java.rmi.RemoteException
- Parameters:
f
-File
to be imported.- Returns:
List
with warnings occurred during import.- Throws:
java.rmi.RemoteException
- remote communication problem
-
importEquivalenceClassesByPath
java.util.List<java.lang.String> importEquivalenceClassesByPath(java.lang.String f) throws java.rmi.RemoteException, ApiException
- Parameters:
f
- the path to the file to be imported.- Returns:
List
with warnings occurred during import.- Throws:
java.rmi.RemoteException
- remote communication problemApiException
- if the path is null
-
exportEquivalenceClasses
java.util.List<java.lang.String> exportEquivalenceClasses(java.io.File f) throws java.rmi.RemoteException
- Parameters:
f
- target-File
for export.- Returns:
List
with warnings occurred during import.- Throws:
java.rmi.RemoteException
- remote communication problem
-
exportEquivalenceClassesByPath
java.util.List<java.lang.String> exportEquivalenceClassesByPath(java.lang.String f) throws ApiException, java.rmi.RemoteException
- Parameters:
f
- path to the target File for export.- Returns:
List
with warnings occurred during import.- Throws:
ApiException
- if the path is nulljava.rmi.RemoteException
- remote communication problem
-
generateTestCasesFromEquivalenceClasses
java.util.List<java.lang.String> generateTestCasesFromEquivalenceClasses(ScenarioOrGroup scenarioOrGroup, GenerateTestCasesFromEquivalenceClassessSettings settings, java.util.Map<Declaration,java.util.Collection<java.lang.String>> equivalenceClassMap) throws java.rmi.RemoteException
This method provides the functionality to generatetest cases
from equivalence classes.- Parameters:
scenarioOrGroup
- where generatedtest cases
should be added.settings
- for generation oftest cases
from equivalence classes.equivalenceClassMap
- selected equivalence classes.- Returns:
- A
List<String>
with all warnings as a log. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getDefaultReportSection
Assessment getDefaultReportSection() throws java.rmi.RemoteException
Get the default report section.- Returns:
- The default report section
- Throws:
java.rmi.RemoteException
- remote communication problem
-
setDefaultReportSection
void setDefaultReportSection(Assessment reportSection) throws ApiException, java.rmi.RemoteException
Set the default report section. If the given argument isnull
the top level report section is set as the default.- Parameters:
reportSection
- The report section to be set ornull
to set top level as default.- Throws:
ApiException
- if the report section is not part of the project or if it is not a report section assesslet.java.rmi.RemoteException
- remote communication problem
-
getUnits
RemoteList<Unit> getUnits() throws java.rmi.RemoteException
-
createUnit
Unit createUnit(java.lang.String name, java.lang.String symbol) throws ApiException, java.rmi.RemoteException
Creates a newUnit
for this project.- Parameters:
name
- to be set.symbol
- to be set.- Returns:
- the newly created unit
- Throws:
java.rmi.RemoteException
- remote communication problemApiException
- if the given symbol or name isnull
, has illegal characters or a unit with the same name or symbol already exists
-
getStatusTypes
RemoteList<java.lang.String> getStatusTypes() throws java.rmi.RemoteException
A list of all status types defined for this project. If you delete an element in the list, the status will also be deleted if it is used.- Returns:
- Remote List of all status types.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
createStatusType
void createStatusType(java.lang.String status) throws ApiException, java.rmi.RemoteException
Creates a new status type for this project.- Parameters:
status
- The status type to be created.- Throws:
ApiException
- If status is empty,null
, contains line breaks, or a status with the given name already exists.java.rmi.RemoteException
- remote communication problem
-
getStatusTags
java.util.Set<java.lang.String> getStatusTags() throws java.rmi.RemoteException
Get all tags already used for tagging statuses.- Returns:
- The list of tags.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
tagCurrentRevisions
void tagCurrentRevisions(java.lang.String tag) throws ApiException, java.rmi.RemoteException
Adds the same tag to all current revisions of test cases and assesslets.- Parameters:
tag
- The tag to be added.- Throws:
ApiException
- If tag is empty,null
, contains line breaks, or a tag with the given name already exists.java.rmi.RemoteException
- remote communication problem
-
exportTestResults
void exportTestResults(TestResultsExporterKey key) throws ApiException, java.rmi.RemoteException
Exports the last test results to an extern destination.- Parameters:
key
- the key of the exporter to use- Throws:
ApiException
- if any problems occur during the exportjava.rmi.RemoteException
- remote communication problem
-
exportTestCases
void exportTestCases(TestCasesExportSettings exportSettings) throws ApiException, java.rmi.RemoteException
Exports the test cases to a CSV, Excel, or ReqIF file to import the changes to a test management tool. It is also possible to export test cases directly to codeBeamer or Polarion.- Parameters:
exportSettings
- The settings for the individual export.
For the test cases export to a CSV file useCsvFileTestCasesExportSettings
.
For the test cases export to an Excel file useExcelFileTestCasesExportSettings
.
For the test cases export to Polarion usePolarionTestCasesExportSettings
.
For the test cases export to codeBeamer useCodeBeamerTestCasesExportSettings
.
For the test cases export to refIF useReqIfTestCasesExportSettings
.- Throws:
ApiException
- if any problems occur during the exportjava.rmi.RemoteException
- remote communication problem
-
importTestCases
void importTestCases(TestCasesImportSettings importSettings) throws ApiException, java.rmi.RemoteException
Imports the test cases from a CSV or an Excel file. It is also possible to import test cases directly from codeBeamer or Polarion.- Parameters:
importSettings
- The settings for the individual import.
For the test cases import from a CSV file useCsvFileTestCasesImportSettings
.
For the test cases import from an Excel file useExcelFileTestCasesImportSettings
.
For the test cases import from Polarion usePolarionTestCasesImportSettings
.
For the test cases import from codeBeamer useCodeBeamerTestCasesImportSettings
.- Throws:
ApiException
- if any problems occur during the importjava.rmi.RemoteException
- remote communication problem
-
exportRequirements
void exportRequirements(RequirementsExportSettings exportSettings) throws ApiException, java.rmi.RemoteException
Exports the requirements to a CSV or an Excel file to import the changes to a test management tool.- Parameters:
exportSettings
- The settings for the individual export.
For the requirements export to a CSV file useCsvFileRequirementsExportSettings
.
For the requirements export to an Excel file useExcelFileRequirementsExportSettings
.- Throws:
ApiException
- if any problems occur during the exportjava.rmi.RemoteException
- remote communication problem
-
importRequirements
void importRequirements(RequirementsImportSettings importSettings) throws ApiException, java.rmi.RemoteException
Imports the requirements from a CSV, Excel, or ReqIF file. It is also possible to import requirements directly from codeBeamer or Polarion.- Parameters:
importSettings
- The settings for the individual import.
For the requirements import from a CSV file useCsvFileRequirementsImportSettings
.
For the requirements import from an Excel file useExcelFileRequirementsImportSettings
.
For the requirements import from Polarion usePolarionRequirementsImportSettings
.
For the requirements import from codeBeamer useCodeBeamerRequirementsImportSettings
.
For the requirements import from refIF useReqIfRequirementsImportSettings
.- Throws:
ApiException
- if any problems occur during the importjava.rmi.RemoteException
- remote communication problem
-
getLastImportRequirementsSettings
RequirementsImportSettings getLastImportRequirementsSettings(java.lang.String documentName) throws ApiException, java.rmi.RemoteException
Delivers the last used requirements import settings for the given document name ornull
if no settings exist.- Parameters:
documentName
- The name of the document. An empty string represents the default document.- Returns:
- The settings for the individual import.
For the requirements import from a CSV fileCsvFileRequirementsImportSettings
is returned.
For the requirements import from an Excel fileExcelFileRequirementsImportSettings
is returned.
For the requirements import from PolarionPolarionRequirementsImportSettings
is returned.
For the requirements import from codeBeamerCodeBeamerRequirementsImportSettings
is returned.
For the requirements import from refIFReqIfRequirementsImportSettings
is returned. - Throws:
ApiException
- if any problems occur during the importjava.rmi.RemoteException
- remote communication problem
-
getRequirementsDocuments
java.util.List<java.lang.String> getRequirementsDocuments() throws java.rmi.RemoteException
Delivers the names of all requirements documents contained in the project in alphabetical order.- Returns:
- A list of all names of requirements documents in this project
- Throws:
java.rmi.RemoteException
- remote communication problem
-
-