Performance Tool(1)Gatling
1. Installation and Preparation
Download the binary file, the version I am using is gatling-charts-highcharts-1.4.4-bundle.tar.gz.
I unzip and put it here /Users/carl/tool/gatling-charts-highcharts-1.4.4
link a short name for the working directory.
>sudo ln -s /Users/carl/tool/gatling-charts-highcharts-1.4.4 ./gatling-1.4.4
>sudo ln -s gatling-1.4.4 gatling
I already have JDK1.6 on my local machine, even gatling recommend JDK 1.7, but I will still use JDK1.6.
2. Running Gatling
There is a command line interface(CLI).
Add gatling to my system
>vi ~/.profile
export GATLING_HOME=/opt/gatling
export PATH=/opt/gatling/bin:$PATH
>. ~/.profile
>gatling.sh
3. First Steps with Gatling
I will learn about simulations, scenarios, feeders, recorder, loops, scala functions, etc.
Create my own simulation directory under simulations.
>mkdir sillycat
>vi SimulationtoTaobao.scala
I just write a very first simple sample to visit one page on taobao website.
package sillycat
import com.excilys.ebi.gatling.core.Predef._
import com.excilys.ebi.gatling.http.Predef._
import com.excilys.ebi.gatling.jdbc.Predef._
import com.excilys.ebi.gatling.http.Headers._
import akka.util.duration._
import bootstrap._
import assertions._
class SimulationtoTaobao extends Simulation {
// your code starts here
val scn = scenario("My First Scenario")
.exec(http("My Page")
.get("http://www.taobao.com/index_global.php"))
setUp(scn.users(10))
// your code ends here
}
Run gatling.sh
>gatling.sh
And choose sillycat.
I can spend some time to study https://github.com/excilys/excilys-bank.git this project.
4. Read the codes in Basic
Steps
1. The user accesses to the application http://excilys-bank-web.cloudfoundry.com/public/login.html
2. The user enters its credentials and logs in
3. The user accesses to the details of one of its accounts
4. The user accesses to the operations of the previous month
5. The user logs out
5. Gatling Recorder
We can recorder our action through gatling recorder.
>recorder.sh
Follow this document to record my actions.
https://github.com/excilys/gatling/wiki/Recorder#wiki-browser-config
6. Gatling Scenario Explained
…snip…
I will wrote more later about how I use it to stress test on my own application. And read the Explained in details.
References:
https://github.com/excilys/gatling/wiki/Getting-Started
https://github.com/excilys/gatling
http://gatling-tool.org/
分享到:
相关推荐
Gatling is a highly capable load testing tool. It is designed for ease of use, maintainability and high performance.
gatling 3.0.2
1.gatling和其他压力工具相比有个好处是放在同一内网环境下linux服务器上,这样避免其他压力使用办公机使用共有网络,网络情况对压力测试的影响。 2 生成比较详细的压力测试报告。 3 能够更灵活的编写压力脚本。 ...
基于moto 开源的java测试架构 gatling 实现的测试用例书写方式
Gatling的非官方Dubbo压测插件,基于Gatling 2.3.1。
Gatling是一款基于Scala 开发的高性能服务器性能测试工具,它主要用于对服务器进行负载等测试,并分析和测量服务器的各种性能指标。Gatling主要用于测量基于HTTP的服务器,比如Web应用程序,RESTful服务等,除此之外...
性能测试工具gatling3.0.0, 官网下载太慢,上传到csdn,方便下载,供大家使用
Gatling是一个高性能,简洁强大的DSL API,支持命令行运行,支持Jenkins,以便于持续集成
performance-test-gatling ./bin/install.sh 跑步 默认模拟: ./gatling/bin/gatling.sh IDevelop模拟: ./gatling/bin/gatling.sh -sf simulations/ IDevelop 集群模拟并收集结果: ./bin/cluster-run.sh < ...
Gatling是一款功能强大的负载测试工具。它的设计易于使用,可维护性和高性能。开箱即用,Gatling提供了对HTTP协议的出色支持,使其成为负载测试HTTP服务器的首选工具。
性能测试工具gatling2.1.7, 官网下载太慢,上传到csdn,方便下载,供大家使用
1.5.4版的gatling
gatling 新兴的性能测试工具 使用scala语言编写脚本
性能测试工具。该工具仅用学习使用,不可用于商业用途,如有版权问题,请联系删除!
gatling 新兴的性能测试工具 使用scala语言编写脚本
参数化 用于性能测试脚本编写 提供参数化新方案 通过调用自己的java工具类 实现参数化 同时也可以实现参座数据库 链接外部操作等
gatling-charts-highcharts-bundle-3.3.1-bundle,很好用的测试工具,有一定的学习成本。
性能测试加特林 使用 gatling 进行连续性能测试的演示。
gatling-gradle-plugin:Gradle的Gatling插件
并创建一个jar文件: $ sbt assembly如果要更改用于创建jar文件的Gatling版本,请在更改以下行: " io.gatling " % " gatling-core " % " 3.3.1 " % " provided " , 并运行sbt assembly 。 如果您不想将kafka-...