1. 程式人生 > >獲取test step傳送的request資訊

獲取test step傳送的request資訊

在當前test step的Script Assertion裡新增

// Get request url
def requestURL = messageExchange.getEndpoint()
// Get request body
def requestBody = messageExchange.getRequestContent()
// Get request headers
def requestHeaders = messageExchange.getRequestHeaders()