gatling官方文档翻译4

简介:

第四篇

http://gatling.io/docs/2.2.1/migration_guides/2.0.0-M3a-to-2.0.html
Migrating from 2.0.0-M3a to 2.0
Global changes
Gatling requires at least JDK7u6
As targeting newer JDKs provides bug fixes, speed improvements and opens opportunities for optimization, Gatling now requires at least a JDK7u6 (released almost two years ago already).

Gatling is now available on Maven Central
Gatling releases are now available on Maven Central, and snapshots are deployed on each successful build by Travis CI to Sonatype’s snapshots repository. If you were using Gatling with its Maven plugin, you no longer need to add the Excilys repository in your pom.xml.

Simulation
Necessary imports
import bootstrap. and import assertions. are now unnecessary and have to be removed.
import io.gatling.http.Headers.Names. is now unnecessary, headers names are now directly available from HeaderNames.
import io.gatling.http.Headers.Values. is now unnecessary, headers values are now directly available from HeaderValues.
Injection DSL
ramp(10 users) becomes rampUsers(10)
heaviside(10 users) becomes heavideUsers(10)
atOnce(10 users) becomes atOnceUsers(10)
constantRate(10 usersPerSec) becomes constantUsersPerSec(10)
rampRate(10 usersPerSec) becomes rampUsersPerSec(10)
split(10 users) becomes splitUsers(10)
Core
Structure Elements
In asLongAs, exitASAP now defaults to true. For more information on the change of behaviour it introduces, see asLongAs documentation.

Checks
whatever has been renamed to optional.
transform now no longer takes and returns an Option[T] and takes and returns plain types, but transformOption provides the same functionality as transform did.
HTTP
Form parameters (for POST requests)
Renamed

Methods for adding form parameters to the request have been renamed:

param => formParam
multiValuedParam => multiValuedFormParam
Misc
requestInfoExtractor and responseInfoExtractor have been merged into a single extraInfoExtractor, which takes a ExtraInfo => List[Any] function.
gatling.http.ahc.useRawUrl configuration parameter was removed, please use disableUrlEncoding instead, as described here.
For more information on extraInfoExtractor, please refer to its documentation.

Logs
simulation.log has been redesigned.

If you wrote your own specific simulation.log parser, you’ll need to migrate it to the new structure.

Recorder
Until now, when setting up the Recorder, you had to setup two ports for the Recorder’s local proxy: one for HTTP, one for HTTPS. This is not needed anymore, as the Recorder handles itself the switch to an HTTPS connection if necessary, and only a single port needs to be specified.

Maven Plugin
The … and … configuration options have been removed. Should you want to select a specific simulation to run, you can use the … config option to do so.

For more information, see the Maven plugin documentation.

Migrating from 2.0.0-M3a to 2.0
从2.0.0-M3a 合并到2.0

全局改变
Gatling 需要至少JDK7u6版本

因为心得JDKs修复一些问题,速度得到改善,优化了处理,gatling 现在需要至少JDK7u6(2年前已经发布)

gatling 现在同样在maven cetral 适用

gatling 现在同样在maven cetral 适用,并且快照都会部署到 Sonatype’s snapshots repository 当每次 Travis ci 构建成功后。如果你使用maven插件版gatling,你不需要添加the Excilys repository 在你的pom.xml中。

模拟器
Necessary imports
import bootstrap. and import assertions. 现在已经不需要并且被移除
import io.gatling.http.Headers.Names. 已经不需要, headers names被 HeaderNames代替.
import io.gatling.http.Headers.Values. 已经不需要, headers values 被 HeaderValues代替.

Injection DSL
ramp(10 users) 变为 rampUsers(10)
heaviside(10 users) 变为 heavideUsers(10)
atOnce(10 users)变为 atOnceUsers(10)
constantRate(10 usersPerSec) 变为 constantUsersPerSec(10)
rampRate(10 usersPerSec)变为 rampUsersPerSec(10)
split(10 users) 变为 splitUsers(10)
Core

Structure Elements
结构化组件

在 asLongAs, exitASAP 默认为trule。
有关的行为改变的更多信息介绍,请看asLongAs文档。

Checks

whatever 已经被重新命名为 optional.
transform now no longer takes and returns an Option[T] and takes and returns plain types, but transformOption provides the same functionality as transform did.
transform现在不再需要现在返回一个Option[T],并返回plain类型,但transformOption和transform提供了相同的功能。
HTTP
Form parameters (关于 POST 请求)
重命名

adding form parameters 方法请求已经被重命名:

param => formParam
multiValuedParam => multiValuedFormParam

Misc
requestInfoExtractor 和 responseInfoExtractor 已经合并为 extraInfoExtractor, which takes a ExtraInfo => List[Any] function.
gatling.http.ahc.useRawUrl 配置参数已经被移除, 请用 disableUrlEncoding 代替, 描述如下.
更多关于 extraInfoExtractor信息, 请参照这个文档.

Logs

simulation.log 已经被重新设计.

如果你写自己的simulation.log解析器,您需要它迁移到新结构

Recorder

Until now, 当你设置 Recorder时, 你必须设置两个端口记录器的当地代理:一个用于HTTP,HTTPS。 这再也不需要了, 因为record处理本身转向一个HTTPS连接如果必要,并且只需要指定一个单独的端口。

Maven Plugin

The ... 和 ... 配置项 已经被移除. 如果你需要选择一个特殊的模拟运行, 你可以使用 ... 去配置.

最新内容请见作者的GitHub页:http://qaseven.github.io/

目录
相关文章
|
测试技术
|
网络协议 Java Maven
|
Java Scala Maven
|
Java Scala Maven
|
6月前
|
数据可视化 安全 API
Qt 6.1 中的模块变更(从官网文档翻译)
Qt 6.1 中的模块变更(从官网文档翻译)
52 0
|
6月前
|
传感器 API Android开发
Qt 6.2 中的模块变更(从官网文档翻译)
Qt 6.2 中的模块变更(从官网文档翻译)
97 0
|
存储 SQL 分布式数据库
Drill官网文档翻译六:存储插件的注册
我们可以通过存储插件连接到本地文件系统,Hive,HBase,或是其他的数据源。在Drill的web界面的存储插件配置tab,你可以查看修改这些插件的配置。如果不支持HTTPS(默认就没有),你可以访问HTTP://{IP}:8047/storage 来查看和配置存储插件。可以用IP,也可以用ho.
3296 0
|
SQL 存储 Apache
Drill官网文档翻译一 基本架构
(翻译自apache drill 官网) 架构总览 Apache drill是在大规模数据集场景下,可以低延迟地进行结构和半结构化/嵌套数据结构查询的一个分布式查询引擎。受到谷歌公司的Dremel的启发,Drill被设计出来以支持几千个节点和PB级别的数据规模下,支持交互响应级别的商务智
9274 0
|
存储
Drill官网文档翻译五:连接到数据源
存储插件是Drill中,连接到数据源的模块。一个存储插件通常会优化Drill查询的执行,提供数据的定位,命名空间下的配置和读数据要用到的格式。Drill已经内置了一些存储插件,你只需要根据你的环境配置一下就可以使用了。借助存储插件,你可以连接到各种数据源,像数据库,本地或是分布式的文件,或是Hiv.
3555 0
|
存储
Drill官网文档翻译四 Drill的性能
(翻译自apache drill 官网。) Drill是从地基开始就奔向高性能和大数据集去设计的,下面列出来的是Drill能够做到高性能的核心要点。 分布式的引擎 Drill提供了一个强大的分布式引擎来处理查询。用户可以从集群的任何一个节点是提交查询。你可以添加新的节点到集群中,以为了支持更多
4543 0