0
votes

jmeter image Thread Name:SupplierAPI 1-1 Sample Start:2020-07-30 11:01:04 BST Load time:571 Connect Time:429 Latency:571 Size in bytes:518 Sent bytes:241 Headers size in bytes:179enter image description here Body size in bytes:339 Sample Count:1 Error Count:1 Data type ("text"|"bin"|""):text Response code:400 Response message:Bad Request

HTTPSampleResult fields: ContentType: text/html; charset=us-ascii DataEncoding: us-ascii

1

1 Answers

0
votes

As per HTTP Status Code 400 Bad Request description:

The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

The client should not repeat this request without modification.

It means that you're sending syntactically incorrect request so double check the request body, it must be valid JSON or XML

Also don't forget to add HTTP Header Manager and configure it to send relevant Content-Type header, in the majority of cases it's application/json for REST and text/xml or application/xml for SOAP. In the latter case you might also need to send SOAPAction header.

In genera it's not very possible to provide the comprehensive answer without seeing your API contract, full configuration of your HTTP Request sampler, Header Manager, request and response details.