Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BIBO tests
10-07-2020, 09:44 PM
Post: #14
RE: BIBO tests
(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
Quote this message in a reply
Post Reply 


Messages In This Thread
BIBO tests - lingu - 09-26-2020, 01:49 PM
RE: BIBO tests - lingu - 09-26-2020, 01:53 PM
RE: BIBO tests - zhihao - 09-26-2020, 07:11 PM
RE: BIBO tests - zhihao - 09-26-2020, 09:38 PM
RE: BIBO tests - lingu - 09-27-2020, 12:00 PM
RE: BIBO tests - zhihao - 10-07-2020 09:44 PM
RE: BIBO tests - zhihao - 09-26-2020, 09:57 PM
RE: BIBO tests - lingu - 09-27-2020, 12:14 PM
RE: BIBO tests - zhihao - 10-07-2020, 11:01 PM
RE: BIBO tests - zhihao - 09-26-2020, 10:04 PM
RE: BIBO tests - lingu - 09-27-2020, 12:15 PM
RE: BIBO tests - zhihao - 10-07-2020, 11:21 PM
RE: BIBO tests - zhihao - 09-26-2020, 10:14 PM
RE: BIBO tests - lingu - 09-27-2020, 12:16 PM
RE: BIBO tests - zhihao - 10-07-2020, 11:29 PM
RE: BIBO tests - zhihao - 09-27-2020, 11:46 AM
RE: BIBO tests - lingu - 09-27-2020, 12:20 PM
RE: BIBO tests - zhihao - 10-07-2020, 11:38 PM
RE: BIBO tests - lingu - 10-09-2020, 12:16 PM
RE: BIBO tests - lingu - 10-09-2020, 05:09 PM
RE: BIBO tests - zhihao - 10-09-2020, 05:33 PM
RE: BIBO tests - zhihao - 10-11-2020, 08:49 PM
RE: BIBO tests - lingu - 10-12-2020, 12:33 AM
RE: BIBO tests - lingu - 10-12-2020, 04:27 AM
RE: BIBO tests - lingu - 11-30-2020, 05:19 PM
RE: BIBO tests - zhihao - 05-22-2021, 01:50 PM
RE: BIBO tests - lingu - 11-30-2020, 05:22 PM
RE: BIBO tests - lingu - 05-22-2021, 11:26 AM
RE: BIBO tests - zhihao - 08-13-2021, 01:27 AM

Forum Jump: