> For the complete documentation index, see [llms.txt](https://help.connected.illumina.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.connected.illumina.com/clarity-lims/api-and-database/api-docs/automation/automation-testing.md).

# 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.

{% hint style="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.
{% endhint %}

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

<table data-header-hidden><thead><tr><th width="166"></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>-u {user}</td><td>LIMS username</td><td></td></tr><tr><td>-{password}</td><td>LIMS password</td><td></td></tr><tr><td>-l {stepURI}</td><td>LIMS stepURI—the URI of the transient step API resource that invokes the script.</td><td></td></tr><tr><td>-s {status}</td><td>The status the script is reporting (OK, WARNING, or ERROR).</td><td></td></tr><tr><td>-m {message}</td><td>The descriptive message displayed to the user.</td><td></td></tr></tbody></table>

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 src="/files/ieBAoV4B9w8sp2twKUjC" %}

setExitStatus.py.txt:

{% file src="/files/MCR65ldlLf1B4Ge1CkzF" %}

The latest glsapiutil (and glsapiutil3) Python libraries can be found on the [GitHub](https://github.com/Illumina/BaseSpace_Clarity_LIMS) page.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.connected.illumina.com/clarity-lims/api-and-database/api-docs/automation/automation-testing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
