(some) Tests fail in Newman, but not in Postman

When running my Postman collection, I receive 0 errors throughout the whole suite, but in Newman the tests in two requests fail.

No pre-request Scripts present in requests.
These are my PM tests + relevant body of the failed requests.:

testsuite = "T5 - FeederConfigurator - Unit - Calculate - "

var jsonData = JSON.parse(responseBody);

pm.test(testsuite + “Status code is 200”, function () {pm.response.to.have.status(200);});
pm.test(testsuite + “Succes (true)”, function() {pm.expect(jsonData.success).to.eql(true); });
pm.test(testsuite + “No Errors”, function() {pm.expect(jsonData.error).to.eql(null); });
pm.test(testsuite + “FishPerHa”, function() {pm.expect(jsonData.result.ufsrFishPerHa).to.eql(0)});
pm.test(testsuite + “FeederCountRecommended”, function() {pm.expect(jsonData.result.ufsrFeederCountRecommended).to.eql(1)});
pm.test(testsuite + “TimeRangeStart_1”, function() {pm.expect(jsonData.result.ufsrTimeRangeResults[0].utrStartTime).to.eql(‘00:00’)});

Relevant body
{
“result”: {
“ufsrTotalNumberOfFish”: 25000,
“ufsrSurvivalPercentage”: 100.0,
“ufsrFishPerHa”: 0,
“ufsrBiomass”: 1.25659535973556,
“ufsrBiomassPercentageFed”: 0.0045201895240963965,
“ufsrFeedAmount”: 5.68004918110482,
“ufsrFeederCount”: 11,
“ufsrFeederCountRecommended”: 1,
“ufsrFeederTimeGap”: 11,
“ufsrTimeRangeResults”: [
{
“utrTimeRangeNr”: 1,
“utrStartTime”: “00:00”,
“utrStopTime”: “00:00”,

testsuite = "T5 - FeederConfigurator - Unit - Calculate by Id - "

var jsonData = JSON.parse(responseBody);

pm.test(testsuite + “Status code is 200”, function () {pm.response.to.have.status(200);});
pm.test(testsuite + “Succes (true)”, function() {pm.expect(jsonData.success).to.eql(true); });
pm.test(testsuite + “No Errors”, function() {pm.expect(jsonData.error).to.eql(null); });
pm.test(testsuite + “FishPerHa”, function() {pm.expect(jsonData.result.ufsrFishPerHa).to.eql(0)});
pm.test(testsuite + “FeederCountRecommended”, function() {pm.expect(jsonData.result.ufsrFeederCountRecommended).to.eql(1)});
pm.test(testsuite + “TimeRangeStart_1”, function() {pm.expect(jsonData.result.ufsrTimeRangeResults[0].utrStartTime).to.eql(‘00:00’)});

Relevant body
{
“result”: {
“ufsrTotalNumberOfFish”: 25000,
“ufsrSurvivalPercentage”: 100.0,
“ufsrFishPerHa”: 0,
“ufsrBiomass”: 1.25659535973556,
“ufsrBiomassPercentageFed”: 0.0045201895240963965,
“ufsrFeedAmount”: 5.68004918110482,
“ufsrFeederCount”: 11,
“ufsrFeederCountRecommended”: 1,
“ufsrFeederTimeGap”: 11,
“ufsrTimeRangeResults”: [
{
“utrTimeRangeNr”: 1,
“utrStartTime”: “00:00”,
“utrStopTime”: “00:00”,

When running it via Newman, I get the following errors:

  1. AssertionError T5 - FeederConfigurator - Unit - Calculate - Succes (true)
    expected false to deeply equal true
    at assertion:1 in test-script
    inside “T5 - FeederConfigurator / Unit / Unit/Calculate”

  2. AssertionError T5 - FeederConfigurator - Unit - Calculate - No Errors
    expected { Object (code, message, …) } to deeply equal null
    at assertion:2 in test-script
    inside “T5 - FeederConfigurator / Unit / Unit/Calculate”

  3. TypeError T5 - FeederConfigurator - Unit - Calculate - FishPerHa
    Cannot read properties of null (reading ‘ufsrFishPerHa’)
    at assertion:3 in test-script
    inside “T5 - FeederConfigurator / Unit / Unit/Calculate”

  4. TypeError T5 - FeederConfigurator - Unit - Calculate - FeederCountRecommended
    Cannot read properties of null (reading ‘ufsrFeederCountRecommended’)
    at assertion:4 in test-script
    inside “T5 - FeederConfigurator / Unit / Unit/Calculate”

  5. TypeError T5 - FeederConfigurator - Unit - Calculate - TimeRangeStart_1
    Cannot read properties of null (reading ‘ufsrTimeRangeResults’)
    at assertion:5 in test-script
    inside “T5 - FeederConfigurator / Unit / Unit/Calculate”

  6. AssertionError T5 - FeederConfigurator - Unit - Calculate by Id - Succes (true)
    expected false to deeply equal true
    at assertion:1 in test-script
    inside “T5 - FeederConfigurator / Unit / Unit/Id/Calculate”

  7. AssertionError T5 - FeederConfigurator - Unit - Calculate by Id - No Errors
    expected { Object (code, message, …) } to deeply equal null
    at assertion:2 in test-script
    inside “T5 - FeederConfigurator / Unit / Unit/Id/Calculate”

  8. TypeError T5 - FeederConfigurator - Unit - Calculate by Id - FishPerHa
    Cannot read properties of null (reading ‘ufsrFishPerHa’)
    at assertion:3 in test-script
    inside “T5 - FeederConfigurator / Unit / Unit/Id/Calculate”

  9. TypeError T5 - FeederConfigurator - Unit - Calculate by Id - FeederCountRecommended
    Cannot read properties of null (reading ‘ufsrFeederCountRecommended’)
    at assertion:4 in test-script
    inside “T5 - FeederConfigurator / Unit / Unit/Id/Calculate”

  10. TypeError T5 - FeederConfigurator - Unit - Calculate by Id - TimeRangeStart_1
    Cannot read properties of null (reading ‘ufsrTimeRangeResults’)
    at assertion:5 in test-script
    inside “T5 - FeederConfigurator / Unit / Unit/Id/Calculate”

Hi @franknutreco

It’s quite tough to visualise this with so much text. Could you provide a couple of screenshots of your response body (in Postman) and a screenshot of the output from Newman?

Thank you for taking the time to reply.
I have found the problem, and I genuinely hope someone reads this before spending as much time on a fix as I did, because it was staring me in the face this entire time.

You know when you share your environment, you have your initial and current values? Yeaah… Newman logically uses the initial values to run his tests.

I do have a follow-up question though, which might be out of scope since it’s regarding Newman through Azure.
I cannot place why I get the following error message when completing the testcycle. All tests have passed in Newman (hooray!).

Never seen that before.

Maybe it’s something like this?? …