Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
test_crds.sh -- OMUD
09-25-2020, 12:31 AM
Post: #1
test_crds.sh -- OMUD
This shell script is used for testing create, read, delete, query cases functions in BIBO system.

Designers' info

Code:
$caseid: each case has a unique case id
send insert request zengxingliang.json to trajan.d-thinker.org 20050

output the inserted case content to the screen
show case count after insert

send delete request del_zengxingliang.json to trajan.d-thinker.org 20050 to delete cases matches $caseid
Quote this message in a reply
09-26-2020, 12:41 PM (This post was last modified: 09-26-2020 01:51 PM by lingu.)
Post: #2
RE: test_crds.sh -- OMUD
(09-25-2020 12:31 AM)zhihao Wrote:  This shell script is used for testing create, read, delete, search cases functions in BIBO system.

by 'search', you mean 'select'?

Quote:Designers' info

show case count before insert

The tests should be run on a 'client' environment. It may not be able to access $bibo_base

Quote:send insert request to trajan.d-thinker.org 20050

insert what file? Should specify key details.

Quote:output inserted case file

What does this give us?

Quote:show case count after insert

send delete request to trajan.d-thinker.org 20050
[/code]

Delete which doc?

There should be also a query test -- crd means create, read, delete.
Find all posts by this user
Quote this message in a reply
09-26-2020, 02:18 PM (This post was last modified: 09-26-2020 03:42 PM by lingu.)
Post: #3
RE: test_crds.sh -- OMUD
delete returns 404, but the test still reports success. That's not good.
Code:
13:16:30 lingu@g1b-2:/home/lingu/forest/prada/prada> make -C procuratorate test                 make: Entering directory '/home/lingu/forest/prada/prada/procuratorate'
./test_crds.sh
casecnt before insert: 109
sending insert request: /thinker/storage/soft/bibo/processed/zengxingliang.json
{
"code": 200,
"msg": "ok",
"children": []
}
insert finished

inserted json case stores in:/thinker/globe/udata/lingu/testy/procuratorate/tests/typical/110/insert.json
inserted json case:
{"type":"insert","query":"","caseid":"","insert":{"keys":[{"key1":"破▒计▒▒信▒系▒","key

...

▒▒巨大▒▒ ▒▒"}}


casecnt after insert: 110

sending delete request: /thinker/storage/soft/bibo/processed/del_zengxingliang.json
{
"code": 404,
"msg": "not found",
"children": [
]
}

delete finished

case content after deleted
{"type": "","query": "","caseid": "___","insert": {"keys": [], "caseid": "___" }}

make: Leaving directory '/home/lingu/forest/prada/prada/procuratorate'
13:16:53 lingu@g1b-2:/home/lingu/forest/prada/prada>

zhihao - pls fix this. On 404, the test should be a failure and the program should scream to die.

It also has a children field. We agreed to remove the children field.
-- i removed the children field for delete in cod://prada commit 56d38f9
Find all posts by this user
Quote this message in a reply
09-26-2020, 02:30 PM
Post: #4
RE: test_crds.sh -- OMUD
(09-26-2020 02:18 PM)lingu Wrote:  It also has a children field. We agreed to remove the children field.

Delete result 200 also has children. That's bad.
Code:
13:22:49 lingu@g1b-2:/home/lingu/forest/prada/prada> make -C procuratorate test
make: Entering directory '/home/lingu/forest/prada/prada/procuratorate'
./test_crds.sh
casecnt before insert: 110
sending insert request: /thinker/storage/soft/bibo/processed/zengxingliang.json
{
"code": 200,
"msg": "ok",
"children": []
}
insert finished

inserted json case stores in:/thinker/globe/udata/lingu/testy/procuratorate/tests/typical/111/insert.json
inserted json case:
{"type":"insert","query":"","caseid":"","insert":{"keys":[{"key1":"破▒计▒▒信▒系▒","key

...

▒▒巨大▒▒ ▒▒"}}


casecnt after insert: 111

sending delete request: /thinker/storage/soft/bibo/processed/del_zengxingliang.json
{
"code": 200,
"msg": "ok",
"children": [
{"subset":110}
]
}

delete finished

case content after deleted
{"type": "","query": "","caseid": "___","insert": {"keys": [], "caseid": "___" }}

make: Leaving directory '/home/lingu/forest/prada/prada/procuratorate'
13:23:26 lingu@g1b-2:/home/lingu/forest/prada/prada>

zhihao -3s lingu -1s
Find all posts by this user
Quote this message in a reply
09-26-2020, 02:35 PM
Post: #5
RE: test_crds.sh -- OMUD
This one receives no response, and it should also be a failure.
Code:
13:34:11 lingu@g1b-2:/home/lingu/forest/prada/prada> make -C procuratorate test
make: Entering directory '/home/lingu/forest/prada/prada/procuratorate'
./test_crds.sh
casecnt before insert: 112
sending insert request: /thinker/storage/soft/bibo/processed/zengxingliang.json
{
"code": 200,
"msg": "ok",
"children": []
}
insert finished

inserted json case stores in:/thinker/globe/udata/lingu/testy/procuratorate/tests/typical/113/insert.json
inserted json case:
{"type":"insert","query":"","caseid":"","insert":{"keys":[{"key1":"破▒计▒▒信▒系▒","key

...

▒▒巨大▒▒ ▒▒"}}


casecnt after insert: 113

sending delete request: /thinker/storage/soft/bibo/processed/del_zengxingliang.json
delete finished

case content after deleted
{"type": "","query": "","caseid": "___","insert": {"keys": [], "caseid": "___" }}

make: Leaving directory '/home/lingu/forest/prada/prada/procuratorate'
13:34:38 lingu@g1b-2:/home/lingu/forest/prada/prada>
13:34:38 lingu@g1b-2:/home/lingu/forest/prada/prada> echo $?
0
13:35:15 lingu@g1b-2:/home/lingu/forest/prada/prada>
Find all posts by this user
Quote this message in a reply
09-26-2020, 04:19 PM
Post: #6
RE: test_crds.sh -- OMUD
(09-26-2020 12:41 PM)lingu Wrote:  
(09-25-2020 12:31 AM)zhihao Wrote:  This shell script is used for testing create, read, delete, search cases functions in BIBO system.

by 'search', you mean 'select'?
是的,但是我觉得'select'对应的应该是read。
我认为可以把'search'修改为'query',把test_crds.sh 修改为test_crdq.sh
---
This shell script is used for testing create, read, delete, ((search -> query ))cases functions in BIBO system.
---

RR lingu

(09-26-2020 12:41 PM)lingu Wrote:  
Quote:Designers' info

show case count before insert

The tests should be run on a 'client' environment. It may not be able to access $bibo_base
已将其删除并更新首文。

(09-26-2020 12:41 PM)lingu Wrote:  
Quote:send insert request to trajan.d-thinker.org 20050

insert what file? Should specify key details.
updated as follows:
send insert request (( -> zengxingliang.json ))to trajan.d-thinker.org 20050

(09-26-2020 12:41 PM)lingu Wrote:  
Quote:output inserted case file

What does this give us?
It will output the inserted case content to the screen,updated headpost as follows:
((output inserted case file -> output the inserted case content to the screen))

(09-26-2020 12:41 PM)lingu Wrote:  
Quote:show case count after insert

send delete request to trajan.d-thinker.org 20050
[/code]

Delete which doc?

There should be also a query test -- crd means create, read, delete.

It will delete the zengxingliang case.
updated headpost as follows:
---
$caseid: each case has a unique case id
send delete request (( -> del_zengxingliang.json)) to trajan.d-thinker.org 20050(( -> to delete cases matches $caseid))
---
Quote this message in a reply
Post Reply 


Forum Jump: