Class ResultAttachmentRequestBuilder

java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.test.attachments.ResultAttachmentRequestBuilder

public class ResultAttachmentRequestBuilder extends BaseRequestBuilder
Provides functionality to work with Test result attachments Api.
  • Constructor Details

    • ResultAttachmentRequestBuilder

      public ResultAttachmentRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential)
      Instantiates a new RequestBuilder instance and sets the default values.
      Parameters:
      organizationUrl - Represents organization location request url.
      accessTokenCredential - Access token credential object.
  • Method Details

    • createAsync

      public CompletableFuture<TestAttachmentReference> createAsync(int runId, int testCaseResultId, TestAttachmentRequestModel requestModel) throws AzDException
      Attach a file to a test result.
      Parameters:
      runId - ID of the test run that contains the result.
      testCaseResultId - ID of the test result against which attachment has to be uploaded.
      requestModel - Request body to create the result attachment.
      Returns:
      TestAttachmentReference TestAttachmentReference
      Throws:
      AzDException - Default Api exception handler.
    • createAsync

      public CompletableFuture<TestAttachmentReference> createAsync(int runId, int testCaseResultId, TestAttachmentRequestModel requestModel, int testSubResultId) throws AzDException
      Attach a file to a test result.
      Parameters:
      runId - ID of the test run that contains the result.
      testCaseResultId - ID of the test result against which attachment has to be uploaded.
      requestModel - Request body to create the result attachment.
      testSubResultId - ID of the test sub results against which attachment has to be uploaded.
      Returns:
      TestAttachmentReference TestAttachmentReference
      Throws:
      AzDException - Default Api exception handler.
    • getContentAsync

      public CompletableFuture<InputStream> getContentAsync(int attachmentId, int runId, int testCaseResultId) throws AzDException
      Download a test result attachment by its ID.
      Parameters:
      attachmentId - ID of the test result attachment to be downloaded.
      runId - ID of the test run that contains the result.
      testCaseResultId - ID of the test result against which attachment has to be uploaded.
      Returns:
      InputStream of attachment content.
      Throws:
      AzDException - Default Api exception handler.
    • getAsZipAsync

      public CompletableFuture<InputStream> getAsZipAsync(int attachmentId, int runId, int testCaseResultId) throws AzDException
      Download a test result attachment by its ID.
      Parameters:
      attachmentId - ID of the test result attachment to be downloaded.
      runId - ID of the test run that contains the result.
      testCaseResultId - ID of the test result against which attachment has to be uploaded.
      Returns:
      InputStream of attachment content as zip file.
      Throws:
      AzDException - Default Api exception handler.
    • getContentAsync

      public CompletableFuture<InputStream> getContentAsync(int attachmentId, int runId, int testCaseResultId, int testSubResultId) throws AzDException
      Download a test sub result attachment by its ID.
      Parameters:
      attachmentId - ID of the test result attachment to be downloaded.
      runId - ID of the test run that contains the result.
      testCaseResultId - ID of the test result against which attachment has to be uploaded.
      testSubResultId - ID of the test sub result whose attachment has to be downloaded
      Returns:
      InputStream of attachment content.
      Throws:
      AzDException - Default Api exception handler.
    • getAsZipAsync

      public CompletableFuture<InputStream> getAsZipAsync(int attachmentId, int runId, int testCaseResultId, int testSubResultId) throws AzDException
      Download a test sub result attachment by its ID.
      Parameters:
      attachmentId - ID of the test result attachment to be downloaded.
      runId - ID of the test run that contains the result.
      testCaseResultId - ID of the test result against which attachment has to be uploaded.
      testSubResultId - ID of the test sub result whose attachment has to be downloaded
      Returns:
      InputStream of attachment content as zip file.
      Throws:
      AzDException - Default Api exception handler.
    • listAsync

      public CompletableFuture<TestAttachments> listAsync(int runId, int testCaseResultId, int testSubResultId) throws AzDException
      Get list of test sub result attachments.
      Parameters:
      runId - ID of the test run that contains the result.
      testCaseResultId - ID of the test result against which attachment has to be uploaded.
      testSubResultId - ID of the test sub result whose attachment has to be downloaded
      Returns:
      List of TestAttachment TestAttachments
      Throws:
      AzDException - Default Api exception handler.
    • create

      public TestAttachmentReference create(int runId, int testCaseResultId, TestAttachmentRequestModel requestModel) throws AzDException
      Attach a file to a test result.
      Parameters:
      runId - ID of the test run that contains the result.
      testCaseResultId - ID of the test result against which attachment has to be uploaded.
      requestModel - Request body to create the result attachment.
      Returns:
      TestAttachmentReference TestAttachmentReference
      Throws:
      AzDException - Default Api exception handler.
    • create

      public TestAttachmentReference create(int runId, int testCaseResultId, TestAttachmentRequestModel requestModel, int testSubResultId) throws AzDException
      Attach a file to a test result.
      Parameters:
      runId - ID of the test run that contains the result.
      testCaseResultId - ID of the test result against which attachment has to be uploaded.
      requestModel - Request body to create the result attachment.
      testSubResultId - ID of the test sub results against which attachment has to be uploaded.
      Returns:
      TestAttachmentReference TestAttachmentReference
      Throws:
      AzDException - Default Api exception handler.
    • getContent

      public InputStream getContent(int attachmentId, int runId, int testCaseResultId) throws AzDException
      Download a test result attachment by its ID.
      Parameters:
      attachmentId - ID of the test result attachment to be downloaded.
      runId - ID of the test run that contains the result.
      testCaseResultId - ID of the test result against which attachment has to be uploaded.
      Returns:
      InputStream of attachment content.
      Throws:
      AzDException - Default Api exception handler.
    • getAsZip

      public InputStream getAsZip(int attachmentId, int runId, int testCaseResultId) throws AzDException
      Download a test result attachment by its ID.
      Parameters:
      attachmentId - ID of the test result attachment to be downloaded.
      runId - ID of the test run that contains the result.
      testCaseResultId - ID of the test result against which attachment has to be uploaded.
      Returns:
      InputStream of attachment content as zip file.
      Throws:
      AzDException - Default Api exception handler.
    • getContent

      public InputStream getContent(int attachmentId, int runId, int testCaseResultId, int testSubResultId) throws AzDException
      Download a test sub result attachment by its ID.
      Parameters:
      attachmentId - ID of the test result attachment to be downloaded.
      runId - ID of the test run that contains the result.
      testCaseResultId - ID of the test result against which attachment has to be uploaded.
      testSubResultId - ID of the test sub result whose attachment has to be downloaded
      Returns:
      InputStream of attachment content.
      Throws:
      AzDException - Default Api exception handler.
    • getAsZip

      public InputStream getAsZip(int attachmentId, int runId, int testCaseResultId, int testSubResultId) throws AzDException
      Download a test sub result attachment by its ID.
      Parameters:
      attachmentId - ID of the test result attachment to be downloaded.
      runId - ID of the test run that contains the result.
      testCaseResultId - ID of the test result against which attachment has to be uploaded.
      testSubResultId - ID of the test sub result whose attachment has to be downloaded
      Returns:
      InputStream of attachment content as zip file.
      Throws:
      AzDException - Default Api exception handler.
    • list

      public TestAttachments list(int runId, int testCaseResultId, int testSubResultId) throws AzDException
      Get list of test sub result attachments.
      Parameters:
      runId - ID of the test run that contains the result.
      testCaseResultId - ID of the test result against which attachment has to be uploaded.
      testSubResultId - ID of the test sub result whose attachment has to be downloaded
      Returns:
      List of TestAttachment TestAttachments
      Throws:
      AzDException - Default Api exception handler.