How to download excel (.xls) file from API in postman for suite run? - postman-collection-runner

For Single request,I can able to download the response output in excel format by chose an option 'Send and Download'. Can anyone help me to download the same using collection runner in postman.

This feature is not available in Postman Collection Runner yet! However, there is a workaround if you would like to do it in Newman.
As Newman is built on Node.js, you can extend it in a Node.js code as you can see in the below example.
https://github.com/postmanlabs/newman/issues/413#issuecomment-316116450
Running the script above essentially does the same thing as newman run ... and also saves the responses to files

Related

How to use newman command to run 1 postman collection with different folder?

Postman collection and it's folder arrangement
I want to run this ITEM-API postman collection in jenkins. I have exported it with github repo. I have also done configuration. But here when will I run test, it will give result for all ITEM-API collection. But inside ITEM-API collection, there are different folders of API, for eg. CHARTS, IAMGES, SYNDICATION, INTEREST, etc. SO how can use newman command to run test for particular api. Let's say, I want to run test for CHARTS api, then how can I use newman command for that in jenkins or groovy file in github repo.
please please help.

How to get Rest Api endpoints, name and url's, in the way Azure Functions do?

Sometimes you get over a feature that you just like. When creating a Azure Function project and debugs it, it writes out this nice info in the console.
Now that I am writing the frontend, I have found this information very useful.
Functions:
CoWorkers: [GET,POST] http://localhost:7071/api/CoWorkers
GetManager: [GET,POST] http://localhost:7071/api/GetManager
SetManager: [GET,POST] http://localhost:7071/api/SetManager
UserInfo: [GET,POST] http://localhost:7071/api/UserInfo
...
I would like to have this on every asp.net rest api project that I am coding.
Anyone knows how to get it?
EDIT: OpenApi/Swagger is providing this information as pawelek91 says and I should have mentioned that I want it in the console: "Just because I like that feature".
use HttpOption request or swagger (if you can install it on your backend)
For console access to your web API, try the new HttpRepl tool at:
https://learn.microsoft.com/en-us/aspnet/core/web-api/http-repl/
It's a dotnet CLI tool that is installed separately (install using dotnet tool install -g Microsoft.dotnet-httprepl from the CL). Then you can "browse" your API using this command line tool.
As noted in the docs, it requires .Net Core 2.1+.

JMeter: url encoded embedded resources

I'm setting up some tests with JMeter, and I've seen that it's throwing out an error where trying to download embedded resources inside a web page, that have a path like the following:
www.mydomain.com/resources?getItem={someID}
The problem is that the characters need to be URL-encoded, so the following URL should follow this pattern:
www.mydomain.com/resources?getItem=%7BsomeID%7D
Now, how could instruct JMeter to replace these characters, when found on URLs from embedded resources in the web page? I've been looking at BeanShell PreProcessors, but I'm not sure how's the best way to handle this scenario.
Thanks!
You are facing this bug:
https://bz.apache.org/bugzilla/show_bug.cgi?id=58137
Until bug is fixed, your option is to disable embedded download and use :
CSS/ JQuery Post Processor to extract URLs
Use ForEach Controller to iterate over urls
This will only simulate serial download not parallel one.
Update 15th july 2015:
Bug has been fixed yesterday night, you can give nightly build a try:
http://jmeter.apache.org/nightly.html
Read:
Installing JMeter runtime
Download the _bin and _lib files
Unpack the archives into the same directory structure
The other archives are not needed to run JMeter.
What about this built in Jmeter function?
http://jmeter.apache.org/usermanual/functions.html#__urlencode

Exporting fiddler session as .jmx for JMeter test plan

Has there any option(s) / work around to export fiddler trace files as .jmx files to be imported into JMeter?
Have a look at this:
http://www.perftesting.co.uk/creating-jmeter-test-plans-with-fiddler/2013/03/01/
Another option is to use HAR format (chrome or firefox+firebug+plugin) and use this:
https://blog.flood.io/convert-har-files-to-jmeter-test-plans/
Edit on 25 october 2020:
Since version 5.3 of JMeter, you can use menu Tools > Import from cURL which will allow you to import in JMeter a session exported as a set of cURL commands
See:
https://jmeter.apache.org/usermanual/curl.html#hints
Blazemeter have a free tool where you can convert exported HAR files from fiddler and save them as jmx files.
Worked very good for me.
I've created an extension which can transform HTTP request to any other text format as long as you can create a simple Mustache template for it. Recently I created a template to convert Fiddler Http request to JMeter project i.e. JMX file. It's a basic template but you can customize as per your needs.
https://github.com/hemantsharma-io/MockingBird#convert-a-get-http-request-to-jmx-ie-jmeter-for-perf-testing-in-fiddler

How to use exported script from Badboy in jmeter?

Recorded my case in Badboy and exported to jmeter which is saved in desktop. Now how to use this script in jmeter ?
Run JMETER_HOME/bin/jmeter.bat and use File> Open the JMX script recorded via Badboy.
It works!
Like joseK said, you just have to open it via your File/Open Menu in jmeter ...
Or you mean that you've opend it and its not working, in that case you might have some change to do in your exported jmeter test.
Here some problem I got using badboy :
on our apps, badboy seem to add get request that didn't work at all, We had to remove them manually in order to fix the problem.
And if you have a token or session id that you need to extract from your cookies or http response, it's doesn't take care of it for you so you got to figure out how to extract them with a reg-ex extrator and put in a variable that your test will use.
See this link - could be a compatibility problem, if you are running jmeter 2.4 (badboy exports do not work with 2.4 yet). You might have to download 2.3.4 in order to convert the badboy script into a version compatible with 2.4
http://www.pukkared.com/2011/06/using-badboy-to-build-jmeter-test-plans-over-an-ssl/

Resources