Aram
January 14, 2015, 2:06pm
1
import io.gatling.core.Predef._
import io.gatling.http.Predef._
class Rutger extends Simulation {
val httpProtocol = http
.baseURL(“http://webpage ”)
.acceptHeader(“text/html,text/xml,application/xhtml+xml,application/xml;q=0.9,/ ;q=0.8”)
.acceptEncodingHeader(“gzip, deflate”)
.acceptLanguageHeader(“en-US,en;q=0.5”)
.connection(“keep-alive”)
val Test = scenario(“Rutger”)
.exec(http(“Call”)
.post("/")
.body(StringBody("<soapenv:Envelope xmlns:soapenv=“http://test.com ” xmlns:req=“http://test.comt ” xmlns:com=“http://test.com ” xmlns:ser=“http://test.com ”>
soapenv:Header/
soapenv:Body
req:GetVersionRequest
</req:GetVersionRequest>
</soapenv:Body>
</soapenv:Envelope>"))
.check(regex(“Envelope xmlns”))
.check(status.is(200)))
setUp(Test.inject(atOnceUsers(1))).protocols(httpProtocol)
}
Hello everybody,
this works perfectly, but how dow I integrate
val User = “WebServiceTest1”
val Password = “WebServiceTest1”
with basicAuth() ?
and how can you integrate an wsdl file in your scenario?
Tnx
how dow I integrate
val User = “WebServiceTest1”
val Password = “WebServiceTest1”
with basicAuth() ?
http://gatling.io/docs/2.1.3/http/http_protocol.html#authentication
and how can you integrate an wsdl file in your scenario?
Not supported. Use SoapUI for generating a body template (which you probably already do).
Aram
January 14, 2015, 2:23pm
3
We really do not want to use SOAPUI, because we like Gatling.
So is there a way to work around the wsdl aspect and integrate it as an:
bodyPart
ELfileBody
Or as an URL
Tnx Stephane
What I meant with SoapUI was just use it to reverse engineer the WSDL into a SOAP sample and paste it into a StringBody or a ELfileBody.
As of now, we don’t have our own WSDL reverse engineering tool. And that’s something that has to happen prior to running the simulation as you’ll want to edit it in order to add some EL placeholders.
Does this solution suites you? Or do you have something else in mind?
Hi Aram/Steph,
I am quite new to gatling and scala.
I have a WSDL and a request XML and generally use SOAP UI to get the response.
Now, I want to use gatling to call the same web service to scale its performance in case concurrent users are accessing the same…
I tried to use below program (from Aram) and, but getting compilation errors like this. Can you please help me in resolving these?
GATLING_HOME is set to “C:\Users\MyID\gatling-charts-highcharts-bundle-2.2.4”
JAVA = “java”
14:26:01.481 [ERROR] i.g.c.ZincCompiler$ - C:\Users\MyID\gatling-charts-highcharts-bundle-2.2.4\user-files\simulations\Sample_Gatling\getQuote.scala:22: unclosed string literal
14:26:01.483 [ERROR] i.g.c.ZincCompiler$ - </soapenv:Envelope>"))
14:26:01.483 [ERROR] i.g.c.ZincCompiler$ - ^
14:26:01.492 [ERROR] i.g.c.ZincCompiler$ - C:\Users\MyID\gatling-charts-highcharts-bundle-2.2.4\user-files\simulations\Sample_Gatling\getQuote.scala:17: identifier expected but $XMLSTART$< found.
14:26:01.492 [ERROR] i.g.c.ZincCompiler$ - soapenv:Header/
14:26:01.492 [ERROR] i.g.c.ZincCompiler$ - ^
14:26:01.492 [ERROR] i.g.c.ZincCompiler$ - C:\Users\MyID\gatling-charts-highcharts-bundle-2.2.4\user-files\simulations\Sample_Gatling\getExpectedAmount.scala:27: ‘)’ expected but ‘}’ found.
14:26:01.492 [ERROR] i.g.c.ZincCompiler$ - }
14:26:01.493 [ERROR] i.g.c.ZincCompiler$ - ^
14:26:01.496 [ERROR] i.g.c.ZincCompiler$ - three errors found
14:26:01.498 [ERROR] i.g.c.ZincCompiler$ - Compilation crashed
sbt.compiler.CompileFailed: null
Thanks
Praveen