im creating a payment with api post request then sending a select query validating response. But Payment details from the select query is coming empty, even though payment details are in created in DB. im still able to get the payment details with select query in karate but executing separately, not when combined.
Option that is printing empty payment details:
- def createPaymentFeature = call read(createPaymentFeature.feature)
- def confNum = createPaymentFeature.paymentNum
- def itemDetails = db.readRows("Select * from PMT where pmntId = 'confNum'") //confNum coming from api response And print 'itemDetails----', itemDetails. //=== item details(json file) are in DB but in this query printing empty String.
Option that is printing all/correct payment details for the same confNum that was created with above api post request:
- def confNum = '476tyut767g7'
- def itemDetails = db.readRows("Select * from PMT where pmntId = 'confNum'") And print 'itemDetails----', itemDetails. //== printing all details . But this is a hard coded way, i need to pass dynamic value