第二篇
http://gatling.io/docs/2.2.1/whats_new/2.2.html
What’s New in 2.2
JDK
Gatling now requires JDK8. JVM default tuning uses G1 Garbage Collector, so we strongly advice you use a very up-to-date JDK, not early versions.
Core
Feeder Shuffle
You can now shuffle a feeder content before enqueuing its content, see Feeder documentation for more details.
Assertions
Gatling now supports “per-million” assertions, similar to “percent” ones.
Conditional Checks (since 2.2.1)
It’s now possible to only perform a given check when a given condition is met. See Conditional Checks documentation for more details.
HTTP
Native Transport
Gatling is now based on Netty 4 that provide an optional native epoll-based NIO re-implementation (different from JDK NIO) which can give better throughput. This option is only available on Linux. See Netty documentation for more details.
Gatling ships with the required jar, but the option is turned down by default.
In order to enable it, set gatling.http.ahc.useNativeTransport to true in gatling.conf.
OpenSSL Support
Netty 4 also provides a support for OpenSSL and BoringSSL. See Netty documentation for more details.
Gatling doesn’t ship the required jar and it depends on your operating system and if you want static or dynamic binding. You’re expected to manually add the suited library to Gatling’s classpath.
In order to enable it, set gatling.http.ahc.useOpenSsl to true in gatling.conf.
Forms Support
You can now use the form(“cssSelector”).saveAs(“myForm”) check to capture a Map[String, Seq[String]] of all the inputs of an HTML form at once.
You can then feed them back to a later request. See HTTP request documentation for more details.
Polling Support
Gatling now supports HTTP polling, see HTTP polling documentation for more details.
Hostname Resolution
By default, virtual users now use a shuffled list of the DNS records Gatling gets from the JDK. If you use DNS round-robin, this will balance your virtual users amongst the nodes of a static cluster.
Alternatively, you can enable perUserNameResolution on the HTTP protocol and have each virtual user perform DNS resolution on its own. This, way, your virtual users would be properly balanced if your cluster grows elastically under load. See HTTP protocol documentation for more details.
We also support DNS fail-over, meaning that virtual users will try the next DNS record of they couldn’t connect to the first address.
Hostname Aliasing
You can bypass hostname resolution and define aliases in hostNameAliases on the HTTP protocol. See HTTP protocol documentation for more details.
Local Addresses
It’s now possible to pass multiple local addresses to the HTTP protocol in localAddresses. See HTTP protocol documentation for more details.
Reports
JUnit Format Report File
Gatling now generates a JUNIt format report file based on the assertions in your simulation. This file is generated as /js/assertions.xml.
Groups Duration
You can switch from Group cumulated response times to duration when generating the reports. See gatling.charting.useGroupDurationMetric option in gatling.conf
Maven Plugin
The Gatling Maven plugin now provides test and integration-test that are bound to the phases of the same name.
It also now provides a useOldJenkinsJUnitSupport that exposes our JUnit file to Jenkins. At some point, we’ll provide a native support.
在2.2的新增了那些功能
JDK
gatling现在需要JDK8支持。 JVM默认调整使用G1垃圾收集器,因此我们强烈建议您升级到最新的JDK,而不是早期版本。
核心
Feeder Shuffle(不会翻…)
现在,You can now shuffle a feeder content before enqueuing its content,请参阅Feeder文档了解更多信息。
断言
gatling现在支持“per-million”的断言,类似于“percent”。
条件检查(自2.2.1)
现在只要当给定条件满足时就可以执行一个给定的检查。有关详细信息,请参阅条件检查文档。
HTTP
本机传输
虽然我也不知道 epoll-based NIO是什么。。。
gatling现在基于Netty 4提供一个可选的基于原生的epoll-NIO重新实现(从JDK NIO不同),它可以提供更好的吞吐量。此选项仅在Linux上可用。详见的Netty文档,了解更多信息。
gatling不需要携带需要的jar包,它取决于你的操作系统,如果你想要静态或动态绑定。你需要手动配置需要的jar的path到gatling的classpath。
加特林附带所需的jar,但默认选项是关闭的。
为了启用它,设置gatling.http.ahc。在gatling.conf useNativeTransport为true。
为了启用他,需要在gatling.conf里将 gatling.http.ahc.useOpenSsl设置为true。
表单支持
您现在可以使用的form(“cssSelector”).saveAs(“myForm”)检查捕捉Map[String, Seq[String]]在HTML表单的所有输入。
然后,您可以传递给以后的请求。见HTTP请求的文档了解更多信息。
轮训支持
gatling现在支持HTTP轮询,请参阅HTTP轮询文档了解更多信息。
hostname解析
默认情况下,, virtual users now use a shuffled list of the DNS records Gatling gets from the JDK. If you use DNS round-robin。如果您使用DNS循环,这将你的虚拟用户的静态群集的节点之间平衡。
或者,也可以在HTTP协议使用perUserNameResolution,并让每个虚拟用户自身进行DNS解析。这样,如果你的集群负载下的弹性增长时,你的虚拟用户会保持良好的平衡。见HTTP协议文档了解更多信息。
我们也支持DNS故障转移,这意味着虚拟用户会尝试下一个DNS记录,当他们无法连接到第一个地址时。
别名主机名
您可以绕过主机名解析和HTTP协议定义hostNameAliases别名。见HTTP协议文档了解更多信息。
本地地址
它现在可以将多个本地地址传递给在localAddresses HTTP协议。见HTTP协议文档了解更多信息。
报告
JUnit的格式报告文件
加特林现在根据你的模拟断言产成一个JUnit格式的报告文件。此文件将生成如/js/assertions.xml。
group持续时间
您可以切换组累计响应时间当时间生成报告时。见gatling.conf gatling.charting.useGroupDurationMetric选项
Maven插件
gatling Maven插件现在提供测试和集成测试绑定到同名的阶段。
它还现在提供一个公开的JUnit我们的文件,jenkins一useOldJenkinsJUnitSupport。在某些时候,我们将提供原生支持。