Interface ITestRun

All Superinterfaces:
IAdaptable, IChangeListener, IHasCustomValues, IHasValues, ILocatedObject, IPObject, IUniqueObject, IWithAttachments<ITestRunAttachment>, IWorkflowObject

Since:
3.6.0
  • Field Details

  • Method Details

    • getTestManagementService

      ITestManagementService getTestManagementService()
    • getCreated

      Date getCreated()
    • getTitle

      @Nullable String getTitle()
      Returns:
      title of Test Run if set.
      Since:
      3.10.1
    • setTitle

      void setTitle(@Nullable String value)
      Sets new Test Run title.
      Since:
      3.10.1
    • getUpdated

      @Nullable Date getUpdated()
      Since:
      3.10.0
    • getAuthor

      IUser getAuthor()
    • getGroupId

      String getGroupId()
    • setGroupId

      void setGroupId(String groupId)
    • setType

      @Deprecated void setType(IEnumOption type)
      Deprecated.
    • isTemplate

      boolean isTemplate()
    • setIsTemplate

      void setIsTemplate(boolean isTemplate)
    • getTemplate

      ITestRun getTemplate()
    • getQuery

      @Nullable String getQuery()
    • setQuery

      void setQuery(String query)
    • getDocument

      IModule getDocument()
      Since:
      3.6.2
    • setDocument

      void setDocument(IModule document)
      Since:
      3.6.2
    • getStatus

      @Nullable IStatusOpt getStatus()
      Specified by:
      getStatus in interface IWorkflowObject
    • setStatus

      void setStatus(@Nullable IStatusOpt status)
    • getFinishedOn

      Date getFinishedOn()
    • setFinishedOn

      void setFinishedOn(Date finishedOn)
    • getSummaryDefect

      IWorkItem getSummaryDefect()
    • createSummaryDefect

      IWorkItem createSummaryDefect(IWorkItem defectTemplate)
      Creates a summary defect based on the given template and stores it to the KEY_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 or IPObject.save() on the returned object.
      Parameters:
      defectTemplate - When null, then a Work Item configured by TestsConfiguration.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 the createSummaryDefect(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 method createSummaryDefect(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

      List<ITestRecord> getRecordsForResult(String resultId)
      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

      @NotNull @Deprecated List<ITestRecord> getRecordsForTestCase(@NotNull String testCaseId)
      Deprecated.
      Returns executed Test Records for the Test Case.
    • getRecordsForTestCase

      @NotNull List<ITestRecord> getRecordsForTestCase(@NotNull IWorkItem testCase)
      Returns executed Test Records for the Test Case.
      Since:
      3.10.1
    • getAllRecordsForTestCase

      @Deprecated @NotNull List<ITestRecord> getAllRecordsForTestCase(@NotNull String testCaseId)
      Deprecated.
      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

      @NotNull List<ITestRecord> getAllRecordsForTestCase(@NotNull IWorkItem testCase)
      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 void removeRecordsForTestCase(String testCaseId)
      Deprecated.
      Since:
      3.6.2
    • removeRecordsForTestCase

      void removeRecordsForTestCase(@NotNull IWorkItem testCase)
      Removes the records from the given Test Case.
      Since:
      3.10.1
    • getRecordsCount

      int getRecordsCount()
      Returns a records count. (Can be more effective than resolving the whole Test Run.)
    • getRecordsCount

      int getRecordsCount(String resultId)
      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

      String createQueryForExecutedTestCases(String resultId)
      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

      @NotNull String 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

      void setSelectTestCasesBy(ISelectTestCasesByOpt scopeType)
      Since:
      3.6.2
    • setSelectTestCasesBy

      void setSelectTestCasesBy(String selectTestCasesById)
      Since:
      3.6.2
    • getAttachments

      @NotNull IPObjectList<ITestRunAttachment> getAttachments()
      Description copied from interface: IWithAttachments
      Returns all attachments of this object.
      Specified by:
      getAttachments in interface IWithAttachments<ITestRunAttachment>
      Returns:
      attachments (never null)
      Since:
      3.7.1
    • getAttachment

      @Nullable ITestRunAttachment getAttachment(@NotNull String fileName)
      Description copied from interface: IWithAttachments
      Returns attachment with given id.
      Specified by:
      getAttachment in interface IWithAttachments<ITestRunAttachment>
      Parameters:
      fileName - attachment's id (not null)
      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 interface IWithAttachments<ITestRunAttachment>
      Parameters:
      fileName - The file name, can not be null.
      title - The title (can be null - file name is used then).
      data - The content input stream, can not be null
      Returns:
      the temporary IAttachement created
      Since:
      3.7.1
    • getWikiContent

      Text getWikiContent()
      Since:
      3.7.1
    • setWikiContent

      void setWikiContent(Text content)
      Since:
      3.7.1
    • getTestParameters

      @Nullable IParametersAndDefinitionsStruct getTestParameters()
      Since:
      3.9.2
    • getTestParametersManager

      @NotNull IParametersAndDefinitionsManager getTestParametersManager()
      Since:
      3.9.2
    • setIdPrefix

      void setIdPrefix(@NotNull String prefix)
      Since:
      3.9.1 Used as a prefix for the Test Run Id of Test Runs created from this Template.
    • getIdPrefix

      @Nullable String getIdPrefix()
      Since:
      3.9.1
    • getComments

      @NotNull IPObjectList<ITestRunComment> getComments()
      See getCommentsManager() for operations with comments.
      Since:
      3.10.0
    • getCommentsManager

      @NotNull ITestRunCommentsManager 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

      @Nullable Text getHomePageContent()
      Since:
      3.10.0
    • setHomePageContent

      void setHomePageContent(@Nullable Text value)
      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

      @NotNull IWorkflowSignaturesManager<ITestRunWorkflowSignature> getWorkflowSignaturesManager()
      Description copied from interface: IWorkflowObject
      Returns signatures manager that can be used for all signature related tasks.
      Specified by:
      getWorkflowSignaturesManager in interface IWorkflowObject
      Since:
      3.10.0
    • getWorkflowSignatures

      @NotNull List<ITestRunWorkflowSignature> 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 interface IWorkflowObject
      Since:
      3.10.0
      See Also:
    • getProjectSpan

      @NotNull List<IProject> getProjectSpan()
      Returns the IProject 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