轻量级自动化-Jmeter+Maven+Ant集成-1

前言目的1.输出Maven与Ant各自构建结果,自行根据优缺点进行选择;2.设计接口梯度并发自动化测试,根据固定脚本线程模式自由设置并发数;3.根据测试脚本定期维护更新,设计自动到仓库拉取测试脚本执行;4.设计出前端性能自动化数据收集;所需软件清单软件下载地址JDkhttps://www.oracle.com/technetwork/java/javase/downloads/index.htmlJmeterhttps://archive.apache.org/dist/jmeter/binaries/Anthttp://archive.apache.org/dist/ant/binaries/Mavenhttp://maven.apache.org/Jenkinshttps://jenkins.io/download/STShttps://spring.io/toolsGrafanahttps://grafana.com/docs/installation/Influxdbhttps://portal.influxdata.com/软件特性jenkins:定时执行+持续集成jmeter:压测工具Ant:批量构建功能Maven:项目构建管理工具输出Jenkins+jmeterJenkins+Ant+jmeterJenkins+Maven+jmeterJenkins+maven+svn+jmeterJmeter+Influxdb+ Grafana本次试验在本机服务器:172.16.87.1168操作系统:CenOs7.4Jmeter可视化报告预装软件及软件配置influxDB、Grafana下载软件influxDB、Grafana工具,根据软件进行交互配置;下载/安装/配置influxdb(influxdb1.4+版本后就没有web界面了)wget https://dl.influxdata.com/influxdb/releases/influxdb-1.6.4.x86_64.rpmsudo yum localinstall influxdb-1.6.4.x86_64.rpmsudo service influxdb startvim /etc/influxdb/influxdb.conf[[graphite]]# Determines whether the graphite endpoint is enabled.enabled = truedatabase = "jmeter"# retention-policy = ""bind-address = ":2003"protocol = "tcp"consistency-level = "one"注:默认占用8086/8088两个端口号,可以根据自己的实际场景进行替换,进入;查询 bind-address,其中端口号对应的用处说明如下:# Bind address to use for the RPC service for backup and restore.bind-address = "127.0.0.1:8088"….[http]# Determines whether HTTP endpoint is enabled.enabled = true# The bind address used by the HTTP service.bind-address = ":8086"启动influxdservice influxdb restartinfluxdb下载/安装/配置Grafanawget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.2.0-1.x86_64.rpmsudo yum localinstall grafana-4.2.0-1.x86_64.rpmservice grafana-server start访问:Grafana首页 ip+3000端口:http://172.16.87.8:3000/login软件交互衔接串通jmeter配置一条请求信息,添加Backend Listener设置配置信息:

influxd基本配置:[root@jmeter ~]# influx -port 8086Connected to http://localhost:8086 version 1.6.4InfluxDB shell version: 1.6.4># 创建数据库> create database jmeter# 查看数据库> show databases# 链接数据库;> use jmeter> select * from jmeter##查看influxd中jmeter数据库是否有数据;> show measurementsGrafana基本配置:

监控结果图:

TestOps|测试运维精益技术 赋能过程

(0)

相关推荐