Automate the process of sending Postman Requests and save the responses in a file - rest

I want to automate the process of sending get requests to an API and save the responses in a JSON file. I have researched a lot online and haven't found anything. I have created a collection and run it, but how do I automate it.

When you have your tests collection built in Postman, you shall run it with newman (see useful options here, this link helped me a lot !).
If your collection can be run with Postman runner, it should work perfectly. I haven't tried to generate reports in JSON but it works fine for HTML and JUnit style reports ... and you can set a specific reporting parameter to have results set in a JSON file.

Related

I need to integrate junit-report results back to x-ray jira based on the ticket number on jira

I'm trying to generate a custom XML report for my cypress tests so they can map directly to a specific issue type in Xray for Jira upon import. I've read through a lot of the documentation on reporters and I've set up the configuration to generate XML files for tests/test runs so currently I can generate a combined report of my whole test suite, but when I import the file into Xray it creates new issuekeys. I already have created the test cases in Xray and I want my XML file to contain specific information on which cypress test should go to each Xray test case. Does anyone have advice or know how to do this?

Import JSON/YAML into Postman from Swagger (OA 3.0.1)

There exist projects like this and this that convert APIs in Swagger to Postman collections.
Is there a way to script importing the Postman collection JSON file into Postman?
To be clear, I am trying to avoid having to use the Postman GUI to do the import.
I want the whole process to be automated.
I am on a Windows environment.
Ideal goal: import directly from https://myapi/v1/swagger.json into Postman.
Even better: trigger on change.
Motivation: Postman always has latest-and-greatest API version.

Syntax for tRest component to upload local file Talend

So i have to upload text file to server with PUT request, i know there is similar solution but as it seems, not only for me it is generating errors:
solution generating error message
I know there is possibility to this this with tFileFetch component but it only support POST request.
My current job looks like this:
talend Job
And my question is how to write correct syntax in HTTP body to upload local file.
I couldn't get tREST to upload a file with the PUT http method. I'm pretty sure it's not possible. You should be able to do it with a custom java code though, that you can find in this article.

Generate multiple sheets in one pdf file

I am trying to generate a pdf from a Tableau workbook which has two sheets using the url method:
E.g: https://TableauServer/views/workbook/sheet1?:format=pdf&parameter=value
I am doing this in a program which will issue the url request to the url. The url works fine for one sheet. But the problem is how to generate one pdf file with both sheets in it?
If you first put your two sheets into a single dashboard and then use the URL for the published dashboard (still using the format=pdf parameter), this should work just fine.
We know it's possible because within the Tableau pages itself if you download a PDF it gives you several formatting options, including the option to put all the worksheets in a workbook into a single PDF.
I couldn't find any documentation on it though. What I ended up doing was looking at the network console in the browser (usually F12) when I downloaded the PDF from the browser by clicking the Download button. That showed me the URL end point and the JSON body the server expected in the request payload.
The endpoint URL wasn't too cryptic and ended with "commands/tabsrv/pdf-export-server". The challenge was to take the JSON in the request payload and find the right settings to get it into a single PDF.
This method is a more technical approach and requires very little coding skills; any language that has functions for http calls will work (I use python for it).
If you don't mind doing it outside a browser, tabcmd has lots of functionality to control PDF generation at the command line.

TeamCity: How to show Nunit3 file attachments in TeamCity test results?

NUnit3 recently added a functionality to add attachments to test results using TestContext.AddTestAttachment(). This adds a url\filelink of the file in results. I can see the entry in Test Result XML generated by console runner.
But I do not see the attachment link on Teamcity. How can I force teamcity to display the file links added as attachment.
To my knowledge, TeamCity haven't yet implemented any functionality to display test attachments.
You should make a feature request for that, here. You could add to your case by pointing out that VSTS does display these file attachments. ;-)