What test could be used to test the calculated balance of a few transactions

Id like to create a test in PM that would test if the calculation of a few transactions are correct, without me giving the expected amount
does this exist?

Hey @chanawertheimer, Welcome to the community :tada:

Can you please elaborate? What exactly you want to achieve :sweat_smile: ?

hi ok so lets say im Posting to the API a bunch of transactions for an account, at the end of the day i want to know the balance of that account, i dont want to manually add up each transaction. Postman can give me a balance associated with an account but i want a test that will prove the calculation is correct.

any ideas?

Ok, so the idea is to summarize the response of APIs, that you have sent at the end of the day.

You can use variables (global, environment or collection) to store the data dynamically in an array. On each API request, you can get the previous variable value and do some calculation and set the new updated value to the same variable.

This will keep your calculation updated on each API that as been sent. Also, you can use monitors to run the test as per your schedule.

Cheers :magic_wand: