Package com.polarion.alm.tracker.model
Interface ITestRun
- All Superinterfaces:
IAdaptable
,IChangeListener
,IHasCustomValues
,IHasValues
,ILocatedObject
,IPObject
,IUniqueObject
,IWithAttachments<ITestRunAttachment>
,IWorkflowObject
public interface ITestRun
extends IWorkflowObject, ILocatedObject, IWithAttachments<ITestRunAttachment>
- 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
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from interface com.polarion.alm.projects.model.IUniqueObject
KEY_ID, KEY_PROJECT
Fields inherited from interface com.polarion.alm.tracker.model.IWorkflowObject
KEY_STATUS, KEY_TYPE, KEY_WORKFLOW_SIGNATURES
-
Method Summary
Modifier and TypeMethodDescriptionAdds a new empty Test Record to the Test Run.createAttachment
(String fileName, String title, InputStream data) Creates the (temporary) attachment object, which can be manipulated by the client.Creates a Document filter that can be used to filter the Test Case Document for unexecuted Test Cases.Creates a query for the Test Cases that are executed in this Test Run.Creates a query for all the Test Cases in the Test Run.createQueryForExecutedTestCases
(String resultId) Creates query for the Test Cases that are executed in this Test Run with the given result.Creates a query for the Test Cases of this Test Run that have not been executed yet.createSummaryDefect
(IWorkItem defectTemplate) Creates a summary defect based on the given template and stores it to theKEY_SUMMARY_DEFECT
field of the Test Run if it does not exist yet.void
delete()
Deletes this Test Run.Returns all Test Records, even those that are paused or have not been executed yet.getAllRecordsForTestCase
(IWorkItem testCase) Returns all Test Records for the Test Case, even those that are paused or have not been executed yet.getAllRecordsForTestCase
(String testCaseId) Deprecated.getAttachment
(String fileName) Returns attachment with given id.Returns all attachments of this object.SeegetCommentsManager()
for operations with comments.getLabel()
Returns the Test Run label.Returns theIProject
list where Test Cases for this Test Run can be planned.getQuery()
Returns all executed Test Records.int
Returns a records count.int
getRecordsCount
(String resultId) Returns a records count with a specified result.getRecordsForResult
(String resultId) Returns records with a specified result.getRecordsForTestCase
(IWorkItem testCase) Returns executed Test Records for the Test Case.getRecordsForTestCase
(String testCaseId) Deprecated.UsegetRecordsForTestCase(IWorkItem)
instead.Determines the way the Test Cases of this Test Run are defined.getTitle()
Returns all workflow signatures in the creation order.Returns signatures manager that can be used for all signature related tasks.boolean
boolean
boolean
boolean
true
indicates that the Test Run's Report (KEY_HOMEPAGECONTENT
) from this Test Run should be ignored and instead it should be read from the (KEY_TEMPLATE
) template .boolean
removeRecordForTestCase
(IWorkItem testCase, int iteration) Removes the record for the given Test Case and iteration number.void
removeRecordsForTestCase
(IWorkItem testCase) Removes the records from the given Test Case.void
removeRecordsForTestCase
(String testCaseId) Deprecated.UseremoveRecordsForTestCase(IWorkItem)
instead.void
setDocument
(IModule document) void
setFinishedOn
(Date finishedOn) void
setGroupId
(String groupId) void
setHomePageContent
(Text value) void
setIdPrefix
(String prefix) void
setIsTemplate
(boolean isTemplate) void
setKeepInHistory
(boolean keepInHistory) A Test run that has the 'keep in history' flag switched on will be available when browsing a baseline, even if it has already been deleted.void
void
setSelectTestCasesBy
(ISelectTestCasesByOpt scopeType) void
setSelectTestCasesBy
(String selectTestCasesById) void
setStatus
(IStatusOpt status) void
Sets new Test Run title.void
setType
(IEnumOption type) Deprecated.void
setUseReportFromTemplate
(boolean value) void
setWikiContent
(Text content) updateSummaryDefect
(String source, int totalFailures, int totalErrors, int totalTests, IWorkItem defectTemplate) Updates the description of the summary defect by appending a standard text about the number of tests and the various results.Methods inherited from interface com.polarion.platform.persistence.model.IAdaptable
adapt
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.alm.projects.model.ILocatedObject
getLocation
Methods inherited from interface com.polarion.platform.persistence.model.IPObject
copyTo, createStructureForKey, forget, getContextId, getDataRevision, getDataSvc, getEnumerationOptionForField, getEnumerationTypeForField, getFieldLabel, getFieldType, getIncompatibleCustomField, getIncompatibleCustomFieldPrototype, getIncompatibleCustomFieldsList, getLastRevision, getLocalId, getObjectId, getPrototype, getRevision, getUri, getValue, isModified, isPersisted, isReadOnly, isResolved, isUnresolvable, resolve, save, setEnumerationValue, setValue, update
Methods inherited from interface com.polarion.alm.projects.model.IUniqueObject
getId, getProjectId
Methods inherited from interface com.polarion.alm.tracker.model.IWithAttachments
deleteAttachment
Methods inherited from interface com.polarion.alm.tracker.model.IWorkflowObject
can, getAvailableActions, getInitialAction, getProject, getTrackerService, getType, getUnavailableActions, performAction, resetWorkflow, setType
-
Field Details
-
PROTO
- See Also:
-
KEY_LOCATION
- See Also:
-
KEY_TITLE
- Since:
- 3.10.1
- See Also:
-
KEY_CREATED
- See Also:
-
KEY_AUTHOR
- See Also:
-
KEY_GROUP_ID
- See Also:
-
KEY_SUMMARY_DEFECT
- See Also:
-
KEY_IS_TEMPLATE
- See Also:
-
KEY_TEMPLATE
- See Also:
-
KEY_QUERY
-
KEY_FINISHED_ON
- See Also:
-
KEY_UPDATED
- See Also:
-
KEY_RECORDS
- See Also:
-
KEY_KEEP_IN_HISTORY
- See Also:
-
KEY_ID_PREFIX
- Since:
- 3.9.1
- See Also:
-
KEY_SELECT_TEST_CASES_BY
- Since:
- 3.6.2
- See Also:
-
KEY_DOCUMENT
- Since:
- 3.6.2
- See Also:
-
KEY_ATTACHMENTS
- Since:
- 3.7.1
- See Also:
-
KEY_TEST_PARAMETERS
- Since:
- 3.9.2
- See Also:
-
KEY_COMMENTS
- Since:
- 3.10.0
- See Also:
-
KEY_HOMEPAGECONTENT
- Since:
- 3.10.0
- See Also:
-
KEY_USE_REPORT_FROM_TEMPLATE
- Since:
- 3.10.0
- See Also:
-
KEY_PROJECT_SPAN
- Since:
- 3.10.1
- See Also:
-
FIELD_ORDER
-
DIFF_IGNORED_FIELDS
-
ENUM_ID_STATUS
- Since:
- 3.10.0
- See Also:
-
-
Method Details
-
getTestManagementService
ITestManagementService getTestManagementService() -
getCreated
Date getCreated() -
getTitle
- Returns:
- title of Test Run if set.
- Since:
- 3.10.1
-
setTitle
Sets new Test Run title.- Since:
- 3.10.1
-
getUpdated
- Since:
- 3.10.0
-
getAuthor
IUser getAuthor() -
getGroupId
String getGroupId() -
setGroupId
-
setType
Deprecated. -
isTemplate
boolean isTemplate() -
setIsTemplate
void setIsTemplate(boolean isTemplate) -
getTemplate
ITestRun getTemplate() -
getQuery
-
setQuery
-
getDocument
IModule getDocument()- Since:
- 3.6.2
-
setDocument
- Since:
- 3.6.2
-
getStatus
- Specified by:
getStatus
in interfaceIWorkflowObject
-
setStatus
-
getFinishedOn
Date getFinishedOn() -
setFinishedOn
-
getSummaryDefect
IWorkItem getSummaryDefect() -
createSummaryDefect
Creates a summary defect based on the given template and stores it to theKEY_SUMMARY_DEFECT
field of the Test Run if it does not exist yet. Otherwise it just returns the existing summary defect.IPObject.save()
does not need to be called on this Test Run orIPObject.save()
on the returned object.- Parameters:
defectTemplate
- When null, then a Work Item configured byTestsConfiguration.getDefectTemplate()
for the project is used.- Returns:
- the created defect Work Item.
-
updateSummaryDefect
IWorkItem updateSummaryDefect(String source, int totalFailures, int totalErrors, int totalTests, IWorkItem defectTemplate) Updates the description of the summary defect by appending a standard text about the number of tests and the various results. Creates a new summary defect using thecreateSummaryDefect(IWorkItem)
method if it does not exist yet.IPObject.save()
does not need to be called on the returned object.- Parameters:
source
- The string description of the automated test import source. For example, the name of the input file.totalFailures
- The number of failed tests.totalErrors
- The number of tests with errors.totalTests
- The total number of tests.defectTemplate
- passed to methodcreateSummaryDefect(IWorkItem)
when it is called.
-
getRecords
List<ITestRecord> getRecords()Returns all executed Test Records. -
getAllRecords
List<ITestRecord> getAllRecords()Returns all Test Records, even those that are paused or have not been executed yet. (That represent planned Test Cases.) The returned list is live, so it can be used to add or remove Test Records.- Since:
- 3.6.2
-
getRecordsForResult
Returns records with a specified result. (Can be more effective than iterating over the records collection.)- Parameters:
resultId
-
-
addRecord
ITestRecord addRecord()Adds a new empty Test Record to the Test Run.IPObject.save()
must be called after the fields of the record are filled in.- Returns:
- The added record.
-
getRecordsForTestCase
Deprecated.UsegetRecordsForTestCase(IWorkItem)
instead.Returns executed Test Records for the Test Case. -
getRecordsForTestCase
Returns executed Test Records for the Test Case.- Since:
- 3.10.1
-
getAllRecordsForTestCase
Deprecated.UsegetAllRecordsForTestCase(IWorkItem)
instead.Returns all Test Records for the Test Case, even those that are paused or have not been executed yet. (That represent planned Test Cases.)- Since:
- 3.9.2
-
getAllRecordsForTestCase
Returns all Test Records for the Test Case, even those that are paused or have not been executed yet. (That represent planned Test Cases.)- Since:
- 3.10.1.
-
removeRecordsForTestCase
Deprecated.UseremoveRecordsForTestCase(IWorkItem)
instead.- Since:
- 3.6.2
-
removeRecordsForTestCase
Removes the records from the given Test Case.- Since:
- 3.10.1
-
removeRecordForTestCase
Removes the record for the given Test Case and iteration number. Warning: The iteration numbers can change when a test record is inserted or removed. If you want to insert/remove multiple iterations, consider callinggetAllRecords()
and modifying the returned list instead.- Parameters:
testCase
- to be removed.iteration
- to be removed. Counted from 0. Negative values are not allowed.- Returns:
true
if the record existed and was removed,false
otherwise.- Since:
- 3.24.4
-
getRecordsCount
int getRecordsCount()Returns a records count. (Can be more effective than resolving the whole Test Run.) -
getRecordsCount
Returns a records count with a specified result. (Can be more effective than iterating over the records collection.)- Parameters:
resultId
-
-
delete
void delete()Deletes this Test Run. -
createQueryForAllExecutedTestCases
String createQueryForAllExecutedTestCases()Creates a query for the Test Cases that are executed in this Test Run.- Returns:
- the created query
-
createQueryForExecutedTestCases
Creates query for the Test Cases that are executed in this Test Run with the given result.- Parameters:
resultId
- Can not be null.- Returns:
- The created query.
-
createQueryForNotExecutedTestCases
String createQueryForNotExecutedTestCases()Creates a query for the Test Cases of this Test Run that have not been executed yet.- Returns:
- The created query.
-
createFilterForNotExecutedTestCases
String createFilterForNotExecutedTestCases()Creates a Document filter that can be used to filter the Test Case Document for unexecuted Test Cases. Valid only if the Test Case Document is set.- Since:
- 3.6.2
- See Also:
-
createQueryForAllTestCases
Creates a query for all the Test Cases in the Test Run. (The Test Cases that are executed, paused or planned.)- See Also:
-
getLabel
String getLabel()Returns the Test Run label.- Returns:
- label
-
isKeepInHistory
boolean isKeepInHistory()- See Also:
-
setKeepInHistory
void setKeepInHistory(boolean keepInHistory) A Test run that has the 'keep in history' flag switched on will be available when browsing a baseline, even if it has already been deleted. -
getSelectTestCasesBy
ISelectTestCasesByOpt getSelectTestCasesBy()Determines the way the Test Cases of this Test Run are defined.- Since:
- 3.6.2
- See Also:
-
setSelectTestCasesBy
- Since:
- 3.6.2
-
setSelectTestCasesBy
- Since:
- 3.6.2
-
getAttachments
Description copied from interface:IWithAttachments
Returns all attachments of this object.- Specified by:
getAttachments
in interfaceIWithAttachments<ITestRunAttachment>
- Returns:
- attachments (never
null
) - Since:
- 3.7.1
-
getAttachment
Description copied from interface:IWithAttachments
Returns attachment with given id.- Specified by:
getAttachment
in interfaceIWithAttachments<ITestRunAttachment>
- Parameters:
fileName
- attachment's id (notnull
)- Returns:
- attachment or
null
if not found - Since:
- 3.7.1
-
createAttachment
@NotNull ITestRunAttachment createAttachment(@NotNull String fileName, @Nullable String title, @NotNull InputStream data) Description copied from interface:IWithAttachments
Creates the (temporary) attachment object, which can be manipulated by the client. However, the attachment is not persisted until it's explicitly saved.The author field is automatically pre-filled with the current user.
- Specified by:
createAttachment
in interfaceIWithAttachments<ITestRunAttachment>
- Parameters:
fileName
- The file name, can not benull
.title
- The title (can benull
- file name is used then).data
- The content input stream, can not benull
- Returns:
- the temporary
IAttachement
created - Since:
- 3.7.1
-
getWikiContent
Text getWikiContent()- Since:
- 3.7.1
-
setWikiContent
- Since:
- 3.7.1
-
getTestParameters
- Since:
- 3.9.2
-
getTestParametersManager
- Since:
- 3.9.2
-
setIdPrefix
- Since:
- 3.9.1 Used as a prefix for the Test Run Id of Test Runs created from this Template.
-
getIdPrefix
- Since:
- 3.9.1
-
getComments
SeegetCommentsManager()
for operations with comments.- Since:
- 3.10.0
-
getCommentsManager
- Since:
- 3.10.0
-
isRichPageTestRun
boolean isRichPageTestRun()- Returns:
- true if this Test Run report is Rich Page based.
Always returns true if
isUseReportFromTemplate()
is true. - Since:
- 3.10.0
-
getHomePageContent
- Since:
- 3.10.0
-
setHomePageContent
- Since:
- 3.10.0
-
isUseReportFromTemplate
boolean isUseReportFromTemplate()true
indicates that the Test Run's Report (KEY_HOMEPAGECONTENT
) from this Test Run should be ignored and instead it should be read from the (KEY_TEMPLATE
) template . Only works for Rich Page Test Runs.- Since:
- 3.10.0
-
setUseReportFromTemplate
void setUseReportFromTemplate(boolean value) - Since:
- 3.10.0
-
getWorkflowSignaturesManager
Description copied from interface:IWorkflowObject
Returns signatures manager that can be used for all signature related tasks.- Specified by:
getWorkflowSignaturesManager
in interfaceIWorkflowObject
- Since:
- 3.10.0
-
getWorkflowSignatures
Description copied from interface:IWorkflowObject
Returns all workflow signatures in the creation order. Usually the clients will use the signatures manager to work with signatures.- Specified by:
getWorkflowSignatures
in interfaceIWorkflowObject
- Since:
- 3.10.0
- See Also:
-
getProjectSpan
Returns theIProject
list where Test Cases for this Test Run can be planned. If the list is empty, only Test Cases from the current project can be planned.- Since:
- 3.10.1
-
getAllRecordsForTestCase(IWorkItem)
instead.