Package de.qytera.qtaf.testrail.utils
Class TestRailManager
java.lang.Object
de.qytera.qtaf.testrail.utils.TestRailManager
A manager class for keeping track of and uploading executed tests.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddAttachmentForTestCase(APIClient client, String testCaseId, String path) Add an attachment to a test case.static voidaddResultForTestCase(APIClient client, String caseId, String runId, int status, String comment) Add the result of an executed test case.static voiddeleteAttachmentForTestCase(APIClient client, String attachmentId) Delete an attachment.static AttachmentsgetAttachmentsForTestCase(APIClient client, String testCaseId) Get all attachments for a test case.
-
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 clientcaseId- the TestRail case IDrunId- the TestRail run IDstatus- the test statuscomment- any additional comment- Throws:
APIException- if something goes wrong during upload
-
addAttachmentForTestCase
Add an attachment to a test case.- Parameters:
client- the TestRail API clienttestCaseId- the test case IDpath- the attachment file path
-
deleteAttachmentForTestCase
public static void deleteAttachmentForTestCase(APIClient client, String attachmentId) throws APIException Delete an attachment.- Parameters:
client- the TestRail API clientattachmentId- 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
-