class RecordedSimulationLIB extends Simulation {
var URL:java.lang.String = “http://10.1.0.178:8080”
var queryParam:java.lang.String = “Unix”
var allmap = new scala.collection.immutable.HashMap
var testId:java.lang.String = new java.lang.String
val httpProtocol = http
.baseURL(URL)
.disableFollowRedirect
.acceptHeader("/")
.acceptEncodingHeader(“gzip, deflate”)
.acceptLanguageHeader(“zh-CN”)
.userAgentHeader(“Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2; .NET4.0C; .NET4.0E)”)
…
…
…
.exec(session => {
queryParam = “aaa”
session
})
.exec(session => {
println("—before----: "+queryParam) // prinlinout: —before----: aaa
session
})
.exec(http(“request_30”)
.post("""/library/bfapp?sid=LibraryMgr""")
.headers(headers_24)
.body(StringBody(s""“burlap:callgetClobBookByName”""+queryParam+""“1</burlap:call>”""))
.check(headerRegex(“cookies”,“Cookie=(.*); path=/”).saveAs(“string_data”))
)
logout the request detail is :