> For the complete documentation index, see [llms.txt](https://miamiohlib.gitbook.io/software-checkout/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://miamiohlib.gitbook.io/software-checkout/testing.md).

# Testing

### Unit tests

Run unit tests with `npm test`.

Note: `./test/models/AdobeApi-async.test.js` tests the integration of the code with the Adobe User Management API. It requires a locally-created file, `/config/test/adobe.testConf.js` to have been prepared with an Adobe group using a real vendorGroupId; there are also some variables that must be set up with the email addresses of valid, current, local users. Create this file by copying the `/config/test/adobe.testConf.sample.js` file to `/config/test/adobe.testConf.js` and editing it with your local information.

### Demo parts of the app

The `demo` folder contains a few command-line scripts that can be used to test parts of the app without running the whole thing.

* `node demo/libCalApi.js` - test the LibCal API
  * this script will prompt you with a list of software packages and ask you to select one; it will retrieve the current booking for that package and display the results
* `node demo/adobeApi.js` - test the Adobe API
  * this will let you fetch the list of current entitlements for a given license group, and add or subtract a user from that group
  * relies on the `config/appConf.js` file to identify the license group to use, and on the `config/adobe.js` file to identify the API credentials
* `node demo/jamfApi.js` - test the Jamf API
  * this will let you fetch the list of current users in a given license group, and add or subtract a user from that group
  * relies on the `config/appConf.js` file to identify the license group to use, and on the `config/jamf.js` file to identify the API credentials


---

# 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, and the optional `goal` query parameter:

```
GET https://miamiohlib.gitbook.io/software-checkout/testing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
