Automation Testing

Use the setExitStatus.py Python script, attached to this page, to test and simulate the use of the automation triggers within Clarity LIMS.

circle-info

The setExitStatus.py script is designed to illustrate concepts for API training purposes. Do not use in a production environment.

The setExitStatus.py script relies on the presence of the glsapiutilv2.py script. Typically, both scripts are located in the same directory.

The setExitStatus.py script uses the following command-line parameters:

-u {user}

LIMS username

-{password}

LIMS password

-l {stepURI}

LIMS stepURI—the URI of the transient step API resource that invokes the script.

-s {status}

The status the script is reporting (OK, WARNING, or ERROR).

-m {message}

The descriptive message displayed to the user.

An example of a parameter string that invokes this script from Clarity LIMS is provided in the following. Note the use of the stepURI token in the -l parameter.

python /opt/gls/clarity/customextensions/setExitStatus.py -l {stepURI:v2:http} \

-u {username} -p {password} -s "OK" -m "successful"

Attachments

glsapiutilv2.py:

file-download
3KB

setExitStatus.py.txt:

file-download
992B

The latest glsapiutil (and glsapiutil3) Python libraries can be found on the GitHubarrow-up-right page.

Last updated

Was this helpful?