测试脚本

#!/bin/bash -ilex


check(){
    code=$1;
    openid=$2;
    toopenid=$3;
    start "cloudhub://$2:yzj@/autologin?eid=11475617&oid=$2&code=$1&version=1.0"

    RESULT=$(curl -s http://127.0.0.1:1864/query?openid=$2&eid=11475617)

    boolstr=${RESULT:10:5};

    i=1;
    while [ "$boolstr" = "false" ]; do
        RESULT=$(curl -s "http://127.0.0.1:1864/query?openid=$2&eid=11475617");
        boolstr=${RESULT:10:5};
        echo $boolstr;
        sleep 1s;
        ((i++));
        if [ i == 20 ]; then
            echo "登录超时";
            break;
        fi
    done

    start "cloudhub://$2:yzj@/chat?msg=&toopenid=$toopenid&version=1.0";

    sleep 3s;

    C:/Windows/System32/cmd.exe /C 'taskkill /f /t /fi "imagename eq CloudHub.exe"'
}


index=1;
max=100;
while [ $index -lt $max ]; do
    check d3661c26069234426fca5916540f161a  5b553ca3e4b0751b86778f30 5b78d0a6e4b0f7976561873f
done


   转载规则


《测试脚本》 Smoking 采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。
  目录