> For the complete documentation index, see [llms.txt](https://help.bioinsight.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.bioinsight.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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
