Adding Graphics
We would like to be able to upload image files directly to Zephyr opposed to users having to save them to their local network folders prior to adding them as attachments. This would allow for a more central location of storing the images and a more seamless experience for our end users who believe the current method slows down their testing process.Add a pdf as an attachment for a mock response
I am reading a file from my system and i need to send it as a pdf attachment in my mock response. I am using ready api. Can any body give me advice please? I have tried the below code and when the request is made, the pdf is downloaded but it fails to load it on the browser. String filename='C:/soapui.log' File file = new File(filename); def headers = mockResponse.responseHeaders headers["Content-Type"]=["application/pdf"] headers["Content-Disposition"]=["attachment.pdf"] mockResponse.responseHeaders=headers How do i return a file as a pdf,which i am reading in from my system Any suggestions please? Thank youSolved10KViews0likes8CommentsUse API to see if TestRunResult has file(s) attached
I am using the REST and SOAP APIs in Java code to fetch data, especially attachments, from QAComplete projects. When checking if an entity has an attachment, in most cases there is this handy json key"nbr_files" attached to the object in the Get reply. However, when I get down to test run results level, this json key is nowhere to be found. Here's an example: I call Get on: http://qacomplete.companyUrl/rest-api/service/api/v2/projects/projId/testruns/testrunId/items/itemId/ And get the following json object: ... "test_run_results": [ { "id": testRunResultId, "test_run_item_id": idNo, "seq": 1, "is_stopped_on_fail": false, "status_code": "Passed", "step": "Test data<br> <br>", "expected_result": "xxxxx", "test_step_id": idNo, "project_id": projId, "is_tokenized": false } ] ... In this test_run_result item, there is no "nbr_files" key, but I have verified that there is actually a file attached to this entity. That is I can run soap.getAttachmentList(projId, testRunResultId, "TestRunResults"); and get a list of attachments. So finally, my question is, is it possible to see if a testRunResult item has an attachment without having to call SOAP.getAttachmentList() for every item in the test_run_results array?Solved2.6KViews0likes3Comments