I am working on SonarQube integration with our project management application. For that, I have to use SonarQube web hooks to trigger application.
I already set the hook and everything but after every build Sonar is sending empty JSON in POST body.
How to configure data and everything to get a proper response from hook.
As discussed the JSON payload is correctly sent in the POST HTTP request.
Related
I am currently trying to build a go API using gin for a web and mobile application. I am new to the world of WebSockets and Go so I was wondering how I would go about triggering a GET request from the client after a relevant POST request was made ie: the POST request contained the user's ID so the clients who require information regarding that user are properly updated. Currently, I have the POST and GET requests which do what I need them, but I'm a little lost about how to make the entire flow realtime using WebSockets.
I believe this example of server-sent-events should address the question. Once a POST handler has been called, send a flag to the GET endpoint via a channel and then send an event through there.
SonarQube supports webhooks which makes configured API call to an external server after analysis of a project. It also allows custom values to be added in the payload with the pattern sonar.analysis.*.
Is it possible to add custom headers(For example Authentication header) in the API request made to the external server.
For the time being it's not possible.
Next version of SonarQube may be able to send authentication headers to the external server : https://jira.sonarsource.com/browse/SONAR-9919
My bad, the issue referenced is just for extracting the credentials from the URL.
I tried to run a POST method for API testing in JMeter, I have sent the parameters as needed, but still it shows cannot post.
What should I do to make it work?
user add post request
response message
If you are testing an API my expectation is that you need to send either JSON or XML payload using "Body Data" tab of the HTTP Request sampler.
You will also need HTTP Header Manager to send the relevant Content-Type header
References:
Building a SOAP WebService Test Plan
REST API Testing - How to Do it Right
Another way of building a web service test plan is executing the request(s) according to your test scenario using a 3rd-party tool like Postman or SoapUI and recording them via JMeter's HTTP(S) Test Script Recorder.
In the post request, you need to provide server name or IP address and port number respectively. If it still doesn't work, try changing the path by adding /api then /user/data. it works in some cases.
Hope this works out!
In case of POST method I am not getting any response under Response Data section, while I did not receive any error in my test plan.
This happens only for Post and Get method and for rest of the others it is working.
Given your Test Plan name is "My First API Test Plan" my expectation is that you need to pass data a little bit differently.
Upgrade JMeter to latest version which is 2.13. It has new functionality, performance improvements, bug fixes, etc.
Remove everything from "Parameters"
Switch to "Body Data" tab
Insert your JSON payload there
Make sure that your HTTP Header Manager is configured to send Content-Type header with the value of application/json
More details and tips in Testing SOAP/REST Web Services Using JMeter guide.
I try to test a web-service using SOAPUI using a HTTPS endpoint. The problem is that the response message is displayed encrypted. What do I need to configure in SOAPUI in order to see the actual response message?
I tried various settings (e.g. in preferences I tried to set an exported certificate from Firefox), but no luck so far. Note that the security of the web-service is implemented using a username/password mechanism in the SOAP header and the same call works fine on a HTTP endpoint (we have a couple of environments available).
Just had this same problem and found the solution here:
http://www.eviware.com/forum/viewtopic.php?f=5&t=2601&p=10862&hilit=encrypted+response+https#p10862
Basically you need to go into file->preferences->http settings and uncheck the 'Response compression' checkbox.