09-26-2020, 01:49 PM
BIBO tests
BIBO provides the following tests
server_addr: server address
bibo_server_addr="localhost"
bibo_server_port=62818
test_insert.sh:
test_inquire_shen.sh: 用于测试处理20288个字符的查询请求时,是否会出现没有返回值的情况
test_inquire.sh:
test_select.sh:
test_delete_zeng
test_indel_zeng
test_crds.sh: insert, inquire, select, delete and select.
test_isds.sh: test selecting a non-existent and an existent case
test_isdsd.sh: test deleting a non-existent case
test_pressure.sh:
test_insert_testcase.sh: insert test_case.json which has caseid:"aaaaa..." and casetitle: "计算机案例"
test_delete_testcase.sh: request to delete case with caseid "aaaaa..."
Historical info:
test_delete.sh:
---
20210813/zhihao: add test case
20210522/lingu: indel
20201009/zhihao: add $bibo_server_addr and $bibo_server_port
BIBO provides the following tests
server_addr: server address
bibo_server_addr="localhost"
bibo_server_port=62818
test_insert.sh:
Code:
casefile=zengxingliang.json
flog_also_stderr=True
ret = send insert request $casefile to $bibo_server_addr $bibo_server_port
if ($ret == 200) {
flog "insert success"
return 0
}
else {
flog "insert failed"
return 99
}
test_inquire_shen.sh: 用于测试处理20288个字符的查询请求时,是否会出现没有返回值的情况
test_inquire.sh:
Code:
casefile=chendengchang-with-blank-line.json
ret = send inquire request $casefile to $bibo_server_addr $bibo_server_port
flog_also_stderr=True
if ($ret == 200) {
flog "inquire success"
return 0
}
else {
flog "inquire failed"
return 99
}
test_select.sh:
Code:
casefile=sel_zengxingliang.json
flog_also_stderr=True
ret = send select request $casefile to $bibo_server_addr $bibo_server_port
if ($ret == 200) {
flog "select success"
return 0
}
else {
flog "select failed"
return 99
}
test_delete_zeng
test_indel_zeng
test_crds.sh: insert, inquire, select, delete and select.
test_isds.sh: test selecting a non-existent and an existent case
Code:
./test_insert.sh
./test_select.sh
./test_delete.sh
./test_select.sh
test_isdsd.sh: test deleting a non-existent case
Code:
./test_isds.sh
./test_delete.sh
test_pressure.sh:
Code:
bibo_test_iter_cnt=1
for (i in 1 to $bibo_test_iter_cnt) {
./test_insert.sh
./test_delete.sh
./test_isdsd.sh
}
test_insert_testcase.sh: insert test_case.json which has caseid:"aaaaa..." and casetitle: "计算机案例"
test_delete_testcase.sh: request to delete case with caseid "aaaaa..."
Historical info:
test_delete.sh:
Code:
casefile=del_zengxingliang.json
flog_also_stderr=True
ret = send delete request $casefile to $bibo_server_addr $bibo_server_port
if ($ret == 200) {
flog "delete success"
return 0
}
else {
flog "delete failed"
return 99
}
---
20210813/zhihao: add test case
20210522/lingu: indel
20201009/zhihao: add $bibo_server_addr and $bibo_server_port