You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description : Verify that the API response is in the expected format ( JSON).
Expected results: The API response format should be in a JSON format as the headers below from Swagger http://peviitorqa.go.ro/swagger-ui/#/General/get_total_ :
Actual results: The API response format is Text/HTML. Test failed in Postman :
pm.test("Verify response is JSON", function () {
pm.response.to.have.header("Content-Type", /application/json/);
});
FAIL : Response Content-Type is application/json | AssertionError: expected 'text/html; charset=UTF-8' to include 'application/json'
The text was updated successfully, but these errors were encountered:
CrisA24
changed the title
Verify that the API response is in the expected format ( JSON).
Verify that the API response is in the expected format ( JSON)-bug
Feb 1, 2025
Description : Verify that the API response is in the expected format ( JSON).
Expected results: The API response format should be in a JSON format as the headers below from Swagger http://peviitorqa.go.ro/swagger-ui/#/General/get_total_ :
Actual results: The API response format is Text/HTML. Test failed in Postman :
pm.test("Verify response is JSON", function () {
pm.response.to.have.header("Content-Type", /application/json/);
});
FAIL : Response Content-Type is application/json | AssertionError: expected 'text/html; charset=UTF-8' to include 'application/json'
Test in CMD : curl -v -X GET "http://peviitorqa.go.ro/api/v0/companies/?count=false" -H "accept: application/json"
Result:
The text was updated successfully, but these errors were encountered: