Hi.
Just a simple question if variables saved using pm.environment.set(“name”, path) will eventually keep their data type?
Given I have saved an environment variable which was a number, let’s say 35.
And in a different endpoint, I want to assert the correct value is returned.
The below will fail as the postman variable is now a string.
pm.test('Summary.Count = ' + environment.reviewCount, function() {
pm.expect(summary[0].count).to.equal(environment.reviewCount);
});
The above will fail, but the below will pass:
pm.test('Summary.Count = ' + environment.reviewCount, function() {
pm.expect(summary[0].count).to.equal(parseInt(environment.reviewCount));
});
I’m just wondering if there’s plans, when using the new pm method, to keep the data types instead of conveting everything to strings?