Rigorous and Reliable (RAR)
BIBO tests - Printable Version

+- Rigorous and Reliable (RAR) (http://rar.shufangkeji.com:60380)
+-- Forum: 大计算 (/forumdisplay.php?fid=257)
+--- Forum: 应用 (/forumdisplay.php?fid=363)
+---- Forum: BIBO (/forumdisplay.php?fid=602)
+---- Thread: BIBO tests (/showthread.php?tid=9167)


BIBO tests - lingu - 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:
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


RE: BIBO tests - lingu - 09-26-2020 01:53 PM

20200926/lingu ran 'make test' but it failed.
Code:
12:38:28 lingu@g1b-2:/home/lingu/forest/prada/prada> make -C procuratorate test
make: Entering directory '/home/lingu/forest/prada/prada/procuratorate'
make: ./maketest.sh: Command not found
make: *** [Makefile:2: test] Error 127
make: Leaving directory '/home/lingu/forest/prada/prada/procuratorate'
12:38:33 lingu@g1b-2:/home/lingu/forest/prada/prada>

I removed maketest and made crds an individual test.

zhihao - Pls add our header to the make file. The header includes copyright notes, description of the file, and other info such as authors. You may refer to other files, such as procone.py, for reference.


RE: BIBO tests - zhihao - 09-26-2020 07:11 PM

(09-26-2020 01:53 PM)lingu Wrote:  20200926/lingu ran 'make test' but it failed.
Code:
12:38:28 lingu@g1b-2:/home/lingu/forest/prada/prada> make -C procuratorate test
make: Entering directory '/home/lingu/forest/prada/prada/procuratorate'
make: ./maketest.sh: Command not found
make: *** [Makefile:2: test] Error 127
make: Leaving directory '/home/lingu/forest/prada/prada/procuratorate'
12:38:33 lingu@g1b-2:/home/lingu/forest/prada/prada>

I removed maketest and made crds an individual test.

zhihao - Pls add our header to the make file. The header includes copyright notes, description of the file, and other info such as authors. You may refer to other files, such as procone.py, for reference.

Added header to test*.sh
Code:
[zhihao@g1b-2 procuratorate]$ git status
# On branch rc
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       modified:   test_delete.sh
#       modified:   test_insert.sh
#       modified:   test_read.sh
#       modified:   test_select.sh
#
[zhihao@g1b-2 procuratorate]$ git commit -m "add header to test*.sh"



RE: BIBO tests - zhihao - 09-26-2020 09:38 PM

design test_select.sh:
Code:
insert_ret = run test_insert.sh

if ($insert_ret != 0)
    return $insert_ret

ret = send select request sel_zengxingliang.json to trajan.d-thinker.org 20050
if ($ret == 200) {
    print select success
}
else {
    print select failed
    return -1
}

del_ret = run test_delete.sh

if ($delete_ret != 0)
    return $delete_ret

ret = send select request sel_zengxingliang.json to trajan.d-thinker.org 20050
if ($ret == 404) {
    print select success
    return 0
}
else {
    print select failed
    return -1
}

RR lingu


RE: BIBO tests - zhihao - 09-26-2020 09:57 PM

design test_delete.sh:
Code:
insert_ret = run test_insert.sh

if ($insert_ret != 0)
    print "insert failed, please try again"
    return $insert_ret

ret = send delete request del_zengxingliang.json to trajan.d-thinker.org 20050
if ($ret == 200) {
    print delete success
}
else {
    print delete failed
    return -1
}

ret = send delete request del_zengxingliang.json to trajan.d-thinker.org 20050
if ($ret == 404) {
    print delete success
    return 0
}
else {
    print delete failed
    return -1
}

RR lingu


RE: BIBO tests - zhihao - 09-26-2020 10:04 PM

design test_insert.sh:
Code:
ret = send insert request zengxingliang.json to trajan.d-thinker.org 20050
if ($ret == 200) {
    print insert success
    return 0
}
else {
    print insert failed
    return -1
}

RR lingu


RE: BIBO tests - zhihao - 09-26-2020 10:14 PM

design test_inquire.sh:
Code:
ret = send inquire request chendengchang-with-blank-line.json to trajan.d-thinker.org 20050

if ($ret == 200) {
  print "inquire success"
  return 0
}
else {
  print "inquire failed"
  return -1
}

RR lingu


RE: BIBO tests - zhihao - 09-27-2020 11:46 AM

add test_pressure.sh design info:

Code:
for (i in 1 to 10) {
  run test_delete.sh
}

RR lingu


RE: BIBO tests - lingu - 09-27-2020 12:00 PM

(09-26-2020 09:38 PM)zhihao Wrote:  design test_select.sh:

insert_ret = run test_insert.sh

can you just run an insert test here?

Quote:if ($insert_ret != 0)
return $insert_ret

ret = send select request sel_zengxingliang.json to trajan.d-thinker.org 20050

dont hard-code trajan. Use a var.

Can you make a simple select test?

Quote:if ($ret == 200) {
print select success
}
else {
print select failed
return -1
}

del_ret = run test_delete.sh

if ($delete_ret != 0)
return $delete_ret

Can you just invoke the delete test?

Quote:ret = send select request sel_zengxingliang.json to trajan.d-thinker.org 20050
if ($ret == 404) {
print select success
return 0
}
else {
print select failed
return -1
}
[/code]

RR lingu

You can summarize the block above as 'expect 404, otherwise return -1'.

-1 is not a good exit status. Use a specific value, such as 99, to indicate the error.

This seems to be a combined test. You can name it test-isds -- insert, select, delete, select.


RE: BIBO tests - lingu - 09-27-2020 12:14 PM

(09-26-2020 09:57 PM)zhihao Wrote:  design test_delete.sh:

insert_ret = run test_insert.sh

if ($insert_ret != 0)
print "insert failed, please try again"
return $insert_ret

I think you can remove the above.

Quote:ret = send delete request del_zengxingliang.json to trajan.d-thinker.org 20050
if ($ret == 200) {
print delete success
}
else {
print delete failed
return -1
}

Pls return different exit code for 200 and 404 scenarios.

Quote:ret = send delete request del_zengxingliang.json to trajan.d-thinker.org 20050
if ($ret == 404) {
print delete success
return 0
}
else {
print delete failed
return -1
}
[/code]

RR lingu

You can add the case of deleting a non-existent case in another test, such as isds -- just make it isdsd.


RE: BIBO tests - lingu - 09-27-2020 12:15 PM

(09-26-2020 10:04 PM)zhihao Wrote:  design test_insert.sh:

ret = send insert request zengxingliang.json to trajan.d-thinker.org 20050
if ($ret == 200) {
print insert success

dont use print. Use flog. You can set flog_also_stderr=True to make the message go to stderr when you run it interactively.

Quote: return 0
}
else {
print insert failed
return -1
}
[/code]

RR lingu

OK but dont use -1


RE: BIBO tests - lingu - 09-27-2020 12:16 PM

(09-26-2020 10:14 PM)zhihao Wrote:  design test_inquire.sh:
Code:
ret = send inquire request chendengchang-with-blank-line.json to trajan.d-thinker.org 20050

if ($ret == 200) {
  print "inquire success"
  return 0
}
else {
  print "inquire failed"
  return -1
}

RR lingu

OK but pls parameterize the newcase file and the service point (trajan).


RE: BIBO tests - lingu - 09-27-2020 12:20 PM

(09-27-2020 11:46 AM)zhihao Wrote:  add test_pressure.sh design info:

for (i in 1 to 10) {

parameterize 10. e.g., define a var bibo_test_iter_cnt with a default value 1.

Quote: run test_delete.sh
}
[/code]

RR lingu

Better combine small tests, such as test-delete and test-insert. You can make this a combined test test-id (insert delete). For correctness test, bibo_test_iter_cnt=1. For perf and pressure tests, we can set bibo_test_iter_cnt=10, 100, 1000, ...


RE: BIBO tests - zhihao - 10-07-2020 09:44 PM

(09-27-2020 12:00 PM)lingu Wrote:  
(09-26-2020 09:38 PM)zhihao Wrote:  design test_select.sh:

insert_ret = run test_insert.sh

can you just run an insert test here?
OK, I'll delete if-else statement

(09-27-2020 12:00 PM)lingu Wrote:  
Quote:if ($insert_ret != 0)
return $insert_ret

ret = send select request sel_zengxingliang.json to trajan.d-thinker.org 20050

dont hard-code trajan. Use a var.

Can you make a simple select test?
I define a var "server_addr" for trajan like server_addr=trajan.d-thinker.org:20050 for these test scripts
yes, I'll make a simple select test as follows:
test_select.sh
Code:
server_addr=trajan.d-thinker.org:20050
flog_also_stderr=True
ret = send select request sel_zengxingliang.json to $server_addr
if ($ret == 200) {
    flog "select success"
    return 0
}
else {
    flog "select failed"
    return 99
}

(09-27-2020 12:00 PM)lingu Wrote:  
Quote:if ($ret == 200) {
print select success
}
else {
print select failed
return -1
}

del_ret = run test_delete.sh

if ($delete_ret != 0)
return $delete_ret

Can you just invoke the delete test?
OK, I'll delete if-else statement

(09-27-2020 12:00 PM)lingu Wrote:  
Quote:ret = send select request sel_zengxingliang.json to trajan.d-thinker.org 20050
if ($ret == 404) {
print select success
return 0
}
else {
print select failed
return -1
}
[/code]

RR lingu

You can summarize the block above as 'expect 404, otherwise return -1'.

-1 is not a good exit status. Use a specific value, such as 99, to indicate the error.

This seems to be a combined test. You can name it test-isds -- insert, select, delete, select.
OK, exit status will change to 99 and I will correct and rename this combined test script and create a new test_select.sh
test_isds.sh:
Code:
server_addr=trajan.d-thinker.org:20050
./test_insert.sh
./test_select.sh
./test_delete.sh
./test_select.sh



RE: BIBO tests - zhihao - 10-07-2020 11:01 PM

(09-27-2020 12:14 PM)lingu Wrote:  
(09-26-2020 09:57 PM)zhihao Wrote:  design test_delete.sh:

insert_ret = run test_insert.sh

if ($insert_ret != 0)
print "insert failed, please try again"
return $insert_ret

I think you can remove the above.
removed

(09-27-2020 12:14 PM)lingu Wrote:  
Quote:ret = send delete request del_zengxingliang.json to trajan.d-thinker.org 20050
if ($ret == 200) {
print delete success
}
else {
print delete failed
return -1
}

Pls return different exit code for 200 and 404 scenarios.
added exit code as follows:
test_delete.sh:
Code:
server_addr=trajan.d-thinker.org:20050
flog_also_stderr=True
ret = send delete request del_zengxingliang.json to $server_addr
if ($ret == 200) {
    flog "delete success"
    return 0
}
else {
    flog "delete failed"
    return 99
}

(09-27-2020 12:14 PM)lingu Wrote:  
Quote:ret = send delete request del_zengxingliang.json to trajan.d-thinker.org 20050
if ($ret == 404) {
print delete success
return 0
}
else {
print delete failed
return -1
}
[/code]

RR lingu

You can add the case of deleting a non-existent case in another test, such as isds -- just make it isdsd.
OK, add test_isdsd.sh as follows:
Code:
erver_addr=trajan.d-thinker.org:20050
./test_isds.sh
./test_delete.sh



RE: BIBO tests - zhihao - 10-07-2020 11:21 PM

(09-27-2020 12:15 PM)lingu Wrote:  
(09-26-2020 10:04 PM)zhihao Wrote:  design test_insert.sh:

ret = send insert request zengxingliang.json to trajan.d-thinker.org 20050
if ($ret == 200) {
print insert success

dont use print. Use flog. You can set flog_also_stderr=True to make the message go to stderr when you run it interactively.
OK, added flog and exit code
Code:
server_addr=trajan.d-thinker.org:20050
flog_also_stderr=True
ret = send insert request zengxingliang.json to $server_addr
if ($ret == 200) {
    flog "insert success"
    return 0
}
else {
    flog "insert failed"
    return 99
}

(09-27-2020 12:15 PM)lingu Wrote:  
Quote: return 0
}
else {
print insert failed
return -1
}
[/code]

RR lingu

OK but dont use -1
OK, updated


RE: BIBO tests - zhihao - 10-07-2020 11:29 PM

(09-27-2020 12:16 PM)lingu Wrote:  
(09-26-2020 10:14 PM)zhihao Wrote:  design test_inquire.sh:
Code:
ret = send inquire request chendengchang-with-blank-line.json to trajan.d-thinker.org 20050

if ($ret == 200) {
  print "inquire success"
  return 0
}
else {
  print "inquire failed"
  return -1
}

RR lingu

OK but pls parameterize the newcase file and the service point (trajan).

updated as follows, and parameterized other test scripts too.
test_inquire.sh:
Code:
casefile=chendengchang-with-blank-line.json
server_addr=trajan.d-thinker.org:20050
flog_also_stderr=True
ret = send inquire request $casefile to $server_addr
if ($ret == 200) {
    flog "inquire success"
    return 0
}
else {
    flog "inquire failed"
    return 99
}



RE: BIBO tests - zhihao - 10-07-2020 11:38 PM

(09-27-2020 12:20 PM)lingu Wrote:  
(09-27-2020 11:46 AM)zhihao Wrote:  add test_pressure.sh design info:

for (i in 1 to 10) {

parameterize 10. e.g., define a var bibo_test_iter_cnt with a default value 1.

Quote: run test_delete.sh
}
[/code]

RR lingu

Better combine small tests, such as test-delete and test-insert. You can make this a combined test test-id (insert delete). For correctness test, bibo_test_iter_cnt=1. For perf and pressure tests, we can set bibo_test_iter_cnt=10, 100, 1000, ...

OK, add parameter bibo_test_iter_cnt
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
}



RE: BIBO tests - lingu - 10-09-2020 12:16 PM

I think we already implemented some scripts, and we just need organize them. I am adding the tests to cod://bibo


RE: BIBO tests - lingu - 10-09-2020 05:09 PM

(09-26-2020 01:49 PM)lingu Wrote:  test_inquire.sh:
[code]
casefile=chendengchang-with-blank-line.json
server_addr=trajan.d-thinker.org:20050

server_addr'd better be an IP address. Let's rename it bibo_server_addr. Let's use a default addr localhost.

For the port, we can define another var bibo_server_port and it has a default value 62818.

In this way, we can test bibo in an intranet system.


RE: BIBO tests - zhihao - 10-09-2020 05:33 PM

(10-09-2020 05:09 PM)lingu Wrote:  
(09-26-2020 01:49 PM)lingu Wrote:  test_inquire.sh:
Code:
casefile=chendengchang-with-blank-line.json
server_addr=trajan.d-thinker.org:20050

server_addr'd better be an IP address. Let's rename it bibo_server_addr. Let's use a default addr localhost.

For the port, we can define another var bibo_server_port and it has a default value 62818.

In this way, we can test bibo in an intranet system.

updated as follows:
Code:
bibo_server_addr="localhost"
bibo_server_port=62818
ret = send inquire request $casefile to $bibo_server_addr $bibo_server_port



RE: BIBO tests - zhihao - 10-11-2020 08:49 PM

首文添加 test_inquire_shen.sh:
test_inquire_shen.sh: 用于测试处理20288个字符的查询请求时,是否会出现没有返回值的情况


RE: BIBO tests - lingu - 10-12-2020 12:33 AM

(10-11-2020 08:49 PM)zhihao Wrote:  首文添加 test_inquire_shen.sh:
test_inquire_shen.sh: 用于测试处理20288个字符的查询请求时,是否会出现没有返回值的情况

triage()用jq获得casetype,但似乎jq处理相关网络请求json报错。

Code:
[sage@limbo30-1 typical]$ cp ../newcase/newcase.txt /thinker/net/udata/all/
[sage@limbo30-1 typical]$ jq '.type' /thinker/net/udata/all/newcase.txt
parse error: Invalid numeric literal at line 1, column 6197
[sage@limbo30-1 typical]$

但处理该json原始文件不报错。
Code:
[sage@limbo30-1 typical]$ jq '.type' /thinker/globe/soft/bibo/app/test/processed/query_shenmou.json
"query"
[sage@limbo30-1 typical]$

两个文件不同。
Code:
[sage@limbo30-1 typical]$ ll /thinker/globe/soft/bibo/app/test/processed/query_shenmou.json
-rw-rw-r-- 1 sage lingu 29771 Oct 11 21:52 /thinker/globe/soft/bibo/app/test/processed/query_shenmou.json
[sage@limbo30-1 typical]$ ll /thinker/net/udata/all/newcase.txt
-rw-rw-r-- 1 sage sage 29746 Oct 11 23:31 /thinker/net/udata/all/newcase.txt
[sage@limbo30-1 typical]$

看2文件开头没有什么不同。
Code:
[sage@limbo30-1 typical]$ od -c /thinker/net/udata/all/newcase.txt  |head
0000000   {   "   t   y   p   e   "   :   "   q   u   e   r   y   "   ,
0000020   "   q   u   e   r   y   "   :   " 344 270 212 346 265 267 345
0000040 270 202 346 237 220 345 214 272 344 272 272 346 260 221 346 243
0000060 200 345 257 237 351 231 242 345 205 254 350 257 211 346 241 210
0000100 344 273 266 345 256 241 346 237 245 346 212 245 345 221 212 346
0000120 224 266 346 241 210 346 227 266 351 227 264 357 274 232   2   0
0000140   1   9 345 271 264   7 346 234 210   3   0 346 227 245 344 276
0000160 246 346 237 245 346 234 272 345 205 263 357 274 232 344 270 212
0000200 346 265 267 345 270 202 345 205 254 345 256 211 345 261 200 346
0000220 237 220 345 210 206 345 261 200 347 247 273 351 200 201 345 215
[sage@limbo30-1 typical]$ od -c /thinker/globe/soft/bibo/app/test/processed/query_shenmou.json |head
0000000   {   "   t   y   p   e   "   :   "   q   u   e   r   y   "   ,
0000020   "   q   u   e   r   y   "   :   " 344 270 212 346 265 267 345
0000040 270 202 346 237 220 345 214 272 344 272 272 346 260 221 346 243
0000060 200 345 257 237 351 231 242 345 205 254 350 257 211 346 241 210
0000100 344 273 266 345 256 241 346 237 245 346 212 245 345 221 212 346
0000120 224 266 346 241 210 346 227 266 351 227 264 357 274 232   2   0
0000140   1   9 345 271 264   7 346 234 210   3   0 346 227 245 344 276
0000160 246 346 237 245 346 234 272 345 205 263 357 274 232 344 270 212
0000200 346 265 267 345 270 202 345 205 254 345 256 211 345 261 200 346
0000220 237 220 345 210 206 345 261 200 347 247 273 351 200 201 345 215

把二者全部od出来,发现差异在有 A z " 的地方开始。
Code:
742  od -c /thinker/net/udata/all/newcase.txt  > /tmp/newcase.od
  743  od -c /thinker/globe/soft/bibo/app/test/processed/query_shenmou.json > /tmp/shen.od
  744  diff /tmp/newcase.od /tmp/shen.od



RE: BIBO tests - lingu - 10-12-2020 04:27 AM

'make test' was successful even though some tests failed. This is a bug.
Code:
./test_inquire.sh
sending inquire request ./processed/chendengchang-with-blank-line.json
return code: 200
inquire success
./test_crds.sh
casecnt before insert: 5
sending insert request: /thinker/storage/soft/bibo/processed/zengxingliang.json
cat: /thinker/storage/soft/bibo/processed/zengxingliang.json: No such file or directory
          run1 exits with 0 for (cat /thinker/storage/soft/bibo/processed/zengxingliang.json; sleep 10 ) | ncat trajan.d-thinker.org 20050
insert finished

ls: cannot access '/thinker/globe/udata/lingu/testy/procuratorate/tests/typical': No such file or directory
inserted json case stores in:/thinker/globe/udata/lingu/testy/procuratorate/tests/typical//insert.json
inserted json case:
head: cannot open '/thinker/globe/udata/lingu/testy/procuratorate/tests/typical//insert.json' for reading: No such file or directory
...

tail: cannot open '/thinker/globe/udata/lingu/testy/procuratorate/tests/typical//insert.json' for reading: No such file or directory

casecnt after insert: 5

sending delete request: /thinker/storage/soft/bibo/processed/del_zengxingliang.json
cat: /thinker/storage/soft/bibo/processed/del_zengxingliang.json: No such file or directory
          run1 exits with 0 for ( cat /thinker/storage/soft/bibo/processed/del_zengxingliang.json; sleep 10 ) | ncat trajan.d-thinker.org 20050
delete finished

case content after deleted
cat: /thinker/globe/udata/lingu/testy/procuratorate/tests/typical//insert.json: No such file or directory

make[1]: Leaving directory '/tmp/root_install1_workdir/bibo/bibo/app/test'
/tmp/root_install1_workdir/bibo
[Mon Oct 12 03:26:07 CST 2020] install1 /thinker/local/shed/installation/limbo30-tc/bibo.tar.gz ... OK

Zhihao - pls fix this issue.


RE: BIBO tests - lingu - 11-30-2020 05:19 PM

(10-12-2020 04:27 AM)lingu Wrote:  'make test' was successful even though some tests failed. This is a bug.
Code:
./test_inquire.sh
sending inquire request ./processed/chendengchang-with-blank-line.json
return code: 200
inquire success
./test_crds.sh
casecnt before insert: 5
sending insert request: /thinker/storage/soft/bibo/processed/zengxingliang.json
cat: /thinker/storage/soft/bibo/processed/zengxingliang.json: No such file or directory
          run1 exits with 0 for (cat /thinker/storage/soft/bibo/processed/zengxingliang.json; sleep 10 ) | ncat trajan.d-thinker.org 20050
insert finished

ls: cannot access '/thinker/globe/udata/lingu/testy/procuratorate/tests/typical': No such file or directory
inserted json case stores in:/thinker/globe/udata/lingu/testy/procuratorate/tests/typical//insert.json
inserted json case:
head: cannot open '/thinker/globe/udata/lingu/testy/procuratorate/tests/typical//insert.json' for reading: No such file or directory
...

tail: cannot open '/thinker/globe/udata/lingu/testy/procuratorate/tests/typical//insert.json' for reading: No such file or directory

casecnt after insert: 5

sending delete request: /thinker/storage/soft/bibo/processed/del_zengxingliang.json
cat: /thinker/storage/soft/bibo/processed/del_zengxingliang.json: No such file or directory
          run1 exits with 0 for ( cat /thinker/storage/soft/bibo/processed/del_zengxingliang.json; sleep 10 ) | ncat trajan.d-thinker.org 20050
delete finished

case content after deleted
cat: /thinker/globe/udata/lingu/testy/procuratorate/tests/typical//insert.json: No such file or directory

make[1]: Leaving directory '/tmp/root_install1_workdir/bibo/bibo/app/test'
/tmp/root_install1_workdir/bibo
[Mon Oct 12 03:26:07 CST 2020] install1 /thinker/local/shed/installation/limbo30-tc/bibo.tar.gz ... OK

Zhihao - pls fix this issue.

?


RE: BIBO tests - lingu - 11-30-2020 05:22 PM

(09-26-2020 01:49 PM)lingu Wrote:  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
}

the pseudocode just selects a case, but the real code does insert and delete as well. I am commenting out the insert and delete logic. If we need insert and delete, we can simply run a combined test with tests insert, select and delete.


RE: BIBO tests - lingu - 05-22-2021 11:26 AM

(09-26-2020 01:49 PM)lingu Wrote:  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
}

Actually it inserts and deletes. To make it more modular, I am splitting it into two programs, test_delete_zeng and test_indel_zeng.

Also I am splitting them into separate threads.


RE: BIBO tests - zhihao - 05-22-2021 01:50 PM

(11-30-2020 05:19 PM)lingu Wrote:  
(10-12-2020 04:27 AM)lingu Wrote:  'make test' was successful even though some tests failed. This is a bug.
Code:
./test_inquire.sh
sending inquire request ./processed/chendengchang-with-blank-line.json
return code: 200
inquire success
./test_crds.sh
casecnt before insert: 5
sending insert request: /thinker/storage/soft/bibo/processed/zengxingliang.json
cat: /thinker/storage/soft/bibo/processed/zengxingliang.json: No such file or directory
          run1 exits with 0 for (cat /thinker/storage/soft/bibo/processed/zengxingliang.json; sleep 10 ) | ncat trajan.d-thinker.org 20050
insert finished

ls: cannot access '/thinker/globe/udata/lingu/testy/procuratorate/tests/typical': No such file or directory
inserted json case stores in:/thinker/globe/udata/lingu/testy/procuratorate/tests/typical//insert.json
inserted json case:
head: cannot open '/thinker/globe/udata/lingu/testy/procuratorate/tests/typical//insert.json' for reading: No such file or directory
...

tail: cannot open '/thinker/globe/udata/lingu/testy/procuratorate/tests/typical//insert.json' for reading: No such file or directory

casecnt after insert: 5

sending delete request: /thinker/storage/soft/bibo/processed/del_zengxingliang.json
cat: /thinker/storage/soft/bibo/processed/del_zengxingliang.json: No such file or directory
          run1 exits with 0 for ( cat /thinker/storage/soft/bibo/processed/del_zengxingliang.json; sleep 10 ) | ncat trajan.d-thinker.org 20050
delete finished

case content after deleted
cat: /thinker/globe/udata/lingu/testy/procuratorate/tests/typical//insert.json: No such file or directory

make[1]: Leaving directory '/tmp/root_install1_workdir/bibo/bibo/app/test'
/tmp/root_install1_workdir/bibo
[Mon Oct 12 03:26:07 CST 2020] install1 /thinker/local/shed/installation/limbo30-tc/bibo.tar.gz ... OK

Zhihao - pls fix this issue.

?
I am fixing insert, inquire, select, delete tests.


RE: BIBO tests - zhihao - 08-13-2021 01:27 AM

to avoid delete real case in mistake, use test case to test operation, add to headpost:
---
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..."
---