We have discovered the following issues in the CTK postman scripts.
When we run the CTK, the test for value held on validFor always fails (as shown below).
AssertionError: Instance has only id, href and filtered attribute
Descriptiom : expected [ 'id', 'href', 'id' ] to be a superset of [ Array(12) ]
From looking at the postman scripts, we suspect that the reason is due to the following:
" pm.test('Instance must have id, href and filtered attribute', function () { pm.expect(Object.keys(instance)).to.include.members(requiredAttributes)});",
" pm.test('Instance has only id, href and filtered attribute', function () { pm.expect(requiredAttributes).to.include.members(Object.keys(instance))});",
" });",
Here, the second test case is expecting the response block contain only id, href and filtered attribute always which is invalid scenario
The solution is to keep the 1st test case (Instance must have id, href and filtered attribute) alone and remove the 2nd test case (Instance has only id, href and filtered attribute)
pm.test('Instance must have id, href and filtered attribute', function () { pm.expect(Object.keys(instance)).to.include.members(requiredAttributes)});"
------------------------------
Murugesan P
Tech Mahindra Limited
------------------------------