
须在脚本根目录压缩脚本内容,且压缩格式为zip
脚本根目录必须要包含一个runTest.sh文件(注意大小写),这里的runTest.sh就是linux的shell脚本,可以使用shell的语法
如果是mac/linux系统建议用zip指令打包
cd script #cd到 脚本根目录/runTest.sh同级目录
zip -r script.zip *
举个例子:
如果您的脚本入口是执行"python main.py",那么runTest.sh可以写成
#!/bin/bash
python main.py
如果是python3脚本,则写成
python3 main.py
假设runTest.sh执行结束后会在当前目录生成testresult.log,则endTest.sh可以写成
cp testresult.log $UPLOADDIR/
测试结束后,在脚本日志我们会看到三个文件
其中,runTest.log是runTest.sh执行的结果日志,endTest.log是endTest.sh执行的结果日志,testreult.log是通过endTest.sh拷贝到$UPLOADDIR目录的结果文件