因为GitHub上提供的Gatling (最新版本:2.2.0 snapshot)是源码,而且,完整的Gatling被拆分为Gatling(Core,相当于测试引擎吧)和Gatling-highchats(主要是用来生成测试报告)两部分。不知到为何要拆分为两部分,也许是因为Gatling-highchats部分引用了特殊license的软件插件(HighCharts & HighStock, 来自于HighSoft公司。)
1. 首先,从github上clone下gatling的源码。
git clone http://github.com/gatling/gatling git clone http://github.com/gatling/gatling-highcharts |
待这些文件都下载到本地后,先进入gatling的目录,在命令行下执行 sbt compile (,若你的系统下没有安装SBT,请先自己安装,我是直接在SBT官网下载的0.13.9的版本,解压到local目录下,再在/etc/profile下配置一下环境变量,方便使用)。gatling文件列表如下:
-rw-r--r-- 1 root root 3204 Jan 8 13:10 CONTRIBUTING.md drwxr-xr-x 4 root root 4096 Jan 8 13:12 gatling-app drwxr-xr-x 4 root root 4096 Jan 8 13:12 gatling-bundle drwxr-xr-x 4 root root 4096 Jan 8 13:12 gatling-charts drwxr-xr-x 4 root root 4096 Jan 8 13:12 gatling-commons drwxr-xr-x 4 root root 4096 Jan 8 13:12 gatling-compiler drwxr-xr-x 4 root root 4096 Jan 8 13:12 gatling-core drwxr-xr-x 4 root root 4096 Jan 8 13:12 gatling-http drwxr-xr-x 4 root root 4096 Jan 8 13:12 gatling-jdbc drwxr-xr-x 4 root root 4096 Jan 8 13:12 gatling-jms drwxr-xr-x 4 root root 4096 Jan 8 13:12 gatling-metrics drwxr-xr-x 4 root root 4096 Jan 8 13:12 gatling-recorder drwxr-xr-x 4 root root 4096 Jan 8 13:12 gatling-redis drwxr-xr-x 4 root root 4096 Jan 8 13:12 gatling-test-framework -rwxr-xr-x 1 root root 246 Jan 8 13:10 make_credentials.sh -rw-r--r-- 1 root root 106 Jan 8 13:10 pgp.sbt drwxr-xr-x 4 root root 4096 Jan 8 13:12 project -rw-r--r-- 1 root root 2304 Jan 8 13:10 README.md drwxr-xr-x 4 root root 4096 Jan 8 13:10 src drwxr-xr-x 4 root root 4096 Jan 8 13:18 target -rwxr-xr-x 1 root root 720 Jan 8 13:10 trigger_build.py -rw-r--r-- 1 root root 40 Jan 8 13:10 version.sbt |
sbt compile执行完毕后(可能需要一段时间,因为有些依赖的库要下载),需要将其发布到ivy仓库中(你也可以发布到mave仓库):
上文内容不用于商业目的,如涉及知识产权问题,请权利人联系博为峰小编(021-64471599-8017),我们将立即处理。