jmeter+Jenkins性能测试自动化搭建
Posted loveapple
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了jmeter+Jenkins性能测试自动化搭建相关的知识,希望对你有一定的参考价值。
一、安装java、ant、maven
1、官网下载tar.gz包
2、解压相应的tar包
3、配置/etc/profile路径
4、source /etc/profile 使配置生效。
二、安装Jenkins
[[email protected] ~]# wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
[[email protected] ~]# rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
[[email protected] ~]# yum clean all
[[email protected] ~]# yum install jenkins
[[email protected] ~]#
2、配置/etc/profile
如上一步
3、配置Jenkins
修改Jenkins的配置文件
[[email protected] ~]# vim /etc/sysconfig/jenkins #默认端口是8080
53 # Port Jenkins is listening on. 54 # Set to -1 to disable 55 # 56 JENKINS_PORT="8080" 57 58 ## Type: string 59 ## Default: "" 60 ## ServiceRestart: jenkins 61 # 62 # IP address Jenkins listens on for HTTP requests. 63 # Default is all interfaces (0.0.0.0). 64 # 65 JENKINS_LISTEN_ADDRESS="" .
修改Jenkins的服务脚本
[[email protected] ~]# vim /etc/init.d/jenkins
64 # Search usable Java as /usr/bin/java might not point to minimal version required by Jenkins. 65 # see http://www.nabble.com/guinea-pigs-wanted-----Hudson-RPM-for-RedHat-Linux-td25673707.html 66 candidates=" 67 /etc/alternatives/java 68 /usr/lib/jvm/java-1.8.0/bin/java 69 /usr/lib/jvm/jre-1.8.0/bin/java 70 /usr/lib/jvm/java-1.7.0/bin/java 71 /usr/lib/jvm/jre-1.7.0/bin/java 72 /usr/bin/java 73 /data/jdk/jdk1.8.0_131/bin/java #添加内容--指定你的JAVA所在路径 74 " 75 for candidate in $candidates 76 do 77 [ -x "$JENKINS_JAVA_CMD" ] && break 78 JENKINS_JAVA_CMD="$candidate"
3、启动jenkins服务
service jenkins start (contos6)
systemctl start jenkins (centos7)
4、访问ip:8080
根据提示输入密码
安装插件
插件用户
以上是关于jmeter+Jenkins性能测试自动化搭建的主要内容,如果未能解决你的问题,请参考以下文章
Jmeter+jenkins如何快速搭建接口和性能测试持续集成解决方案-[基于windows篇]
Jenkins+Ant+Jmeter 自动化性能测试平台之填坑篇
Jmeter +Maven+jenkins+eclipse 接口自动化测试