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)))
}
有人能帮助我吗?
进出口新的加特林,我需要一只手..
问候