Introduction

The WMProxy testing script glite-wmproxy-cli-test can probably be put into the layer1 (service ping tests) or the layer2 (service functionalites tests) test category. The program could automatically test the basic level options of WMProxy CLIs (glite-wms-job-delegate-proxy, glite-wms-job-list-match, glite-wms-job-status, glite-wms-job-cancel and glite-wms-job-output commands). For the definition of test categories, please visit the URL at https://twiki.cern.ch/twiki/bin/view/LCG/LCGgliteTestWritingGuidelines for more detail information.


Usage Help for glite-wmproxy-test-cli

NAME

glite-wmproxy-test-cli - The WMProxy client for some simple WMPorxy CLI tests


SYNOPSIS

glite-wmproxy-test-cli [--help] [-d <log_dir>] [-t <retry_time_interval>] [-n <retry_interval_number>] [-e <wait_time_interval>] [-w <wait_interval_number>] [-c <glite_wms.conf>] <jdl>


DESCRIPTION

The WMProxy testing script "glite-wmproxy-cli-test" can probably be put into the layer1 (service ping tests) or the layer2 (service functionalites tests) test category. The program could automatically test the basic level options of WMProxy CLI (glite-wms-job-delegate-proxy, glite-wms-job-list-match, glite-wms-job-status, glite-wms-job-cancel and glite-wms-job-output commands). It provides the users with two major report files (wmproxy-test-result-yyyy-mm-dd-hh:mm:ss.txt and wmproxy-test-log-yyyy-mm-dd-hh:mm:ss.txt). The name convention shows how date and data type to be formatted into the filename. The file "wmproxy-test-result-yyyy-mm-dd-hh:mm:ss.txt" is a kind of option testing checklist. It summarizes the option testing results. The other file "wmproxy-test-log-yyyy-mm-dd-hh:mm:ss.txt" is a log file for tracking the testing output errors when the CLI option tests fail. For the definition of test categories, please visit the URL at https://twiki.cern.ch/twiki/bin/view/LCG/LCGgliteTestWritingGuidelines for more detail information.


OPTIONS

-d <log_dir>

With this option, users are able to specify the directory path where they can have the program report files (wmproxy-test-result-yyyy-mm-dd-hh:mm:ss.txt and wmproxy-test-log-yyyy-mm-dd-hh:mm:ss.txt).

-t <retry_time_interval>

Users are able to set the process timeout control parameter "retry_time_interval", which is measured in seconds. The program will monitor the CLI testing process at the certain time intervals set by the "retryTime" parameter.

-n <retry_interval_number>

Users are able to set the process timeout control parameter "retry_interval_number". For example, if it is set "30", the program will keep monitoring the CLI testing process for at most 30 times or until the testing process has terminated.

-e <wait_time_interval>

Users are allowed to set the time interval (in second) to determine the LB polling frequency while doing the "glite-wms-job-output" CLI test. The program would sleep for a specific time interval after polling the LB.

-w <wait_interval_number>

Users are allowed to set the interval number to determine the polling period. Generally speaking, the polling period can be rougly caculated if you multiply time interval by interval number.

-c <glite_wms.conf>

Users can specify the location of glite wms configuration file used by the program for different testing purposes. By default the program will use the wms configuration file (glite_wms.conf) located in the $GLITE_LOCATION/etc/$vo/ directory when users ignore this option.

--help

With this option, the users can browse the command manaul.


Demonstration

Step 1) Show how to use the CLI of this WMProxy testing script

bash-2.05b$ ./glite-wmproxy-cli-test --help
Usage : glite-wmproxy-test-cli [--help] [-d <logdir>] [-t <retryTime>] [-n <retryNum>] [-e <waitTime>] [-w <waitNum>] [-c <glite_wms.conf>] <jdl>

Step 2) I expected the progam output files to be in the directory "test_result" and the program would monitor the job information at 30 second intervals and could interate at most 20 times.

bash-2.05b$ ./glite-wmproxy-cli-test -d test_result -e 30 -w 20 -c ./conf/glite_wms.conf ./example/hello.jdl > test_report.log&

Step 3) Trace the program log that I redirected the output of running programs to the file "test_report"

bash-2.05b$ cat test_report.log 
********************************************************************************

[TEST glite-wms-job-delegate-proxy command option --config] ...
[RUN] glite-wms-job-delegate-proxy -a --config ./conf/glite_wms.conf
[TEST OK]

[TEST glite-wms-job-delegate-proxy command option --delegationid] ...
[RUN] glite-wms-job-delegate-proxy --config ./conf/glite_wms.conf --delegationid test_delegationid
[TEST OK]

[TEST glite-wms-job-delegate-proxy command option --endpoint] ...
[RUN] glite-wms-job-delegate-proxy -a --config ./conf/glite_wms.conf --endpoint https://lxb2032.cern.ch:7443/glite_wms_wmproxy_server
[TEST OK]

[TEST glite-wms-job-delegate-proxy command option --output] ...
[RUN] glite-wms-job-delegate-proxy -a --config ./conf/glite_wms.conf --noint --output test_result/wmproxy_output/glite-wms-job-delegate-proxy.log
[TEST OK]

********************************************************************************

[TEST glite-wms-job-list-match command option --version] ...
[RUN] glite-wms-job-list-match  --version
[TEST OK]

[TEST glite-wms-job-list-match command option --help] ...
[RUN] glite-wms-job-list-match  --help
[TEST OK]

[TEST glite-wms-job-list-match command option --config] ...
[RUN] glite-wms-job-list-match -a --config ./conf/glite_wms.conf ./example/hello.jdl
[TEST OK]

[TEST glite-wms-job-list-match command option --logfile] ...
[RUN] glite-wms-job-list-match -a --config ./conf/glite_wms.conf --logfile test_result/wmproxy_output/glite-wms-job-list-match.log ./example/hello.jdl
[TEST OK]

[TEST glite-wms-job-list-match command option --delegationid] ...
[RUN] glite-wms-job-list-match --config ./conf/glite_wms.conf --delegationid test_delegationid ./example/hello.jdl
[TEST OK]

[TEST glite-wms-job-list-match command option --rank] ...
[RUN] glite-wms-job-list-match -a --config ./conf/glite_wms.conf --rank ./example/hello.jdl
[TEST OK]

[TEST glite-wms-job-list-match command option --endpoint] ...
[RUN] glite-wms-job-list-match -a --endpoint https://lxb2032.cern.ch:7443/glite_wms_wmproxy_server ./example/hello.jdl
[TEST OK]

[TEST glite-wms-job-list-match command option --noint --output] ...
[RUN] glite-wms-job-list-match -a --config ./conf/glite_wms.conf --noint --output test_result/CEList ./example/hello.jdl
[TEST OK]

********************************************************************************

[TEST glite-wms-job-submit command option --noint --config] ...
[RUN] glite-wms-job-submit -a --noint --config ./conf/glite_wms.conf ./example/hello.jdl
[TEST OK]

[TEST glite-wms-job-submit command option --output] ...
[RUN] glite-wms-job-submit -a --config ./conf/glite_wms.conf --noint --output test_result/wmproxy-test-idfile-2006-06-14-20:55:35 ./example/hello.jdl
[TEST OK]

[TEST glite-wms-job-submit command option --debug] ...
[RUN] glite-wms-job-submit -a --config ./conf/glite_wms.conf --output test_result/wmproxy-test-idfile-2006-06-14-20:55:35 --noint --debug ./example/hello.jdl
[TEST OK]

[TEST glite-wms-job-submit command option --nomsg] ...
[RUN] glite-wms-job-submit -a --config ./conf/glite_wms.conf --output test_result/wmproxy-test-idfile-2006-06-14-20:55:35 --noint --nomsg ./example/hello.jdl
[TEST OK]

[TEST glite-wms-job-submit command option --delegationid] ...
[RUN] glite-wms-job-submit --config ./conf/glite_wms.conf --output test_result/wmproxy-test-idfile-2006-06-14-20:55:35 --noint --delegationid test_delegationid ./example/hello.jdl
[TEST OK]

[TEST glite-wms-job-submit command option --collection] ...
[RUN] glite-wms-job-submit -a --config ./conf/glite_wms.conf --output test_result/wmproxy-test-idfile-2006-06-14-20:55:35 --noint --collection test_result/wmproxy_collection
[TEST OK]

********************************************************************************

[TEST glite-wms-job-status command option --config] ...
[RUN] glite-wms-job-status  --config ./conf/glite_wms.conf https://lxb2032.cern.ch:9000/neugfxd67Oabj7nfHdk_VA
[TEST OK]

[TEST glite-wms-job-status command option --noint --input] ...
[RUN] glite-wms-job-status --config ./conf/glite_wms.conf --noint --input test_result/wmproxy-test-idfile-2006-06-14-20:55:35
[TEST OK]

[TEST glite-wms-job-status command option --logfile] ...
[RUN] glite-wms-job-status --config ./conf/glite_wms.conf --logfile test_result/wmproxy-test-tmp-2006-06-14-20:55:35.log https://lxb2032.cern.ch:9000/neugfxd67Oabj7nfHdk_VA
[TEST OK]

[TEST glite-wms-job-status command option --help] ...
[RUN] glite-wms-job-status  --help
[TEST OK]

[TEST glite-wms-job-status command option --version] ...
[RUN] glite-wms-job-status  --version
[TEST OK]

********************************************************************************

[TEST glite-wms-job-cancel command option --noint --config] ...
[RUN] glite-wms-job-cancel  --noint --config ./conf/glite_wms.conf https://lxb2032.cern.ch:9000/neugfxd67Oabj7nfHdk_VA
[TEST OK]

[TEST glite-wms-job-cancel command option --logfile] ...
[RUN] glite-wms-job-cancel --config ./conf/glite_wms.conf --noint --logfile test_result/wmproxy-test-tmp-2006-06-14-20:55:35.log https://lxb2032.cern.ch:9000/dGdXUl5fr0mNoFDTrftCWQ
[TEST OK]

[TEST glite-wms-job-cancel command option --version] ...
[RUN] glite-wms-job-cancel  --version
[TEST OK]

[TEST glite-wms-job-cancel command option --help] ...
[RUN] glite-wms-job-cancel  --help
[TEST OK]

[TEST glite-wms-job-cancel command option --input] ...
[RUN] glite-wms-job-cancel --config ./conf/glite_wms.conf --noint --input test_result/wmproxy-test-idfile-2006-06-14-20:55:35-new1
[TEST OK]

********************************************************************************

The program starts polling the LB for the bulk job information for at most 20 interations and each interation sleep 30 seconds.

The program will then proceed with the glite-wms-job-output command test as soon as the jobs(https://lxb2032.cern.ch:9000/gf7APcVxxM_WiMF1UcUvGw https://lxb2032.cern.ch:9000/OEuRIgLfZWDIUJ4qIZ-Ifw https://lxb2032.cern.ch:9000/mjfwckeDDzgob-_ldiHeFw) are done.

Trial 1 : Wait until the jobs (https://lxb2032.cern.ch:9000/gf7APcVxxM_WiMF1UcUvGw https://lxb2032.cern.ch:9000/OEuRIgLfZWDIUJ4qIZ-Ifw https://lxb2032.cern.ch:9000/mjfwckeDDzgob-_ldiHeFw) have been terminated successfully
Trial 2 : Wait until the jobs (https://lxb2032.cern.ch:9000/gf7APcVxxM_WiMF1UcUvGw https://lxb2032.cern.ch:9000/OEuRIgLfZWDIUJ4qIZ-Ifw https://lxb2032.cern.ch:9000/mjfwckeDDzgob-_ldiHeFw) have been terminated successfully
Trial 3 : Wait until the jobs (https://lxb2032.cern.ch:9000/gf7APcVxxM_WiMF1UcUvGw https://lxb2032.cern.ch:9000/OEuRIgLfZWDIUJ4qIZ-Ifw https://lxb2032.cern.ch:9000/mjfwckeDDzgob-_ldiHeFw) have been terminated successfully
Trial 4 : Wait until the jobs (https://lxb2032.cern.ch:9000/gf7APcVxxM_WiMF1UcUvGw https://lxb2032.cern.ch:9000/OEuRIgLfZWDIUJ4qIZ-Ifw https://lxb2032.cern.ch:9000/mjfwckeDDzgob-_ldiHeFw) have been terminated successfully
Trial 5 : Wait until the jobs (https://lxb2032.cern.ch:9000/gf7APcVxxM_WiMF1UcUvGw https://lxb2032.cern.ch:9000/OEuRIgLfZWDIUJ4qIZ-Ifw https://lxb2032.cern.ch:9000/mjfwckeDDzgob-_ldiHeFw) have been terminated successfully
Trial 6 : Wait until the jobs (https://lxb2032.cern.ch:9000/gf7APcVxxM_WiMF1UcUvGw https://lxb2032.cern.ch:9000/OEuRIgLfZWDIUJ4qIZ-Ifw https://lxb2032.cern.ch:9000/mjfwckeDDzgob-_ldiHeFw) have been terminated successfully
Trial 7 : Wait until the jobs (https://lxb2032.cern.ch:9000/gf7APcVxxM_WiMF1UcUvGw https://lxb2032.cern.ch:9000/OEuRIgLfZWDIUJ4qIZ-Ifw https://lxb2032.cern.ch:9000/mjfwckeDDzgob-_ldiHeFw) have been terminated successfully
Trial 8 : Wait until the jobs (https://lxb2032.cern.ch:9000/gf7APcVxxM_WiMF1UcUvGw https://lxb2032.cern.ch:9000/OEuRIgLfZWDIUJ4qIZ-Ifw https://lxb2032.cern.ch:9000/mjfwckeDDzgob-_ldiHeFw) have been terminated successfully
Trial 9 : Wait until the jobs (https://lxb2032.cern.ch:9000/gf7APcVxxM_WiMF1UcUvGw https://lxb2032.cern.ch:9000/OEuRIgLfZWDIUJ4qIZ-Ifw https://lxb2032.cern.ch:9000/mjfwckeDDzgob-_ldiHeFw) have been terminated successfully
Trial 10 : Wait until the jobs (https://lxb2032.cern.ch:9000/gf7APcVxxM_WiMF1UcUvGw https://lxb2032.cern.ch:9000/OEuRIgLfZWDIUJ4qIZ-Ifw https://lxb2032.cern.ch:9000/mjfwckeDDzgob-_ldiHeFw) have been terminated successfully
[TEST glite-wms-job-output command option --config] ...
[RUN] glite-wms-job-output  --config ./conf/glite_wms.conf https://lxb2032.cern.ch:9000/mjfwckeDDzgob-_ldiHeFw
[TEST OK]

[TEST glite-wms-job-output command option --list-only] ...
[RUN] glite-wms-job-output --config ./conf/glite_wms.conf --list-only https://lxb2032.cern.ch:9000/OEuRIgLfZWDIUJ4qIZ-Ifw
[TEST OK]

[TEST glite-wms-job-output command option --debug] ...
[RUN] glite-wms-job-output --config ./conf/glite_wms.conf --list-only --debug https://lxb2032.cern.ch:9000/OEuRIgLfZWDIUJ4qIZ-Ifw
[TEST OK]

[TEST glite-wms-job-output command option --logfile] ...
[RUN] glite-wms-job-output --config ./conf/glite_wms.conf --list-only --logfile test_result/wmproxy-test-tmp-2006-06-14-20:55:35.log https://lxb2032.cern.ch:9000/OEuRIgLfZWDIUJ4qIZ-Ifw
[TEST OK]

[TEST glite-wms-job-output command option --noint --dir] ...
[RUN] glite-wms-job-output --config ./conf/glite_wms.conf  --noint --dir test_result/wmproxy_output https://lxb2032.cern.ch:9000/OEuRIgLfZWDIUJ4qIZ-Ifw
[TEST OK]

[TEST glite-wms-job-output command option --input] ...
[RUN] glite-wms-job-output --config ./conf/glite_wms.conf --input test_result/wmproxy-test-idfile-2006-06-14-20:55:35-new2
[TEST OK]

Step 4) Examine if there exists the progrm results in the directory teset_result.

bash-2.05b$ ls ./test_result
wmproxy-test-result-2006-06-14-20:55:35.txt wmproxy-test-log-2006-06-14-20:55:35.txt

Step 5) Take a look at program option testing checklist

bash-2.05b$ cat ./test_result/wmproxy-test-result-2006-06-14-20\:55\:35.txt 
glite-wms-job-delegate-proxy  --config [TEST OK]
glite-wms-job-delegate-proxy  --delegationid [TEST OK]
glite-wms-job-delegate-proxy  --endpoint [TEST OK]
glite-wms-job-delegate-proxy  --output [TEST OK]
glite-wms-job-list-match  --version [TEST OK]
glite-wms-job-list-match  --help [TEST OK]
glite-wms-job-list-match  --config [TEST OK]
glite-wms-job-list-match  --logfile [TEST OK]
glite-wms-job-list-match  --delegationid [TEST OK]
glite-wms-job-list-match  --rank [TEST OK]
glite-wms-job-list-match  --endpoint [TEST OK]
glite-wms-job-list-match  --noint --output [TEST OK]
glite-wms-job-submit  --noint --config [TEST OK]
glite-wms-job-submit  --output [TEST OK]
glite-wms-job-submit  --debug [TEST OK]
glite-wms-job-submit  --nomsg [TEST OK]
glite-wms-job-submit  --delegationid [TEST OK]
glite-wms-job-submit  --collection [TEST OK]
glite-wms-job-status  --config [TEST OK]
glite-wms-job-status  --noint --input [TEST OK]
glite-wms-job-status  --logfile [TEST OK]
glite-wms-job-status  --help [TEST OK]
glite-wms-job-status  --version [TEST OK]
glite-wms-job-cancel  --noint --config [TEST OK]
glite-wms-job-cancel  --logfile [TEST OK]
glite-wms-job-cancel  --version [TEST OK]
glite-wms-job-cancel  --help [TEST OK]
glite-wms-job-cancel  --input [TEST OK]
glite-wms-job-output  --config [TEST OK]
glite-wms-job-output  --list-only [TEST OK]
glite-wms-job-output  --debug [TEST OK]
glite-wms-job-output  --logfile [TEST OK]
glite-wms-job-output  --noint --dir [TEST OK]
glite-wms-job-output  --input [TEST OK]

Step 6) There is no error output in the wmproxy-test-log-2006-06-14-20:55:35.txt since the CLI options are working fine

bash-2.05b$ cat ./test_result/wmproxy-test-log-2006-06-14-20\:55\:35.txt  


Download

glite-wmproxy-cli-test(glite-wmproxy-cli-test) Size:13K MD5:0dee43c49504a8c9ba96e393c346c519


Contact

If you encounter any problem about using the testing scripts, please contact Hui-Min Lin ( Hui-Min.LIN@cern.ch ) by email.


glite-wmproxy-cli-test (last edited 2006-06-15 14:07:20 by HuiminLin)