UNPKG

@apica-io/url-xi

Version:

URL Check for integrations and API monitoring

19 lines (9 loc) 384 B
var userName = uxs.getVar('userName') uxs.expect(userName,"Variable userName is not defined").not.to.be.undefined var jsonData = responseData; var row = jsonData.find( user => user.username===userName ) uxs.expect(row,`Row with user name ${userName} must be found`).not.to.be.undefined; uxs.setVar('userId', row.id) logger.info(`User Id for username ${userName} found`)