Banu
Banu

Reputation: 47

Gatling - print the POST request URI

I would like to print the URI and want to verify the POST URI request is formed correctly, Can you please advise how to verify the POST URI request if URI is substituted/formed correctly?

object BidSubmission extends HttpUtil {

  val orders_feeder = csv("data/Round-1.csv").circular

  def orderSubmission: ChainBuilder =
    pause(pauseBy(5) seconds)
      .repeat(1) {
        feed(orders_feeder)
          .exec(postToUri(s"${Constants.orderSubmission_URL}/#{$AuctionId}/base-orders/proxy-bid", "")
            .queryParam("employeeId", "#{empNo}")
            .body(StringBody(session => {
              println(session)
              println(session.attributes("empNo"))
              val empNo = session.attributes("empNo").asInstanceOf[String]
              val orderNo = session.attributes("orderNo").asInstanceOf[String]
              println(s"\n\n\n $orderNo \n\n\n")
              var slotNos = orderNo.replace("[", "").replace("]", "").split(" +")
              println(s"\n\n\n ${generatePayload(empNo, slotNos)} \n\n\n")
              generatePayload(empNo, slotNos)
              " "
            }))
          )
      }

Upvotes: 0

Views: 387

Answers (1)

Stéphane LANDELLE
Stéphane LANDELLE

Reputation: 6623

You have to tune the logback configuration file. Please have a look at the documentation: https://docs.gatling.io/reference/script/core/configuration/#logbackxml

Upvotes: -1

Related Questions