Thanks! That is working. But I’m now using another request and that one is not working. How to print the request that is being sent to the gateway.
This is my logback.xml:
You'll have to either wait for 1.4.0 (hopefully next week), or use the
latest SNAPSHOT ( https://github.com/excilys/gatling/wiki/Continuous-Integration).
Beware that you'll have to migrate your Simulation: basically, you no
longer need to put things in an apply method, but you have to use setUp()
in order to register your scenarios. You also have to remove ".configure"
when configuring a scenario.
You can also use a tool such as Charles proxy so see what happens on the
wire.
If you noticed closely, I have assigned a soap request to the variable called "SAMLAuthenticationSoapRequest ", the soap request I assigned got some place holders namely ${username} and ${password},
I could able to fill this place holders if I use .fileBody() construct with request body located in a seperated template file, but If I want to use .body() construct, how can I fill this place holders that is my basic question… I have tried .param() but it is just a post parameter it is not get replaced in soap request
okay I understand, but to use session I have to use scenario, but all I want to have is just a replaceable http actions which I can mix and match with different combination at the end, in many scenarios, in that case I would like to have a http action with body which can have some place holders in it to make it generic enough…
So my question here is why can’t we allow to pass a parameter map to .body() construct which is similar to filebody() ?
Because if what you’re trying to achieve is static, ie non user specific, you don’t need an expression that will be resolved against dynamic user Session data.
yes… that is what I am trying… and it is working nicely… let me give you brief Idea of what I am trying to achieve… I am having some couple of soap requests, the user can perform some action by selecting some of these soap request combine them in an particular sequence of order. but soap request are more specific but with some replaceable part in it which we can make it as generic template…
csv file content is :
starttime,endtime,sbc
2014-09-16T09:10:00.000+00:00,2014-09-16T09:20:00.000+00:00,msx89
2014-09-16T09:20:00.000+00:00,2014-09-16T09:30:00.000+00:00,msx90
2014-09-16T09:30:00.000+00:00,2014-09-16T09:40:00.000+00:00,msx91
2014-09-16T09:40:00.000+00:00,2014-09-16T09:50:00.000+00:00,msx92
when i run the simulator it exit with error message
5:40:49.706 [ERROR] i.g.h.a.HttpRequestAction - No attribute named ‘productIdFound’ is defined
15:40:49.714 [ERROR] i.g.h.a.HttpRequestAction - No attribute named ‘productIdFound’ is defined
15:40:49.715 [ERROR] i.g.h.a.HttpRequestAction - No attribute named ‘productIdFound’ is defined
Exception in thread “main” java.lang.UnsupportedOperationException: There were no requests sent during the simulation, reports won’t be generated
at io.gatling.charts.report.ReportsGenerator$.generateFor(ReportsGenerator.scala:41)
at io.gatling.app.Gatling.generateReports$1(Gatling.scala:156)
at io.gatling.app.Gatling.start(Gatling.scala:209)
at io.gatling.app.Gatling$.fromMap(Gatling.scala:58)
at io.gatling.app.Gatling$.runGatling(Gatling.scala:79)
at io.gatling.app.Gatling$.main(Gatling.scala:53)
at io.gatling.app.Gatling.main(Gatling.scala)
can you please let me know what is the problem in my code.
You commented the feed line, so attributes are not populated and Gatling can’t resolve your expressions such as ${starttime}, so it can’t send the requests.