Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify that the API response is in the expected format ( JSON)-bug #555

Open
CrisA24 opened this issue Feb 1, 2025 · 1 comment
Open
Assignees

Comments

@CrisA24
Copy link

CrisA24 commented 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_ :

Image

Image

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:
Image

@CrisA24 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
@ale23yfm ale23yfm self-assigned this Feb 1, 2025
@ale23yfm
Copy link
Contributor

ale23yfm commented Feb 1, 2025

please retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants