一个shell脚本写的测试框架
来源:互联网 发布:java微服务架构有哪些 编辑:程序博客网 时间:2024/05/22 14:04
这是我进实验室进项目组写的第一程序,shell脚本写的用在项目中测试例的自动化测试测试。
#!/bin/bash str1="Success" str2="Failed" str3="No_test" num_failure=0 num_success=0 num_no_test=0 loop_cnt=1 test_port="$1" for((k=0;k<${loop_cnt};k++)) ; do while read test_tcl_name cycle_time do if [ "$test_tcl_name" == "" ];then continue fi for ((j=0;j<"$cycle_time";j++)) ; do echo "---------------------------------------------" logfile=$(date +"%Y-%m-%d%H%M%S") start_time=$(date +"%s") #echo "logFile:$logfile" >>autotest_notes.log echo "admin" |sudo -s ./parser_testcase_script.tcl "$test_port" $test_tcl_name >autotest_notes.log ./parser_testcase_script.tcl $test_port $test_tcl_name grep "Test Scripts Success" autotest_notes.log result_test=$? echo "$result_test" if [ "$result_test" == "0" ];then let "num_success+=1" echo $test_tcl_name $str1 >>autotest_result.txt else let "num_failure+=1" echo $test_tcl_name $str2 >>autotest_result.txt echo "$test_tcl_name">>autotest_result.bug grep "Matched Failed" autotest_notes.log >>autotest_result.bug echo "-----------------------------------------------" >>autotest_result.bug fidone done <$2 done echo "------------------------------------------">>autotest_result.txt let "total=num_success+num_failure" echo total $total Success $num_success Failed $num_failure >>autotest_resilt.txt echo "total: $total , Success :$num_success, Failed: $num_failure"
阅读全文
0 0
- 一个shell脚本写的测试框架
- 自己写的一个测试RAC LoadBalance的shell脚本
- Shell写的一个进程监视脚本
- 用shell写一个简单的脚本
- 【shell】推荐一份写测试shell脚本不错的资料
- 基于shell写的一个简单的人机交互的测试框架
- 一个用shell写的执行java程序的脚本
- 用shell脚本写的一个简单的计算器
- shell脚本写的一个图片抓取器
- 写了一个解、压缩文件的shell脚本
- ubuntu中写一个shell脚本的过程
- 用shell写了一个自动编译代码的脚本
- 用shell脚本写的一个交互式linux命令行工具
- 用shell写了一个自动编译代码的脚本
- 在Ubuntu的shell终端写一个简单脚本
- 利用UiAutomator写一个首页刷新的稳定性测试脚本
- PHP使用Yii框架写一个不间断执行的脚本
- 如何写一个shell脚本并运行
- <转载>eclipse 配置黑色主题
- 【异常】Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
- 设计模式之代理模式
- STL常用函数复习之————queue
- Tempter of the Bone HDU
- 一个shell脚本写的测试框架
- c/c++整理--类String的构造函数、析构函数和赋值函数
- bzoj1345: [Baltic2007]序列问题Sequence
- 浅谈Three.js源码-render之WebGLLights.js
- 身份证云识别sdk基于服务器的部署
- Intent的花样用法
- sql注入
- 基本排序算法之冒泡排序
- pinyin4j使用说明