The following repository is a complete QA test over every API found in the Core Objects of Duda I/O version DST-2.
Once the run program load the unit tests index, it goes inside each unit test directory and lookup for three files: pre.sh, qa.htt and pos.sh.
script | description |
---|---|
pre.sh | If found, it will be run as the first thing. This kind of script is mostly used to cleanup or prepare the environment. |
qa.htt | This is the real HTTP Test Unit that perform the request and validate the server response. The script is interpreted by the httest tool. Once it exits, the return value is validated. |
pos.sh | If found, it will be run after the qa.htt test, it's made for post HTTP evaluations. Once it exists, the return value is validated. |
The tool assumes you have installed dudac tool in your system:
$ pip install dudac
now build Duda I/O stack using dudac and with a simple example service:
$ dudac -w core/console/debug
then break the service with CTRL-C, the stack have been built and is ready to be used with the unit tests. The final step is just to launcht the run Python script:
$ ./run
Optionally if you are using a custom stack on your file system, you can point it through the environment variable DUDAC_STAGE, e.g:
$ export DUDAC_STAGE=/home/foo/stack/
note: after set the environment variable, dudac will expect to find a monkey directory inside /home/foo/stack/.
The following table represents the status of each core API objects unit test and its methods available. The boxes status means:
✅ fully implemented
| API Object | | Methods | Web Service Test
---------------------|--------------------|--------------------|-------------------|---------------------- :white_check_mark: | Console | | | | | :white_check_mark: | dashboard | console/dashboard_01/ | | :white_check_mark: | dashboard | console/dashboard_02/ | | :white_check_mark: | debug | console/debug/ :white_check_mark: | Cookie | | | | | :white_check_mark: | cmp | cookie/ | | :white_check_mark: | destroy | cookie/ | | :white_check_mark: | get | cookie/ | | :white_check_mark: | set | cookie/ :white_check_mark: | Configuration | | | | | :white_check_mark: | bind_messages | config/bind_messages/ | | :white_check_mark: | service_name | config/service_name/ | | :white_check_mark: | service_root | config/service_root/ :white_check_mark: | Data | | | | | :white_check_mark: | get_path | data/ | | :white_check_mark: | locate | data/ | | :white_check_mark: | set_path | data/ :white_check_mark: | File Configuration | | | | | :white_check_mark: | free_conf | fconf/ | | :white_check_mark: | get_path | fconf/ | | :white_check_mark: | read_conf | fconf/ | | :white_check_mark: | read_file | fconf/ | | :white_check_mark: | section_get | fconf/ | | :white_check_mark: | section_key | fconf/ | | :white_check_mark: | set_path | fconf/ :white_check_mark: | Events | | | | | :white_check_mark: | add | event/events/ | | :white_check_mark: | create_signal_fd | event/create_signal_fd/ | | :white_check_mark: | delete | event/events/ | | :white_check_mark: | duda_event_signal_set_callback | event/signal_callback/ | | :white_check_mark: | lookup | event/events/ | | :white_check_mark: | mode | event/events/ | | :white_check_mark: | signal | event/signal_callback/ | | :white_check_mark: | loop_create | event/loop/ | | :white_check_mark: | loop_add | event/loop/ | | :white_check_mark: | loop_delete | event/loop/ | | :white_check_mark: | loop_timeout_create | event/loop/ | | :white_check_mark: | loop_channel_create | event/loop/ | | :white_check_mark: | loop_wait | event/loop/ | | :white_check_mark: | loop_backend | event/loop/ :white_check_mark: | Garbage Collector | | | | | :white_check_mark: | add | garbage_collector/ :white_check_mark: | Memory Handler | | | | | :white_check_mark: | alloc | memory/ | | :white_check_mark: | alloc_z | memory/ | | :white_check_mark: | free | memory/ | | :white_check_mark: | realloc | memory/ :white_check_mark: | Global Worker | | | | | :white_check_mark: | get | global/ | | :white_check_mark: | init | global/ | | :white_check_mark: | set | global/ :white_check_mark: | Log Writer | | | | | :white_check_mark: | duda_logger_create | log_writer/ | | :white_check_mark: | print | log_writer/ :white_check_mark: | Parameters | | | | | :white_check_mark: | get | param/ | | :white_check_mark: | get_number | param/ :white_check_mark: | Query String | | | | | :white_check_mark: | cmp | query_string/ | | :white_check_mark: | count | query_string/ | | :white_check_mark: | get | query_string/ | | :white_check_mark: | get_id | query_string/ :warning: | Response | | | | | :white_check_mark: | cont | event/events/ | | :white_check_mark: | end | event/events/ | | :white_check_mark: | finalize | event/events/ | | :warning: | flush | | | :white_check_mark: | headers_off | response/ | | :white_check_mark: | http_content_length | response/ | | :white_check_mark: | http_content_type | response/ | | :white_check_mark: | http_header | config/service_root/ | | :white_check_mark: | http_header_n | response/ | | :white_check_mark: | http_status | event/events/ | | :white_check_mark: | print | response/ | | :white_check_mark: | printf | event/events/ | | :warning: | send_headers | | | :white_check_mark: | sendfile | response/ | | :white_check_mark: | sendfile_range | response/ | | :white_check_mark: | wait | event/events/ :white_check_mark: | Request | | | | | :white_check_mark: | content_length | request/ | | :white_check_mark: | content_type | request/ | | :white_check_mark: | get_data | request/ | | :white_check_mark: | header_cmp | request/ | | :white_check_mark: | header_contains | request/ | | :white_check_mark: | header_get | request/ | | :white_check_mark: | is_data | request/ | | :white_check_mark: | is_delete | request/ | | :white_check_mark: | is_get | request/ | | :white_check_mark: | is_head | request/ | | :white_check_mark: | is_post | request/ | | :white_check_mark: | is_put | request/ | | :white_check_mark: | validate_request | request/ | | :white_check_mark: | validate_socket | request/ :white_check_mark: | Router | | | | | :white_check_mark: | map | router/ | | :white_check_mark: | root | router/ :white_check_mark: | Sessions | | | | | :white_check_mark: | create | session/ | | :white_check_mark: | destroy | session/ | | :white_check_mark: | get | session/ | | :white_check_mark: | init | session/ | | :white_check_mark: | isset | session/ :white_check_mark: | Workers | | | | | :white_check_mark: | pre_loop | worker/ | | :white_check_mark: | spawn | worker/ :white_check_mark: | Time Handling | | | | | :white_check_mark: | next_hours | time/ | | :white_check_mark: | now | time/ | | :white_check_mark: | tomorrow | time/ :white_check_mark: | Dthread | | | | | :white_check_mark: | create | dthread/ | | :white_check_mark: | status | dthread/ | | :white_check_mark: | yield | dthread/ | | :white_check_mark: | resume | dthread/ | | :white_check_mark: | running | dthread/ | | :white_check_mark: | chan_create | dthread/ | | :white_check_mark: | chan_free | dthread/ | | :white_check_mark: | chan_get_sender | dthread/ | | :white_check_mark: | chan_set_sender | dthread/ | | :white_check_mark: | chan_get_receiver | dthread/ | | :white_check_mark: | chan_set_receiver | dthread/ | | :white_check_mark: | chan_done | dthread/ | | :white_check_mark: | chan_end | dthread/ | | :white_check_mark: | chan_send | dthread/ | | :white_check_mark: | chan_recv | dthread/
Eduardo Silva [email protected]