Gatling 2.1.0 is out!

Hi there,

3 months after releasing 2.0.0, the Gatling Team is very proud to announce that we’ve just released 2.1.0.

New Features:

  • Assertions are now displayed in the reports: 1057
  • forAll let you define an assertion to be applied on all requests: 1618
  • You can now use a Certificate Authority (either Gatling’s or you own) with the Recorder, so you’re no longer asked for Security Exceptions: 1894
  • You can now use EL template files for checking a response body with “bodyString”: 2072. Kudos to Brice Jaglin for contributing!
  • You can configure enabled SSL protocols and cipher suites: 2323
  • You can use a new “substring” check to detect the presence of a string inside a response body. This is more efficient than performing a regex: 2352
  • New “jsonStringify()” EL function that serialize a Session attribute into a JSON string: 2360
  • More percentiles: 2394
  • Using throttling now induces a maxDuration: 2415
  • New Normal pause distribution: 2438

Please have a look at the milestone content for more details.

Migration:

Gatling now targets Scala 2.11.
This migration was only possible because we had some major refactoring on the launcher modules: app, maven archetype, maven and sbt plugins.
So please upgrade both your Scala version AND your build tool plugin.

The new EL template body check feature also caused us to rename the request-bodies directory.

Please read the migration guide for more details.

Cheers,
Stéphane

Oops, I forgot to mention that we now support Server-Sent Events, originally contributed by Cédric Tran-Xuan!
http://gatling.io/docs/2.1.0/http/sse.html

Enjoy!

Stéphane

Stephane,

I am having some issue with IDEPathHelper. I can not find File class in IDEPathHelper.

`

import java.nio.file.Path
import io.gatling.core.util.PathHelper._

val projectRootDir = File(gatlingConfUrl).ancestor(3)// Error on File

`

Am I missing an import?

My bad, made an error in the migration guide…
Will fix.

IDEPathHelper should look like this : https://github.com/gatling/gatling-maven/blob/master/gatling-highcharts-maven-archetype/src/main/scala/IDEPathHelper.scala

No Problem.

I think there couple of minor issues as well. Can you verify

IDEPathHelper

  1. Changed to bodiesDirectory from requestBodies…

Recorder

1) props.bodiesFolder from props.requestBodiesFolder

Engine
1) props.bodiesDirectory from props.requestBodiesDirectory.

Also, intellij is complaining about RecorderController(props.build, Some(IDEPathHelper.recorderConfigFile))
as type mismatch, expecting Option: Path instead of Some:File.

Nevermind. I just looked at git hub page.

But Recoder.scala is still complaining on GatlingRecorder.fromMap(props.build, Some(IDEPathHelper.recorderConfigFile))


Nevermind, just removed .toFile from IDEPathHelper variable. Sorry about creating unnecessary posts.

No problem, glad you made it working :slight_smile:

Sorry, spoke too soon.

There is one more issue. While running engine/recorder from windows machine, looks like java.nio.Path does not like colon ":’ in “C:…”

I get the following error
java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/GognaAb/dev/GatlingTest/target/test-classes/gatling.conf

Can you replace “getFile” by “toURI” on the 'val gatlingConfUrl …’ line and tell me if that fixes it ?

There is no “getFile” to gatlingConfigUrl in IDEPathHelper.

Also, it looks like for some reason we have a extra “/” in

getClass.getClassLoader.getResource("gatling.conf").getPath

I hard coded gatling.conf to test if everything else worked and it did.

`

val gatlingConfUrl: Path = """C:/Users/GognaAb/dev/GatlingTest/target/test-classes/gatling.conf"""

`

Not the best solution but until we fix it.

Sorry, I posted too fast. I meant “getPath”.
So that :

val gatlingConfUrl: Path = getClass.getClassLoader.getResource(“gatling.conf”).getPath

becomes:

val gatlingConfUrl: Path = getClass.getClassLoader.getResource(“gatling.conf”).toURI

I’ve updated the migration guide.
Instead of listing all the changes, the best solution is either to generate a new project, or directly replace and fix the 3 classes.

Cheers,

Stéphane

That did it (toUri). Thank you guys for your awesome support!

Ok. Please dont hate me but I can’t get any of my simulations running with 2.1.0. I get the following error

Exception in thread "main" java.util.concurrent.ExecutionException: java.net.ConnectException: connection timed out: ssl.google-analytics.com/74.125.228.222:443 at com.ning.http.client.providers.netty.future.NettyResponseFuture.abort(NettyResponseFuture.java:228) at com.ning.http.client.providers.netty.request.NettyConnectListener.onFutureFailure(NettyConnectListener.java:151) at com.ning.http.client.providers.netty.request.NettyConnectListener.operationComplete(NettyConnectListener.java:159) at org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:431) at org.jboss.netty.channel.DefaultChannelFuture.notifyListeners(DefaultChannelFuture.java:422) at org.jboss.netty.channel.DefaultChannelFuture.setFailure(DefaultChannelFuture.java:384) at org.jboss.netty.channel.socket.nio.NioClientBoss.processConnectTimeout(NioClientBoss.java:142) at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:83) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337) at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42) at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.net.ConnectException: connection timed out: ssl.google-analytics.com/74.125.228.222:443 at com.ning.http.client.providers.netty.request.NettyConnectListener.onFutureFailure(NettyConnectListener.java:147) ... 13 more Caused by: org.jboss.netty.channel.ConnectTimeoutException: connection timed out: ssl.google-analytics.com/74.125.228.222:443 at org.jboss.netty.channel.socket.nio.NioClientBoss.processConnectTimeout(NioClientBoss.java:139) ... 8 more

Can you try after uncommenting “enableGA” in gatling.conf and setting it to false ?

That worked. Looks like google analytics was turned on by default. Can we set it back to false by default.

Also, this line

props.simulationPackage("${package}") display $package in recorder. Not a big deal but if a window user leaves it like that by default then 
he may run into directory/package not created.

I suppose you’re looking at the classes from Github ?
This is a not a bug, it’s just that those classes get preprocessed during the archetype creation and ${package} get replaced by the package you entered.

Well, it’s pretty strange that it’s failing for you, since it’s pretty simple request after all…