2017-10-08 1 views
0

웹에서 CSV 파일의 웹 서비스에 연결해야합니다.이 파일에는 사용자 이름과 비밀번호가 있습니다.CSV 파일에서 웹 서비스로 연결할 수 없습니다.

CSV 파일을 읽을 수는 있지만 연결할 수 없습니다.

임 스트레스 테스트를하고, 나는 여러 사용자가 개틀링를 사용하여 특정 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))) 




} 

누군가가 나를 도울 수 있습니까?

임 개틀링 새로운, 내가 손에 필요

..

인사말

답변

0

당신은 약

val httpConf = http 
.baseURL("url") 
.acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8") 
.acceptEncodingHeader("gzip, deflate") 
.acceptLanguageHeader("en-US,en;q=0.5") 
.userAgentHeader("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20100101 Firefox/16.0") 

scen = scenario("TEST") exec (IC6SaaS.ic) 

setUp(scen inject atOnceUsers(usersNumber)) protocols httpConf 
를 잊어 버렸습니다
관련 문제