gatling系列教程(翻译)-第二节(What’s New in 2.2)

Gatling更新包括:支持JDK1.8及G1垃圾回收;新增FeederShuffle、条件检查等功能;基于Netty4提供更好的吞吐量;支持OpenSSL和BoringSSL;增强HTTP支持如表单捕获、轮询等。

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.

gatling要求使用Jdk1.8,jvm默认调整使用G1垃圾收集器,因此我们强烈建议你使用最新JDK,而不是老版本的JDK.

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 documentationfor 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.

转载于:https://my.oschina.net/u/3613710/blog/1554771

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值