0
我必須使用CSV文件連接到Web上的Web服務,在此文件中我有用戶名和密碼。我無法與CSV文件中的Web服務結合
我可以讀取csv文件,但無法連接。
Im做壓力測試,我需要模擬出多個用戶使用做加特林一定action.Im,我的代碼:
val csvFeeder = csv("Users.csv").circular // use a comma separator
val headers_12 = Map(
"Content-length" -> "1135",
"Content-type" -> "text/xml; charset=utf-8",
"SOAPAction" -> """""""")
val uri1 = "http://urldestine/b000000001/"
print("*******")
print("*******")
print(csvFeeder)
object IC6SaaS {
val ic = feed(csvFeeder)
.exec(http("request_12")
.post("/b0101011010/webserviceexample")
.headers(headers_12)
//.body(RawFileBody("SearchAccountNumberxxx_0012_request.txt"))
.body(StringBody("""{
<SOAP-ENV:Envelope xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.blabla.org/2001/XMLSchema"
xmlns:xsi="http://www.blabla.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<tns:methodwebservice xmlns:tns="http://webserviceexample.com/">
<login>${Username}</login>
<password>${pass}</password>
<program>1</program>
</tns:methodwebservice>
}"""))
check(regex("""errors""").count.is(0)))
}
有人能幫助我嗎?
進出口新的加特林,我需要一隻手..
問候