# Commands

The SeaLights qTest Integration Tool provides the following commands. All commands are run from the project root directory.

| Command                                                                                                                                                      | Purpose                                                         | When to Use                                                                  |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| [`npm run setup`](https://docs.sealights.io/knowledgebase/setup-and-configuration/integrations/qtest-integration/commands/setup)                             | Interactive setup wizard                                        | First-time configuration, reconfiguration, or adding new test stage mappings |
| [`npm run report`](https://docs.sealights.io/knowledgebase/setup-and-configuration/integrations/qtest-integration/commands/report)                           | Extract test executions from qTest and report to SeaLights      | On a regular schedule (daily or per test cycle)                              |
| [`npm run recommendations`](https://docs.sealights.io/knowledgebase/setup-and-configuration/integrations/qtest-integration/commands/recommendations)         | Apply Test Optimization recommendations from SeaLights to qTest | Before a test execution cycle                                                |
| [`npm run manage-user-mapping`](https://docs.sealights.io/knowledgebase/setup-and-configuration/integrations/qtest-integration/commands/manage-user-mapping) | Manage user → lab ID assignments                                | After discovering new testers in qTest                                       |
| `npm run build-cache`                                                                                                                                        | Pre-build the Test Design module cache                          | When test cases have moved to different folders in qTest                     |

{% hint style="info" %}
Add `-- --help` to any command to see its available options. For example: `npm run report -- --help`
{% endhint %}

{% hint style="info" %}
Add `-- --debug` to any command to enable verbose logging. Debug output is also sent to SeaLights for support purposes.
{% endhint %}
