Open Gatling.bat and remove “-XX:+OptimizeStringConcat”. Now it works…
I can see following debug and info messages in simulation.log file. any idea?
09:57:57.437 [DEBUG] c.n.h.c.AsyncCompletionHandlerBase - Connection timed out: no further information: goo.gl/173.194.41.142:80 to http://goo.gl/Je5mJ
java.net.ConnectException: Connection timed out: no further information: goo.gl/173.194.41.142:80
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_51]
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) ~[na:1.7.0_51]
at org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:150) [netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105) [netty-3.6.5.Final.jar:na]
Wrapped by: java.net.ConnectException: Connection timed out: no further information: goo.gl/173.194.41.142:80 to http://goo.gl/Je5mJ
at com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:103) ~[async-http-client-1.7.13.jar:na]
at org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:427) [netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.DefaultChannelFuture.notifyListeners(DefaultChannelFuture.java:418) [netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.DefaultChannelFuture.setFailure(DefaultChannelFuture.java:380) [netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:109) [netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79) [netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) [netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42) [netty-3.6.5.Final.jar:na]
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [netty-3.6.5.Final.jar:na]
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) [netty-3.6.5.Final.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.7.0_51]
at java.lang.Thread.run(Unknown Source) [na:1.7.0_51]
09:57:57.447 [DEBUG] c.n.h.c.p.n.NettyAsyncHttpProvider - Unexpected I/O exception on channel [id: 0x30cc2bb1]
java.net.ConnectException: Connection timed out: no further information: goo.gl/173.194.41.142:80
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_51]
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) ~[na:1.7.0_51]
at org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:150) ~[netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105) ~[netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79) ~[netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) ~[netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42) ~[netty-3.6.5.Final.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.7.0_51]
at java.lang.Thread.run(Unknown Source) [na:1.7.0_51]
09:57:57.448 [DEBUG] c.n.h.c.p.n.NettyAsyncHttpProvider - Closing Channel [id: 0x30cc2bb1]
09:57:57.455 [INFO ] i.g.h.c.HttpProtocolConfigurationBuilder - Couldn’t execute warm up request http://goo.gl/Je5mJ
java.net.ConnectException: Connection timed out: no further information: goo.gl/173.194.41.142:80
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_51]
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) ~[na:1.7.0_51]
at org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:150) ~[netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105) ~[netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79) ~[netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) ~[netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42) ~[netty-3.6.5.Final.jar:na]
Wrapped by: java.net.ConnectException: Connection timed out: no further information: goo.gl/173.194.41.142:80 to http://goo.gl/Je5mJ
at com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:103) ~[async-http-client-1.7.13.jar:na]
Wrapped by: java.util.concurrent.ExecutionException: java.net.ConnectException: Connection timed out: no further information: goo.gl/173.194.41.142:80 to http://goo.gl/Je5mJ
at com.ning.http.client.providers.netty.NettyResponseFuture.abort(NettyResponseFuture.java:327) ~[async-http-client-1.7.13.jar:na]
at com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:107) ~[async-http-client-1.7.13.jar:na]
at org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:427) ~[netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.DefaultChannelFuture.notifyListeners(DefaultChannelFuture.java:418) ~[netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.DefaultChannelFuture.setFailure(DefaultChannelFuture.java:380) ~[netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:109) ~[netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79) ~[netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) ~[netty-3.6.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42) ~[netty-3.6.5.Final.jar:na]
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[netty-3.6.5.Final.jar:na]
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[netty-3.6.5.Final.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:1.7.0_51]
at java.lang.Thread.run(Unknown Source) ~[na:1.7.0_51]
My 2 cents: either you don’t have an internet connection, or you’re behind a proxy, so you can’t access the internet directly.
If so, read the doc: https://github.com/excilys/gatling/wiki/HTTP#wiki-proxy
Yes I am behind the proxy. how do i print dynamic parameter value on console output?
WDYM?
sorry steph i don’t understand this. what is WDYM?
WDYM = What Do you Mean
I am capturing value dynamically for field ID as follows
check(regex("""&id=(.*?)">""").saveAs(“ID”)))
now I want to print this value on console output so that I can verify it manually first?
OK Thanks.
i have defined following function in my gatling file
def selectRandomElementFromList(list: List[String]) : String = {
val rand = new Random(System.currentTimeMillis());
val random_index = rand.nextInt(list.length);
val result = list(random_index);
return result
}
now i want to use this function so that i can select a random value for following regex
check(regex(""“categoryId=(.*?)”><""").findAll.transform(selectRandomElementFromList).saveAs(“categoryId”))
however this particular step is failing with error “type mismatch; found:String Required: Option[?]”
Can you advise what wrong i am doing here ?
You’ve switch from Gatling 1 to Gatling 2, right?
First, findAll returns a Seq, not a List, so it’s:
def selectRandomElementFromList(list: Seq[String]) instead of List
Then, in Gatling 2, transform signature is not Option => Option, so
transform(_.map(selectRandomElementFromList))
Hurrey my problem is solved. I am using gatling 2 only and not switched from 1 to 2. really interested tool and I am really loving it. Only I found initially people may struggle little if they are not familiar with scala.
Secondly I need to focus and achieve little bit if I can integrate it with graphite and if I can monitor server specific resources etc??
I will raise more question in next few days time until i get 100 % confidence so please don’t mind and don’t be upset if I ask silly questions?
No pro, go ahead!
I would like a define a work load modal as follows
-
Rampup 50 user in 60 seconds
-
when all 50 users are up and running then run the whole scenario for 30 minutes
-
ramp down all 50 users in 60 seconds
I have defined my scenario as follows
setUp(jpetstorescn.inject(ramp(50 users) over (5 seconds)).protocolConfig(httpConf))
But in this scenario all 50 users are running only 1 iteration and then ramped down all. how I can define scenario as per my requirement above?
Wrap you scenario content in a during loop.
how to use feeder in gatling 2. don’t know but i am getting error when using feed(feeder) after .headers(headers_3) request ?
val feeder = csv(“MTUserData.csv”).circular
val login = exec(http(“TX02_TourLogin”)
.post("/servlets/com.tours.servlet.SignonServlet")
.headers(headers_3)
.feed(feeder)
.queryParam(""“procSub”"", “”“1"”")
.param(""“userName”"", “${UserName}”)
.param(""“password”"", “${UserPwd}”)
.param(""“login.x”"", “”“32"”")
.param(""“login.y”"", “”“11"”"))
.pause(47 milliseconds)
any idea?
This doesn’t work in Gatling 1 either.
feed doesn’t belong to request, it’s a structure DSL element, just like exec:
val login = feed(feeder)
.exec(http(“TX02_TourLogin”)
.post("/servlets/com.tours.servlet.SignonServlet")
.headers(headers_3)
.queryParam(""“procSub”"", “”“1"”")
.param(""“userName”"", “${UserName}”)
.param(""“password”"", “${UserPwd}”)
.param(""“login.x”"", “”“32"”")
.param(""“login.y”"", “”“11"”"))
.pause(47 milliseconds)
Hi Steph,
When login into my application then I am getting currently a window popup with message that my application is blocked by security but the work around is that if i click on OK button on this popup window then i can continue my business process. how I can achieve this via gatling?
See attached screenshot
BlockerScreenshot.docx (257 KB)
Gatling works at the HTTP level … so, is there any HTTP request fired after clicking “yes” ?
yes after clicking on “OK” button on windows security popup i have completed my business process successfully and recorded all http traffic. but during replay it’s failing in window popup step i guess?