美文网首页
Jmeter 半自动化shell脚本

Jmeter 半自动化shell脚本

作者: strean | 来源:发表于2017-12-21 16:31 被阅读0次
#!bin/bash
#File=IDC_XX.jmx
File=IDC_XX_PAY.jmx
#File=IDC_USER.jmx
#File=IDC_WY.jmx
#File=IDC_WY_PAY.jmx


threadNum=300
durationTime=300

p1=`cat ${File}|grep HttpTestSampleGui|awk -F '"' '{print $8}'|head -n 1`
Interface_num=`cat -n ${File}|grep HttpTestSampleGui|wc -l`
for i in `seq ${Interface_num}`
do
   LineNum=`cat -n ${File}|grep HttpTestSampleGui|awk -F '<' '{print $1}'|head -n ${i}|tail -n 1| tr -d '[ \t]'`
   Interface=`cat ${File}|grep HttpTestSampleGui|awk -F '"' '{print $6}'|head -n  ${i}|tail -n 1`

   sed -i  ${LineNum}s/false/true/g ${File}
   echo "========"${Interface}"=====start======"
   echo "========"${Interface}"=====start======">>reports.log
   sh jmeter.sh -JthreadCount=${threadNum} -JrampUp=10 -JdurationTime=${durationTime} -n -t ${File} -l ${Interface}.jtl >>reports.log
   sed -i  ${LineNum}s/true/false/g ${File}
   echo "========"${Interface}"=====done======"
   echo "========"${Interface}"=====done======">>reports.log
   sleep 2m
done

相关文章

  • Jmeter 半自动化shell脚本

  • Shell入门笔记

    Shell脚本:Linux Shell脚本学习指南菜鸟教程 - Shell教程Linux入门 - Shell脚本是...

  • 2018-09-26

    shell脚本 1.1、什么是shell脚本(shell script , ...

  • 性能测试工具Jmeter

    一、Jmeter脚本录制 Jmeter使用概述 录制脚本首先我们需要设置Jmeter: ①测试计划>添加>Thre...

  • Shell script + crontab实现Mysql定时备

    一、Shell 脚本 Shell 脚本(shell script),是一种为 shell 编写的脚本程序。 业界所...

  • Include Controller(包含控制器)

    结论给当前jmeter脚本引入外部片段的jmeter脚本(Test Fragment片段脚本)Test Fragm...

  • 嵌入式day12

    shell脚本的本质 shell脚本语言是解释型语言 shell脚本的本质:shell命令的有序集合 shell编...

  • shell脚本

    什么是shell脚本 Shell 脚本(shell script),是一种为 shell 编写的脚本程序。业界所说...

  • Shell脚本语法

    1. Shell脚本简介Shell 脚本(shell script),是一种为 shell 编写的脚本程序。业界所...

  • shell脚本

    什么是Shell脚本 Shell脚本(英语:Shell script),又称Shell命令稿、程序化脚本,是一种电...

网友评论

      本文标题:Jmeter 半自动化shell脚本

      本文链接:https://www.haomeiwen.com/subject/wumawxtx.html