Metadata-Version: 2.4
Name: qmpass-test-agent
Version: 1.0.3
Summary: Run your Qmpass automated tests on your own machines, securely connected to your Jira projects.
Author: Qmpass
License-Expression: LicenseRef-Proprietary
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: websockets==15.0.1
Requires-Dist: requests==2.34.2
Requires-Dist: psutil==6.1.1
Requires-Dist: truststore==0.10.4
Requires-Dist: robotframework==7.4.2
Requires-Dist: robotframework-browser==19.10.1
Requires-Dist: robotframework-requests==0.9.7
Requires-Dist: robotframework-datadriver==1.11.2
Requires-Dist: robotframework-faker==6.0.0
Requires-Dist: robotframework-databaselibrary==2.3.1
Provides-Extra: postgres
Requires-Dist: psycopg2-binary==2.9.10; extra == "postgres"
Provides-Extra: mysql
Requires-Dist: pymysql==1.1.1; extra == "mysql"
Provides-Extra: salesforce
Requires-Dist: rpaframework==33.0.1; extra == "salesforce"
Provides-Extra: desktop
Requires-Dist: pystray==0.19.5; extra == "desktop"
Requires-Dist: Pillow==11.3.0; extra == "desktop"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: ruff>=0.6.0; extra == "dev"
Requires-Dist: pip-tools>=7.0.0; extra == "dev"
Dynamic: license-file

# Qmpass Test Agent

Run your [Qmpass](https://qmpass.ai) automated tests on your own laptops, servers or virtual
machines — faster feedback, safer releases, and full control over your test environments.

## Requirements

- Python 3.10 or newer
- Node.js 18 or newer (for Browser tests)
- An agent token from Qmpass: **Project settings → Agents → Add agent**

## Install

```bash
pipx install qmpass-test-agent          # or: pipx install "qmpass-test-agent[postgres]" / [mysql] / [salesforce]
qmpass-agent setup                      # one time: installs the browser used by Browser tests
qmpass-agent doctor                     # checks everything below, with a fix for each problem
```

`doctor` checks Python, Robot, Node.js and Chromium, your `AGENT_TOKEN` / `BACKEND_URL`, that
Qmpass can be reached, and that the token is accepted — without starting a session, so it's safe to
run while an agent is already running.

Optional add-ons, only needed if your tests use them:

| Add-on | Install | For tests that |
|---|---|---|
| `postgres` | `pipx install "qmpass-test-agent[postgres]"` | query a PostgreSQL database |
| `mysql` | `pipx install "qmpass-test-agent[mysql]"` | query a MySQL / MariaDB database |
| `salesforce` | `pipx install "qmpass-test-agent[salesforce]"` | work with Salesforce (large install) |

No pipx yet? `brew install pipx` (macOS), `python3 -m pip install --user pipx` (Windows / Linux),
then `pipx ensurepath`.

## Run

Copy the command shown with your agent token in Qmpass, or:

```bash
export AGENT_TOKEN=qmp_agent_…
qmpass-agent run
```

The agent connects to `https://api.qmpass.ai` (set `BACKEND_URL` for other deployments), waits for
jobs, and logs one line when each run starts and finishes.

Useful options: `--worker N` (parallel jobs, up to 5), `--log-file PATH`, `--log-format json`,
`--log-level DEBUG`. Run `qmpass-agent --help` for all commands.

## Update

```bash
pipx upgrade qmpass-test-agent
```

When a newer version is available, `qmpass-agent run` says so in one line at startup (and `doctor`
shows it). The agent never updates itself. Set `QMPASS_AGENT_UPDATE_CHECK=0` to turn the check off.

## Exit codes

| Code | Meaning |
|------|---------|
| 0 | Stopped normally |
| 2 | Configuration error |
| 3 | Refused by the platform (invalid or expired token, agent disabled) — the log says which |
| 4 | Agent too old — run `pipx upgrade qmpass-test-agent` |
| 5 | A prerequisite is missing (e.g. Node.js) — run `qmpass-agent setup` |

## License

Proprietary — for use with a Qmpass subscription. See `LICENSE`.
