CREAM CLI testsuite

A test suite for detailed testing of the command line interface to submit to a CREAM CE.

Developers: Alessio Gianelle, Paolo Andreetto, Sara Bertocco

Location: org.glite.testsuites.ctb/CREAM/CREAM-cli

The test suite covers all the glite-ce-* available commands:

  • glite-ce-service-info
  • glite-ce-delegate-proxy
  • glite-ce-proxy-renew
  • glite-ce-job-submit
  • glite-ce-job-status
  • glite-ce-job-cancel
  • glite-ce-job-suspend
  • glite-ce-job-resume
  • glite-ce-job-purge
  • glite-ce-job-list
  • glite-ce-allowed-submission
  • glite-ce-event-query
  • glite-ce-job-output

These commands could not be tested without adding the test user as a CREAM "super-user":

  • glite-ce-disable-submission
  • glite-ce-enable-submission

The main goal of this testsuite is to check the behaviour of each of the commands listed above, with different meaningful options for every command (options such as help, version and debug are not considered). Testing the behaviour of the service is out of the scope of this suite, the result of the operation on the server side is not considered, nevertheless the command must be able to manage correctly any result reported by the service.

Every command handles a large number of faults and errors reported by the service, reproducing all these errors for each test is not viable; the aim of this suite is to check just the fault handling so where it is possible a single fault, representing a class of errors, is generated and tested.

In several cases the test for a client command requires the execution of another one first, with a well defined set of options, in order to prepare the environment for the test. The latter should be considered as "already tested", so the certifier should follow a specific order in the execution of the testsuite. Each test reports the list of prerequisites.

Most of the scripts contained into the testsuite require the submission of one or more jobs, in general for these submissions a very simple JDL file is used (example.jdl), the executable defined into this jdl is a just simple "sleep" with no ISB/OSB movement.

To execute the tests you need a valid voms proxy accepted by the resource, and you have to define some parameters in the configuration file (test.conf):

# Configuration file for the Cream-CLI test suite

# *REQUIRED*
# Set this to the CREAM resource to test
CREAM="<set this to a valid resource>"

# Optional
# Print debug messages (it could be overwritten by command line option -d)
DEBUG=0 # 0 or 1

# Define "waiting loop" parameters (after NUM_STATUS_RETRIEVALS*SLEEP_TIME
# seconds the job id considered lost and the test failed)
NUM_STATUS_RETRIEVALS=40
SLEEP_TIME=5

# A jdl file used to test commands
JDLFILE=$(dirname $0)/example.jdl

The only required parameter is CREAM.

Every scripts accept the --debug (or -d) option which overwrites the DEBUG parameter setting it to value 1 (some debug informations should be printed in standard output and the working directory is not cleanup at the end of the test).

CREAM-cli-service-info.sh

This script tests the command glite-ce-service-info:
  • TEST 1: check option --version
  • TEST 2: check the service info using various log level
  • TEST 3: check if the --conf option works
  • TEST 4: save info into a logfile to check if --debug and --logfile options work

CREAM-cli-delegation.sh

This script tests the command glite-ce-delegate-proxy:
  • TEST 1: delegate a proxy specifying CREAM URL and delegation ID
  • TEST 2: re-delegate the proxy specified in the previous test
  • TEST 3: check if the --conf option works
  • TEST 4: save info into a logfile to check if --debug and --logfile options work

CREAM-cli-delegation-renew.sh

This script tests the command glite-ce-proxy-renew:
  • TEST 1: renew a proxy specifying CREAM URL and delegation ID
  • TEST 2: try to renew a missing proxy
  • TEST 3: check if the --conf option works
  • TEST 4: save info into a logfile to check if --debug and --logfile options work

Prerequisites: CREAM-cli-delegation.sh

CREAM-cli-job-submit.sh

This script tests the command glite-ce-job-submit:
  • TEST 1: submit a job without mandatory option: --autm-delegation
  • TEST 2: submit a job with automatic delegation (option --autm-delegation)
  • TEST 3: submit a job using a previously delegated credentials (options --delegationId)
  • TEST 4: check if the option --output works
  • TEST 5: check if using again option --output the new joid is append to the existing file
  • TEST 6: check if the --conf option works
  • TEST 7: save info into a logfile to check if --debug and --logfile options work

Prerequisites: CREAM-cli-delegation.sh

CREAM-cli-job-status-simple.sh

This script tests the command glite-ce-job-status:
  • TEST 1: submit a job and then retrieve its status
  • TEST 2: submit a job which surely failed. Check if the final status is the ones expected
  • TEST 3: check the status of a job setting log level to 1 (option --level 1):
  • TEST 4: check the status of a job setting log level to 2 (option --level 2)
  • TEST 5: check if the option --input works
  • TEST 6: check if the --conf option works
  • TEST 7: save info into a logfile to check if --debug and --logfile options work

Prerequisites: CREAM-cli-job-submit.sh

CREAM-cli-job-status-filtered.sh

This script tests the "filtered" options of the command glite-ce-job-status:
  • TEST 1: check if the --from option works:
  • TEST 2: check the --from and --to options together
  • TEST 3: check if the --status option works (using REALLY-RUNNING)
  • TEST 4: check if the --status option works (using DONE-OK)
  • TEST 5: check if the --all option works
  • TEST 6: check the requirements of the --all option (3 cases)

Prerequisites: CREAM-cli-job-submit.sh, CREAM-cli-job-status-simple.sh

CREAM-cli-job-cancel.sh

This script tests the command glite-ce-job-cancel:
  • TEST 1: submit and then cancel a running job
  • TEST 2: try to cancel a terminated job
  • TEST 3: check if the --all option works
  • TEST 4: check the requirements of the --all option (3 cases)
  • TEST 5: check if the --conf option works
  • TEST 6: save info into a logfile to check if --debug and --logfile options work

Prerequisites: CREAM-cli-job-submit.sh

CREAM-cli-job-suspend.sh (it works only with some batch systems)

This script tests the command glite-ce-job-suspend:
  • TEST 1: submit and then suspend a running job
  • TEST 2: check if --all option works
  • TEST 3: try to suspend a terminated job
  • TEST 4: save info into a logfile to check if --debug and --logfile options work
  • TEST 5: check if the --conf option works

Prerequisites: CREAM-cli-job-submit.sh

CREAM-cli-job-resume.sh (it works only with some batch systems)

This script tests the command glite-ce-job-resume:
  • TEST 1: submit, suspend and then resume a running job
  • TEST 2: check if --all option works
  • TEST 3: try to resume a running job
  • TEST 4: save info into a logfile to check if --debug and --logfile options work
  • TEST 5: check if the --conf option works

Prerequisites: CREAM-cli-job-submit.sh, CREAM-cli-job-suspend.sh

CREAM-cli-job-purge.sh

This script tests the command glite-ce-job-purge:
  • TEST 1: purge a finished job
  • TEST 2: try to purge a running job
  • TEST 3: try to purge again a previous purged job
  • TEST 4: purge more finished jobs
  • TEST 5: purge more jobs taking jobIDs from a file (--input option)
  • TEST 6: check if the --all option works
  • TEST 7: check the requirements of the --all option (3 cases)
  • TEST 8: check if the --conf option works
  • TEST 9: save info into a logfile to check if --debug and --logfile options work

Prerequisites: CREAM-cli-job-submit.sh

CREAM-cli-job-list.sh

This script tests the command glite-ce-job-list:
  • TEST 1: check if the command returns the right number of jobs
  • TEST 2: check if the --output option works
  • TEST 3: check if the --conf option works
  • TEST 4: save info into a logfile to check if --debug and --logfile options work

Prerequisites: CREAM-cli-job-submit.sh, CREAM-cli-job-status.sh

CREAM-cli-event-query.sh

This script tests the command glite-ce-event-query:
  • TEST 1: check if the command retrieves all pending events
  • TEST 2: check if the command retrieves the last events
  • TEST 3: check if the --conf option works
  • TEST 4: save info into a logfile to check if --debug and --logfile options work

Prerequisites: CREAM-cli-job-submit.sh, CREAM-cli-job-status.sh, CREAM-cli-job-purge.sh

CREAM-cli-submission-management.sh

This script tests the command glite-ce-allowed-submission:
  • TEST 1: check if the submissions to the CE are allowed
  • TEST 2: check if the --conf option works
  • TEST 3: save info into a logfile to check if --debug and --logfile options work

CREAM-cli-job-output.sh

This script tests the command glite-ce-job-output: test success if all the required (3) files are retrieved, and if the standard output (out.txt) contains the hostname of the worker node where job has been run.
  • TEST 1: output retrieve without option
  • TEST 2: output retrieve with --dir option
  • TEST 3: check --noint option
  • TEST 4: check if --input option works
  • TEST 5: check if command works with multiple JOBID

Prerequisites: CREAM-cli-job-submit.sh, CREAM-cli-job-status.sh

The others two management commands glite-ce-enable-submission and glite-ce-disable-submission should be test only via a "cream super-users"; so they are not considered.

-- AlessioGianelle - 03 Jun 2008


This topic: EgeeJra1It > WebHome > TestPage > CreamCli
Topic revision: r22 - 2011-02-24 - AlessioGianelle
 
This site is powered by the TWiki collaboration platformCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback