I am testing an API request. Making sure that the result I get is what is expected.
I have this test for my request:
pm.test("Body matches string SAISONALISĂE", function () {
pm.expect(pm.response.text()).to.include("SAISONALISĂE");
});
The key word âSAISONALISĂEâ is indeed in the response and is displayed properly (no encoding issue when I look it in the âBodyâ tab).
However, the âTest Resultsâ tab is saying that my test failed. Because the key word âSAISONALISĂEâ wasnât find in the response. Though, the response do contain the key word âSAISONALIS\u00c9Eâ
I tried to add Accept-Charset: UTF-8
to the header of my request, but it didnât change anything.
I also update postman so that I would have the newest version.
I tried looking through the settings to see if there was anything about character encoding but I came out empty handed.
I do realize I could just change my test to look for the key word âSAISONALIS\u00c9Eâ but I would much rather understand what is going on and fix it.
So, any idea why the âBodyâ tab donât have any issue with the encoding but tests asserting have one ?