NAME

test-usi-targets - test targets defined in a Torus realm using the USI


SYNOPSIS

test-usi-targets [ -q query ] [ -s skipFile ] [ -l logLevel ] realm


DESCRIPTION

test-usi-targets runs through all the targets described by records in a nominated Torus realm, invoking a suite of tests on each one by means of the USI (aka. MasterKey Connect). It emits a terse report that indicates the status of each target, one per line, each line in the form:

status [udb] displayName

for example:

 OK [galeaone] Academic One File (SRU)
 skip [gale_aone_sru-content] Academic One File (SRU) (CONTENT)
 OK [galebcrc] Business and Company Resource Center TEST
 OK [galecpi] Canadian Periodical Index (SRU)
 syserror [galecd] Computer Database (SRU)

This format is designed for automated comparison. If the output of an old run is saved, then the output of a new run can be compared using diff(1), and it becomes easy to identify targets which have either stopped or started working in the intervening period.

In addition, more detail about errors is emitted on standard error. Typically, this is redirected to a separate file, and can be consulted when trying to debug failing targets.

The following statuses may be generated:

OK

The target tested correctly.

skip

The target was skipped, i.e. it was not tested because its UDB was one of those listed in a skip-file specified by the -s option.

syserror

A system error occurred and an exception was thrown. Details on standard error.

nosearch

No indexes were configured, so no searching could be attempted.

norecords

One or more searches were successfully attempted, but none of them found any records, so no retrieval could be attempted.

countchanged

A search was done that found one or more records, but when it was retried for the retrieval test, a different number of records were returned.

recsyn

The configured record-syntax was not supported for retrieval, e.g. the target is said to support XML record but does not.

notitle

A record was successfully retrieved, but had no title.

nolink

A record was successfully retrieved, but had no link.


OPTIONS

-q query

Test targets whose records within the realm match query. If not specified, then all records' targets are tested.

-s skipFile

If specified, then skipFile is the name of a file that contains the UDBs of targets, one per line, which are not to be tested. Targets that have a UDB in this list are skipped. This is useful to avoid testing content connectors and other known-bad targets.

-l loglevel

level of logging to use in the Torus client library. If specified, should be a comma-separated list of log-level names, such as

 torusop,torus,config
-v

Output the raw values associated with each key.

(Does not rely on the values being frozen Perl objects.)


EXAMPLES

An example invocation:

 $ test-usi-targets -q aone -s .skip -l torusop,torus http://usi.indexdata.com/torus2/searchable.test >output.new 2>error
 $ diff output.old output.new

Test targets that contain the word "aone" (i.e. those pertaining to Gale's Academic ONEFILE database), skipping those listed in the file .skip (probably including the content connector gale_aone_sru-content), logging Torus API operations and their corresponding Web-Service URLs. Use the USI "testing" realm as the source of target information. Save output in output.new and detailed diagnostics for failed targets in error. Compare the results of this run with those of an earlier run.


AUTHOR

Copyright (C) 2011 by Index Data Aps <info@indexdata.com>