Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. # IT:AD:Postman:HowTo:Write Test Scripts # * [[../|(UP)]] {{indexmenu>.#2|nsort tsort}} Example: <sxh javascript> var data = JSON.parse(responseBody); if (data.token) { tests["Body has token"] = true; postman.setEnvironmentVariable("user_id", data.user_id); postman.setEnvironmentVariable("token", data.token); } else { tests["Body has token"] = false; } </sxh> ## Resources ## * http://www.getpostman.com/docs/jetpacks_examples /home/skysigal/public_html/data/pages/it/ad/postman/howto/write_tests_scripts.txt Last modified: 2023/11/04 23:01by 127.0.0.1