Class TestRailManager

java.lang.Object
de.qytera.qtaf.testrail.utils.TestRailManager

public class TestRailManager extends Object
A manager class for keeping track of and uploading executed tests.
  • Method Details

    • addResultForTestCase

      public static void addResultForTestCase(APIClient client, String caseId, String runId, int status, String comment) throws APIException
      Add the result of an executed test case.
      Parameters:
      client - the TestRail API client
      caseId - the TestRail case ID
      runId - the TestRail run ID
      status - the test status
      comment - any additional comment
      Throws:
      APIException - if something goes wrong during upload
    • addAttachmentForTestCase

      public static void addAttachmentForTestCase(APIClient client, String testCaseId, String path)
      Add an attachment to a test case.
      Parameters:
      client - the TestRail API client
      testCaseId - the test case ID
      path - the attachment file path
    • deleteAttachmentForTestCase

      public static void deleteAttachmentForTestCase(APIClient client, String attachmentId) throws APIException
      Delete an attachment.
      Parameters:
      client - the TestRail API client
      attachmentId - the attachment
      Throws:
      APIException - if something goes wrong during deletion
    • getAttachmentsForTestCase

      public static Attachments getAttachmentsForTestCase(APIClient client, String testCaseId) throws APIException
      Get all attachments for a test case.
      Parameters:
      client - the TestRail API client.
      testCaseId - the test case ID
      Returns:
      all attachments of the test case
      Throws:
      APIException - if something goes wrong during attachment retrieval