gatling官方文档翻译5

简介:

第五篇

http://gatling.io/docs/2.2.2/migration_guides/2.0-to-2.1.html

Migrating from 2.0 to 2.1
Global changes
Scala 2.11
Gatling is now built with Scala 2.11. If you’re using Scala IDE, make sure you’re using a version compatible with Scala 2.11.

Compiler runs standalone
Gatling itself doesn’t compile the Simulations anymore and expects that the simulations are already compiled. This means that gatling.sh/gatling.bat and the Maven plugin runs the compiler prior to running Gatling. Consequently, a few options in gatling.conf have been removed:

gatling.core.disableCompiler
gatling.core.zinc.jvmArgs
Please note that, as this change implied that the Maven Plugin was heavily modified so that it compiles the simulations separately prior to running Gatling, you’ll need to upgrade the Maven Plugin to its version 2.1.0 too.

Percentiles
Gatling now publishes 4 percentiles instead of 2. These percentiles are published in the reports and in the Graphite integration module. Beware that keys in gatling.conf file have been translated:

Gatling 2.0:
percentile1 = 95
percentile2 = 99
Gatling 2.1+:
percentile1 = 50
percentile2 = 75
percentile3 = 95
percentile4 = 99
Core
Mute mode
The “mute mode” option, which was previously restricted to the SBT Plugin, is now also usable by the bundle scripts and the Maven Archetype.

Assertions
Validating assertions in combination with the reports-only / ro option does not require to pass the simulation (using -s) for which the assertions will be validated anymore.

Throttling
Throttling now automatically adds a maxDuration of either the simulation throttling duration, or the minimum of the scenarios throttling durations.

HTTP
Parameters
Form parameters are no longer specific to POST method, you can use them with all methods.

Request Bodies Directory
The directory name was changed from request-bodies to bodies as it now can host both request bodies and response bodies. The latter one are now captured by the recorder, and can be used as template for checking the response body.

CLI option was renamed from rbf to bdf.

Checks
Deprecated dontValidate was dropped in 2.1 as previously announced. Please use optional instead.

Protocol
Deprecated baseHeaders was dropped in 2.1 as previously announced. Please use headers instead.

Maven Archetype
Due to some necessary changes to allow Gatling to use Scala 2.11, you’ll have to update IDEPathHelper.scala, Engine.scala and Recorder.scala if you’re using the Maven archetype.

Either generate a new project with the 2.1.1 archetype (there was a bug in 2.1), or override your classes with the ones here. If you choose the latter, don’t forget to fix the simulationPackage in Recorder.scala.

SBT Plugin
The SBT Plugin’s test framework has been moved to the core project in 2.1. As a consequence, the test framework name has be modified to follow the naming conventions of all core modules and share its versionning.

The SBT Plugin will also share the same versionning schema as all other Gatling modules, and has been renamed to ‘gatling-sbt’.

The new coordinates are therefore :

“io.gatling” % “gatling-sbt” % “2.1.0” for the SBT Plugin
“io.gatling” % “gatling-test-framework” % “2.1.0” for the testing framework.

从2.0 合并到2.1
全局变化
Scala 2.11
gatling 现在用2.11 构建,如果你使用Scala IDE, 确认你是使用的版本能够兼容scala2.11.

Compiler runs standalone
编译器独立的运行

gatling本身不再编译模拟器和预测模拟已经编译。

这就意味着 gatling.sh/gatling.bat 和maven插件编译在运行gatling之前。因此,一些选项在gatling.conf 已经被移除

请注意,这种变化意味着Maven插件大量修改,单独编译仿真运行gatling之前,你需要升级版本2.1.0的Maven插件。

Percentiles
gatling 发布4位百分数来代替2位。
这些百分位数发布在生成的报告和图表的集成模块
注意键在gatling.conf 文件已经被翻译。

Gatling 2.0:
percentile1 = 95
percentile2 = 99
Gatling 2.1+:
percentile1 = 50
percentile2 = 75
percentile3 = 95
percentile4 = 99
Core

Mute mode

“静音模式”选项,该选项以前局限于SBT插件,现在也可用bundle的脚本和Maven Archetype。
Assertions

验证断言结合the reports-only / ro option不需要通过仿真(using- s)的断言将被验证了。

Throttling
节流现在自动添加一个maxDuration仿真节流的持续时间、节流时间或最低的场景。
HTTP
Parameters
形式参数不再是特定于POST方法,您可以使用它们在全部的方法。
Request Bodies Directory
目录更名从请求体的body,因为它现在可以主机请求body和响应。后者现在被记录,并可以用作模板检查响应的body。

CLI option被重新命名从 rbf 到 bdf.

Checks
此前宣布弃用dontValidate下降2.1。请使用optional。

Protocol
此前宣布弃用baseHeaders下降2.1。请使用headers。

Maven Archetype

由于一些必要的改变,允许gatling使用Scala 2.11中,你将不得不更新IDEPathHelper.scala, Engine.scala and Recorder.scala。如果你使用Maven archetype 。

SBT Plugin
SBT插件的测试框架已经被转移到2.1的核心项目。因此,测试框架的名称已被修改遵循所有核心模块的命名约定和分享它的版本。

SBT插件还将共享相同的版本模式和其他gatling模块,并重新命名为“gatling-sbt”。
因此,新坐标:
“io.gatling” % “gatling-sbt” % “2.1.0” 关于 the SBT 插件
“io.gatling” % “gatling-test-framework” % “2.1.0” 关于测试框架.

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

目录
相关文章
|
1月前
|
数据挖掘 测试技术 BI
性能工具之 Gatling 快速入门
Gatling 是一款基于 Scala 开发的高性能服务器性能测试工具,它主要用于对服务器进行负载等测试,并分析和测量服务器的各种性能指标。
35 1
性能工具之 Gatling 快速入门
|
1月前
|
Java Scala Maven
性能工具之 Gatling 开发环境搭建
编写 Gatling 脚本需要搭建脚本开发环境,下面演示使用 IDEA 开发环境搭建脚本开发环境。
26 2
性能工具之 Gatling 开发环境搭建
|
4月前
|
JSON JavaScript 前端开发
Nodejs 第十八章(util)
Nodejs 第十八章(util)
27 0
|
6月前
|
虚拟化 Python Windows
[笔记]Volatility 取证工具使用以及Hollow插件使用
[笔记]Volatility 取证工具使用以及Hollow插件使用
|
10月前
|
安全 前端开发 索引
谈一谈|MkDocs介绍及应用
谈一谈|MkDocs介绍及应用
200 0
|
存储 前端开发 JavaScript
werkzeug源码阅读-完结篇
Werkzeug是一个全面的WSGI Web应用程序库。它最初是WSGI实用程序各种工具的简单集合,现已成为最高级的WSGI实用程序库之一,是Flask背后的项目。
435 0
werkzeug源码阅读-完结篇
|
XML Java 测试技术
针对性能测试工具Gatling与Jmeter的比较及看法
对于Gatling的优点网上也总结了很多,我也不多说,但是光从测试场景配置上来说,Gatling就不输Loadrunner......
2227 0
|
XML Java 数据格式

热门文章

最新文章