Interface ITestRecord

All Superinterfaces:
IChangeGenerator, IChangeListener, IHasCustomValues, IHasValues, IStructure

public interface ITestRecord extends IStructure
Since:
3.6.0
  • Field Details

  • Method Details

    • getTestRun

      ITestRun getTestRun()
    • getTestCase

      IWorkItem getTestCase()
      See Also:
    • 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

      void setTestCaseWithRevision(IWorkItem testCase)
      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

      void setTestCase(IWorkItem testCase)
      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 as setTestCaseWithRevision(IWorkItem).
      Since:
      3.6.2
    • getDefect

      IWorkItem getDefect()
    • setDefect

      void setDefect(IWorkItem defect)
    • getResult

      IEnumOption getResult()
    • setResult

      void setResult(@Nullable IEnumOption result)
      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

      void setResult(@Nullable String resultId)
      The same as setResult(IEnumOption), but uses the result ID.
    • getExecutedBy

      IUser getExecutedBy()
    • setExecutedBy

      void setExecutedBy(IUser executedBy)
    • getExecuted

      Date getExecuted()
    • setExecuted

      void setExecuted(Date executed)
    • getDuration

      Float getDuration()
    • setDuration

      void setDuration(Float duration)
    • getComment

      Text getComment()
    • setComment

      void setComment(Text details)
    • getProperty

      String getProperty(String key)
    • setProperty

      void setProperty(String key, String value)
    • removeProperty

      void removeProperty(String key)
    • getTestStepResults

      List<ITestStepResult> getTestStepResults()
      Since:
      3.6.3
    • addTestStepResult

      void addTestStepResult(@Nullable String resultId, @Nullable Text comment)
      Since:
      3.6.3
    • getAttachments

      @NotNull List<ITestRunAttachment> 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 (into getTestStepResults() = zero-based)
      Since:
      3.7.3
    • deleteAttachment

      void deleteAttachment(@NotNull String fileName)
      Delete attachment.
      Parameters:
      fileName - The attachment's file name. (The real name, not the one supplied to createAttachment(String, String, InputStream))
      Since:
      3.7.3
    • deleteAttachmentById

      void deleteAttachmentById(@NotNull String attachmentId)
      Delete attachment using its id.
      Parameters:
      attachmentId - The attachment's id.
      Since:
      3.18.0
    • getAttachment

      @Nullable ITestRunAttachment getAttachment(@NotNull String fileName)
      Parameters:
      fileName - The attachment's file name (the real name, not the one supplied to createAttachment(String, String, InputStream))
      Since:
      3.18.0
    • getTestParameters

      @NotNull List<IParameterStruct<?>> getTestParameters()
      Since:
      3.9.2
    • getTestParametersManager

      @NotNull IParametersManager 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 neither isPaused() nor isPlanned() 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 neither isPaused() nor isPlanned() 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 neither isPaused() nor isPlanned()).
      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 returns false.
      Since:
      3.9.2
      See Also:
    • isSigned

      boolean isSigned()
      Returns:
      true if this test record is executed and electronically signed.
      Since:
      3.10.0