-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunc-test.sh
52 lines (41 loc) · 1.29 KB
/
func-test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
scriptPath=$(cd $(dirname $0);pwd)
executingPath=$(pwd)
echo "cd ${scriptPath}"
cd ${scriptPath}
test_type="func"
platform=""
input=""
output=""
email=""
echo "欢迎使用shark-test工具,请按照以下引导填写测试选项"
while [[ "$platform" != "shark" && "$platform"!="all" ]]; do
read -p "测试平台选择(shark)(默认:shark):" platform
if [ -z "$platform" ]; then
platform="shark"
fi
done
while [[ -z "$input" ]]; do
read -p "测试用例文件路径(默认test.json):" input
if [ -z "$input" ]; then
input="test.json"
fi
done
read -p "报告输出路径(默认当前目录):" output
if [ -z "$output" ]; then
output="."
fi
$JAVA_HOME/bin/java -jar ${scriptPath}/shark-test.jar -$test_type -p $platform -i ${scriptPath}/$input -o $output
#cmdStr="$JAVA_HOME/bin/java -jar ${scriptPath}/shark-test.jar -$test_type -p $platform -i ${scriptPath}/$input -o $output"
#cmdStr="java -jar ${scriptPath}/shark-test.jar -$test_type -p $platform -i ${scriptPath}/$input -o $output"
# -bench 不发邮件
#if [ "$test_type" != "bench" ]; then
# read -p "发送至e-mail(可选):" email
# if [ -n "$email" ]; then
# cmdStr+=" -e StatusLogger$email"
# fi
#fi
#echo "$cmdStr"
#exec "$cmdStr"
#echo "cd ${executingPath}"
#cd ${executingPath}