Class TabularTestCasesImportSettings
- java.lang.Object
-
- com.piketec.tpt.api.requirements.TestCasesImportSettings
-
- com.piketec.tpt.api.requirements.tabular.TabularTestCasesImportSettings
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
CsvFileTestCasesImportSettings
,ExcelFileTestCasesImportSettings
public abstract class TabularTestCasesImportSettings extends TestCasesImportSettings
The common settings for the requirements import of test cases from a CVS or an Excel file.
For the test cases import from a CSV file useCsvFileTestCasesImportSettings
.
For the test cases import from an Excel file useExcelFileTestCasesImportSettings
.- Author:
- Copyright (c) 2014-2024 PikeTec GmbH - MIT License (MIT) - All rights reserved
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.piketec.tpt.api.requirements.TestCasesImportSettings
TestCasesImportSettings.SynchronizationMethod, TestCasesImportSettings.SynchronizationProperty, TestCasesImportSettings.TargetTypeAssignment, TestCasesImportSettings.TestCaseHierarchyCreationMethod, TestCasesImportSettings.TestCaseType
-
-
Field Summary
-
Fields inherited from class com.piketec.tpt.api.requirements.TestCasesImportSettings
CREATE_NEW_TEST_SET
-
-
Constructor Summary
Constructors Constructor Description TabularTestCasesImportSettings(java.lang.String importFilePath)
The constructor for the common settings of the requirements import of test cases from a CSV or an Excel file.
For the test cases import from a CSV file useCsvFileTestCasesImportSettings
.
For the test cases import from an Excel file useExcelFileTestCasesImportSettings
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Pair<java.lang.String,java.lang.String>>
getAttributeAssignments()
java.util.List<java.lang.String>
getDescriptionColumns()
java.lang.String
getGroupPathColumn()
java.lang.String
getIdColumn()
java.lang.String
getImportFilePath()
java.lang.String
getLevelColumn()
java.lang.String
getLinksColumn()
java.lang.String
getNameColumn()
java.util.List<TestCasesImportSettings.TargetTypeAssignment>
getTypeAssignments()
java.lang.String
getTypeColumn()
boolean
isWithHeaderLine()
void
setAttributeAssignments(java.util.List<Pair<java.lang.String,java.lang.String>> attributeAssignments)
void
setDescriptionColumns(java.util.List<java.lang.String> descriptionColumns)
void
setGroupPathColumn(java.lang.String groupPathColumn)
void
setIdColumnAndAttribute(java.lang.String idColumn, java.lang.String idAttribute)
Sets the name of the column in the source file that contains the ID and the TPT test case attribute that contains the ID to match existing test cases against imported ones.
Not relevant if thesynchronization method
isSynchronizationMethod#ALL_NEW
.void
setLevelColumn(java.lang.String levelColumn)
void
setLinksColumn(java.lang.String linksColumn)
void
setNameColumn(java.lang.String nameColumn)
void
setTypeAssignments(java.util.List<TestCasesImportSettings.TargetTypeAssignment> typeAssignments)
void
setTypeColumn(java.lang.String typeColumn)
void
setWithHeaderLine(boolean withHeaderLine)
-
Methods inherited from class com.piketec.tpt.api.requirements.TestCasesImportSettings
getAutoReviewAttributes, getHierarchyCreationMethod, getIdAttribute, getPreferredTestCaseType, getSyncMethod, getSyncProperty, getTestSetName, setAutoReviewAttributes, setHierarchyCreationMethod, setIdAttribute, setPreferredTestCaseType, setSyncMethod, setSyncProperty, setTestSetName
-
-
-
-
Constructor Detail
-
TabularTestCasesImportSettings
public TabularTestCasesImportSettings(java.lang.String importFilePath)
The constructor for the common settings of the requirements import of test cases from a CSV or an Excel file.
For the test cases import from a CSV file useCsvFileTestCasesImportSettings
.
For the test cases import from an Excel file useExcelFileTestCasesImportSettings
.- Parameters:
importFilePath
- The path of the source file for the import.
-
-
Method Detail
-
getImportFilePath
public java.lang.String getImportFilePath()
- Returns:
- The path of the source file for the import.
-
isWithHeaderLine
public boolean isWithHeaderLine()
- Returns:
- Whether the first line is a header.
-
setWithHeaderLine
public void setWithHeaderLine(boolean withHeaderLine)
- Parameters:
withHeaderLine
- Whether the first line is a header.
-
getIdColumn
public java.lang.String getIdColumn()
- Returns:
- The name of the column in the source file that contains the ID. Not relevant if the
synchronization method
isSynchronizationMethod#ALL_NEW
. - See Also:
TestCasesImportSettings.setSyncMethod(SynchronizationMethod)
-
setIdColumnAndAttribute
public void setIdColumnAndAttribute(java.lang.String idColumn, java.lang.String idAttribute)
Sets the name of the column in the source file that contains the ID and the TPT test case attribute that contains the ID to match existing test cases against imported ones.
Not relevant if thesynchronization method
isSynchronizationMethod#ALL_NEW
.- Parameters:
idColumn
- The name of the column in the source file that contains the ID.idAttribute
- The TPT test case attribute that contains the ID to match existing test cases against imported ones. Ifnull
, the importer uses the TPT test case ID to find a match.- See Also:
TestCasesImportSettings.setSyncMethod(SynchronizationMethod)
-
getNameColumn
public java.lang.String getNameColumn()
- Returns:
- Optional name of the column in the source file that contains the test case names (the name which is shown in the project tree). If left empty the importer will set default names.
-
setNameColumn
public void setNameColumn(java.lang.String nameColumn)
- Parameters:
nameColumn
- Optional name of the column in the source file that contains the test case names (the name which is shown in the project tree). If left empty the importer will set default names.
-
getTypeColumn
public java.lang.String getTypeColumn()
- Returns:
- Optional name of the column in the source file that contains the type information to
distinguish imported objects between test cases and test case groups. If no type column
is chosen, objects without children will be imported as test cases, others as groups.
Only relevant if the test case hierarchy creation method is
TestCaseHierarchyCreationMethod#LEVEL_AND_TYPE
. - See Also:
TestCasesImportSettings.setHierarchyCreationMethod(TestCaseHierarchyCreationMethod)
-
setTypeColumn
public void setTypeColumn(java.lang.String typeColumn)
- Parameters:
typeColumn
- Optional name of the column in the source file that contains the type information to distinguish imported objects between test cases and test case groups. If no type column is chosen, objects without children will be imported as test cases, others as groups. Only relevant if the test case hierarchy creation method isTestCaseHierarchyCreationMethod#LEVEL_AND_TYPE
.- See Also:
TestCasesImportSettings.setHierarchyCreationMethod(TestCaseHierarchyCreationMethod)
-
getTypeAssignments
public java.util.List<TestCasesImportSettings.TargetTypeAssignment> getTypeAssignments()
- Returns:
- Optional list with the assignments of the cell values in the type column to the target
types (test case vs. test case group). Only relevant if the test case hierarchy
creation method is
TestCaseHierarchyCreationMethod#LEVEL_AND_TYPE
.
Assignments for not imported cell values will be ignored. Get rid of them by assigningTestCasesImportSettings.TargetTypeAssignment.TargetType.AUTO
.
-
setTypeAssignments
public void setTypeAssignments(java.util.List<TestCasesImportSettings.TargetTypeAssignment> typeAssignments)
- Parameters:
typeAssignments
- Optional list with the assignments of the cell values in the type column to the target types (test case vs. test case group). Only relevant if the test case hierarchy creation method isTestCaseHierarchyCreationMethod#LEVEL_AND_TYPE
. Assignments for not imported cell values will be ignored. Get rid of them by assigningTestCasesImportSettings.TargetTypeAssignment.TargetType.AUTO
.
-
getLevelColumn
public java.lang.String getLevelColumn()
- Returns:
- Optional name of the column in the source file that contains level information. Only
relevant if the test case hierarchy creation method is
TestCaseHierarchyCreationMethod#LEVEL_AND_TYPE
. - See Also:
TestCasesImportSettings.setHierarchyCreationMethod(TestCaseHierarchyCreationMethod)
-
setLevelColumn
public void setLevelColumn(java.lang.String levelColumn)
- Parameters:
levelColumn
- Optional name of the column in the source file that contains level information. Only relevant if the test case hierarchy creation method isTestCaseHierarchyCreationMethod#LEVEL_AND_TYPE
.- See Also:
TestCasesImportSettings.setHierarchyCreationMethod(TestCaseHierarchyCreationMethod)
-
getGroupPathColumn
public java.lang.String getGroupPathColumn()
- Returns:
- Optional name of the column in the source file that contains group paths to create the
hierarchy. Only relevant if the test case hierarchy creation method is
TestCaseHierarchyCreationMethod#GROUP_PATH_ATTRIBUTE
. - See Also:
TestCasesImportSettings.setHierarchyCreationMethod(TestCaseHierarchyCreationMethod)
-
setGroupPathColumn
public void setGroupPathColumn(java.lang.String groupPathColumn)
- Parameters:
groupPathColumn
- Optional name of the column in the source file that contains group paths to create the hierarchy. Only relevant if the test case hierarchy creation method isTestCaseHierarchyCreationMethod#GROUP_PATH_ATTRIBUTE
.- See Also:
TestCasesImportSettings.setHierarchyCreationMethod(TestCaseHierarchyCreationMethod)
-
getDescriptionColumns
public java.util.List<java.lang.String> getDescriptionColumns()
- Returns:
- Optional list of names of columns in the source file that contain the test case descriptions.
-
setDescriptionColumns
public void setDescriptionColumns(java.util.List<java.lang.String> descriptionColumns)
- Parameters:
descriptionColumns
- Optional list of names of columns in the source file that contain the test case descriptions.
-
getLinksColumn
public java.lang.String getLinksColumn()
- Returns:
- Optional name of the column in the source file that contains requirement IDs to update
the links to test cases. If
null
, links are not imported.
-
setLinksColumn
public void setLinksColumn(java.lang.String linksColumn)
- Parameters:
linksColumn
- Optional name of the column in the source file that contains requirement IDs to update the links to test cases. If set tonull
, links are not imported.
-
getAttributeAssignments
public java.util.List<Pair<java.lang.String,java.lang.String>> getAttributeAssignments()
- Returns:
- Optional list of assigments of column names in the source file to test case attribute
names. To enable the automatic review of possible changes of an attribute add the
column name also to the
list of autoreview attributes
. - See Also:
TestCasesImportSettings.setAutoReviewAttributes(List)
-
setAttributeAssignments
public void setAttributeAssignments(java.util.List<Pair<java.lang.String,java.lang.String>> attributeAssignments)
- Parameters:
attributeAssignments
- Optional list of assigments of column names in the source file to test case attribute names. To enable the automatic review of possible changes of an attribute add the column name also to thelist of autoreview attributes
.- See Also:
TestCasesImportSettings.setAutoReviewAttributes(List)
-
-