Performance Tool(1)Gatling

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/
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值