How to get newman results in Email body - postman-newman

I am executing Postman collection using newman and for sending a mail using the VBScript file. I have configured newman and vbs file as a job in Jenkins. Is it possible to get the either the newman results or Jenkin console results in Email body?
Results with Testcase name with Pass or Fail

Related

How to send a GET request with JSON body in JMeter?

I am facing some issues as JMeter doesn't take the JSON body passed as a parameter. I tried through postman and it was working fine but for Jmeter it is not working
I am expecting a response from get request with JSON body in Jmeter
We're not telepathic enough in order to suggest you how you can fix your "some issues" without knowing the details of the "issues"
JMeter can send the GET request with the JSON (or any other) body
If the request works in Postman and doesn't in JMeter most probably you're not sending the same requests, the most common mistake is that people forget to add a HTTP Header Manager configured to send correct Content-Type header.
Just use a 3rd-party sniffer tool to intercept requests originating from JMeter or Postman, identify the difference(s) and amend your JMeter configuration so the requests would be exactly the same. Alternatively just record the request from Postman using JMeter's HTTP(S) Test Script Recorder

Jmeter - when there are number of threads are running, the variable from JSON extractor is not working sometimes

I am now using Jmeter to run the test of APIs.
The situation is that I have a login Api which will return a token inside response. I use a JSON extractor to save the token as a variable. Then, I use the ${token} is the header of other requests.
However, I found that when I was trying to run 40-50 threads, the ${token} in some threads would be empty, and caused a high error rate.
Therefore, may I ask is there any method to solve it and why?
Thanks very much.
Try saving full response from the Login API, most probably your server gets overloaded and cannot return the token and returning some error message instead.
There are following options:
If you're running JMeter in command-line non-GUI mode you can amend JMeter's Results File Configuration to store the results in XML form and include the response data, add the next lines to user.properties file:
jmeter.save.saveservice.output_format=xml
jmeter.save.saveservice.response_data=true
and when you run your test next time the .jtl results file will contain response bodies for all the requests.
Another option is using a Listener like Simple Data Writer configured like:
and when you run the test the responses.xml file will contain the response data
Both .jtl results file and responses.xml can be inspected using View Results Tree listener
More information: How to Save Response Data in JMeter

Gitlab CI Webhook - How to see JSON Payload

I am sending a JSON payload to my Gitlab CI Pipeline, via the Gitlab Webhook, as the Trigger.
The trigger works, however I need to be able to parse the JSON sent via the Web hook, as it contains the values, for my script's variables.
Question:
Is there a way, I can use the '.gitlab-ci.yml' file, and pull out the content sent, via the Web hook's POST?
Is it possible for a Gitlab Webhook to use a variable that contains the JSON payload, and pass the variable and its content, into the '.gitlab-ci.yml' file?
I am open to any solution.
The end goal would be to parse the JSON sent in the Web Hook POST, with my Powershell scripts, and pass the parsed JSON values to my Variables, as their inputs.
Thank you
Similar questions have been asked, with no updated answer
Read webhook payload in Gitlab CI
You can use the gitlab-ci pipeline variables to pass the values to your '.gitlab-ci.yml' file. You can check here for more info: https://docs.gitlab.com/ee/ci/triggers/#making-use-of-trigger-variables
I guess for the json format, you should enter something similar to the body part of the request:
Content-type: application/json
{
"variables[var1]":"value1"
}

How to save API request response in Postman to a JSON file when running a collection

I have set up a collection that executes an API request which its payload is a JSON file.
I would like to run this postman collection for several times using different values for a variable that I have set in my request. However, I don't know how to save the API response from my Get request into a JSON file.
I have done the similar procedure as well for the automation test. Here were some steps I took:
Write a script to execute the postman collection test through postman command line interface modules (https://github.com/postmanlabs/newman), where you can store all the command into a string array with different environment variables you want to specify.
[new man collection -e env_var.json --reporters cli,json --reporter-json-export output.json, new man second run, ... ]
For each execution, you can get the response body by nodejs module and dump the result to json format. (similar to: output responseBody somewhere with newman script from postman collection)
Or you can generate the JSON from newman reporter, and parse the JSON to get the informantion you want.
Hope it helps!

How to implement notification mail in Jmeter?

How to configure the notification email in Jmeter script?, My Ideas is to implement the notification once test was start and end of the test.
In End of the test Aggregate report will send along with Notification mail, any one have idea about this?
Please check this screen shot which i configure is correct or it need any modification
Smtp sampler was executed but the i cannot get any email notification.please suggest me any modification is need.
JMeter provides SMTP Sampler which you can use for sending the email notifications.
With regards to sending the report - I would suggest using tearDown Thread Group with 1 user and 1 loop for this. tearDown Thread Group will be executed after all other Thread Groups. Also make sure you have the following line added to user.properties file
jmeter.save.saveservice.autoflush=true
JMeter doesn't store all the results in the real time, it flushes them into .jtl results file periodically in chunks so above setting will allow you to ensure that the results file is complete.
See Load Testing Your Email Server: How to Send and Receive E-mails with JMeter article for more information on configuring JMeter for sending emails.