Package com.polarion.alm.tracker.model
Interface ITestRecord
- All Superinterfaces:
IChangeGenerator
,IChangeListener
,IHasCustomValues
,IHasValues
,IStructure
- Since:
- 3.6.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addTestStepResult
(String resultId, Text comment) createAttachment
(String fileName, String title, InputStream data) Create new attachment.createAttachmentForTestStepResult
(int stepIndex, String fileName, String title, InputStream data) Create a new attachment for the given test step result.void
deleteAttachment
(String fileName) Delete attachment.void
deleteAttachmentById
(String attachmentId) Delete attachment using its id.getAttachment
(String fileName) Returns the list of attachments for this test record.int
If there are multiple test records for a single test case, these test records are also called iterations.getProperty
(String key) List<IParameterStruct<?>>
boolean
Checks if the related test case was fully executed (i.e.boolean
boolean
isPaused()
Checks if the test record is in the paused state.boolean
Checks if the test record is in the Planned state.boolean
isSigned()
void
removeProperty
(String key) void
setComment
(Text details) void
void
setDuration
(Float duration) void
setExecuted
(Date executed) void
setExecutedBy
(IUser executedBy) void
setProperty
(String key, String value) void
setResult
(IEnumOption result) Sets the test result and, if required by the test run, signs the execution as completed by the current user.void
The same assetResult(IEnumOption)
, but uses the result ID.void
setTestCase
(IWorkItem testCase) Set the test case without a revision, i.void
setTestCaseWithRevision
(IWorkItem testCase) This is the method that must be used by clients to set the test case for this record.Methods inherited from interface com.polarion.platform.persistence.model.IChangeGenerator
setChangeOwner
Methods inherited from interface com.polarion.platform.persistence.model.IChangeListener
markChanged
Methods inherited from interface com.polarion.platform.persistence.model.IHasCustomValues
getCustomField, getCustomFieldPrototype, getCustomFieldsList, setCustomField
Methods inherited from interface com.polarion.platform.persistence.model.IStructure
getEnumeration, getEnumerationOptionForField, getEnumerationTypeForField, getPrototype, getValue, isModified, isReadOnly, isReadOnly, setValue
-
Field Details
-
STRUCTURE_ID
- Since:
- 3.8.3
- See Also:
-
KEY_TEST_CASE
- See Also:
-
KEY_TEST_CASE_REVISION
- See Also:
-
KEY_TEST_CASE_WITH_REVISION
- See Also:
-
KEY_DEFECT
- See Also:
-
KEY_RESULT
- See Also:
-
KEY_COMMENT
- See Also:
-
KEY_EXECUTED_BY
- See Also:
-
KEY_EXECUTED
- See Also:
-
KEY_DURATION
- See Also:
-
KEY_ATTACHMENTS
- Since:
- 3.7.3
- See Also:
-
KEY_PROPERTIES
- See Also:
-
KEY_TEST_STEP_RESULTS
- See Also:
-
KEY_TEST_PARAMETERS
- Since:
- 3.9.2
- See Also:
-
KEY_ITERATION
- Since:
- 3.9.2
- See Also:
-
KEY_SIGNED
- Since:
- 3.10.0
- See Also:
-
TEST_RESULT_ENUM_ID
- See Also:
-
-
Method Details
-
getTestRun
ITestRun getTestRun() -
getTestCase
IWorkItem getTestCase() -
getTestCaseWithRevision
IWorkItem getTestCaseWithRevision()- Returns:
- The test case with a revision if the revision is set. If not, it returns the test case without a revision.
-
setTestCaseWithRevision
This is the method that must be used by clients to set the test case for this record. Test record also stores the current revision of the Work Item (or baseline) to indicate the exact state of the test case. Useful for setting executed (done) test cases. -
setTestCase
Set the test case without a revision, i. e. it should be always taken from the HEAD. Useful for planning test cases. When this method is called in a baseline or with a test case from a revision it does the same assetTestCaseWithRevision(IWorkItem)
.- Since:
- 3.6.2
-
getDefect
IWorkItem getDefect() -
setDefect
-
getResult
IEnumOption getResult() -
setResult
Sets the test result and, if required by the test run, signs the execution as completed by the current user. Note that the signing of a test record execution is allowed only via the Polarion UI. -
setResult
The same assetResult(IEnumOption)
, but uses the result ID. -
getExecutedBy
IUser getExecutedBy() -
setExecutedBy
-
getExecuted
Date getExecuted() -
setExecuted
-
getDuration
Float getDuration() -
setDuration
-
getComment
Text getComment() -
setComment
-
getProperty
-
setProperty
-
removeProperty
-
getTestStepResults
List<ITestStepResult> getTestStepResults()- Since:
- 3.6.3
-
addTestStepResult
- Since:
- 3.6.3
-
getAttachments
Returns the list of attachments for this test record.The returned list will NOT contain attachments attached to the test step results. They are accessible via
ITestStepResult.getAttachments()
.- Since:
- 3.7.3
-
createAttachment
@NotNull ITestRunAttachment createAttachment(@NotNull String fileName, @Nullable String title, @NotNull InputStream data) Create new attachment. The created attachment's file name might differ from the desired name.IPObject.save()
is called automatically upon the result.- Since:
- 3.7.3
-
createAttachmentForTestStepResult
@NotNull ITestRunAttachment createAttachmentForTestStepResult(int stepIndex, @NotNull String fileName, @Nullable String title, @NotNull InputStream data) Create a new attachment for the given test step result. The created attachment's file name might differ from the desired name.IPObject.save()
is called automatically on the result.- Parameters:
stepIndex
- The test step results index (intogetTestStepResults()
= zero-based)- Since:
- 3.7.3
-
deleteAttachment
Delete attachment.- Parameters:
fileName
- The attachment's file name. (The real name, not the one supplied tocreateAttachment(String, String, InputStream)
)- Since:
- 3.7.3
-
deleteAttachmentById
Delete attachment using its id.- Parameters:
attachmentId
- The attachment's id.- Since:
- 3.18.0
-
getAttachment
- Parameters:
fileName
- The attachment's file name (the real name, not the one supplied tocreateAttachment(String, String, InputStream)
)- Since:
- 3.18.0
-
getTestParameters
- Since:
- 3.9.2
-
getTestParametersManager
- Since:
- 3.9.2
-
isPaused
boolean isPaused()Checks if the test record is in the paused state. Where the related test case was partially executed and some data like test step results, attachments, etc. was filled in, but it still has no result (a test case verdict) yet. If the test record is neitherisPaused()
norisPlanned()
then related test case was fully executed.- Since:
- 3.9.2
-
isPlanned
boolean isPlanned()Checks if the test record is in the Planned state. Planned means, that the related test case wasn't executed, (even partially), and has no result. (A test case verdict). If the test record is neitherisPaused()
norisPlanned()
then the related test case was fully executed.- Since:
- 3.9.2
-
isExecuted
boolean isExecuted()Checks if the related test case was fully executed (i.e. if it is neitherisPaused()
norisPlanned()
).- Since:
- 3.9.2
-
getIteration
int getIteration()If there are multiple test records for a single test case, these test records are also called iterations. The iteration number of a test record is an index of it in the list of all test records for the same test case within the containing test run.- Returns:
- test iteration number or
-1
if the test record is newly created. - Since:
- 3.9.2
-
isIteration
boolean isIteration()- Returns:
true
if there are multiple test records for same test case. Otherwise it returnsfalse
.- Since:
- 3.9.2
- See Also:
-
isSigned
boolean isSigned()- Returns:
true
if this test record is executed and electronically signed.- Since:
- 3.10.0
-