# FAQ

## Setup and Configuration

### How do I regenerate my SeaLights token?

Generate a new token from the SeaLights dashboard. See [Generating a Token](https://docs.sealights.io/knowledgebase/settings/token-access-and-management#token-list-and-token-creation-2). After generating the token, re-run `npm run setup` — the wizard will use the existing values in `config.json` as defaults and only update the token.

### Can I configure multiple qTest projects?

The tool supports a `defaultProject` in `config.json`, but you can override the project at run time using the `--project` flag or `SL_PROJECT` environment variable:

```bash
npm run report -- --project "AnotherProject"
```

### What if I lose my config.json?

Re-run `npm run setup`. The wizard will create a new `config.json` from scratch. You will need to re-map your users with `npm run manage-user-mapping`, as user lab mappings are stored in `config.json`.

***

## Test Design Mapping

### What happens if a test case moves to a different folder in qTest?

The tool uses a local cache of the Test Design folder structure. If a test case moves, the cache becomes stale and the test may be reported to the wrong stage. Rebuild the cache to fix this:

```bash
npm run build-cache
```

### What are "unmapped" tests?

Tests in the `output/unmapped/` folder were not resolved via Test Design mapping. They were either matched by the simpler `testStageMapping` path fallback, or not matched at all. They still appear in SeaLights reports but may be attributed to incorrect test stages. To reduce unmapped tests, ensure your Test Design mapping covers all active test folders.

### Can I manually edit testDesignMapping in config.json?

Yes. The module IDs in `testDesignMapping.mappedModules` are qTest module IDs. You can find these by inspecting the qTest API or by running `npm run setup` and observing the IDs in the generated config.

***

## Reporting

### How does incremental reporting work?

Each test stage tracks its own last-reported timestamp. On each run, only new executions since that timestamp are sent to SeaLights. This prevents duplicate submissions. Use `--full` to override and re-send a full date range.

See [Incremental Reporting](https://docs.sealights.io/knowledgebase/setup-and-configuration/integrations/qtest-integration/concepts/incremental-reporting) for a full explanation.

### Can I run reports from multiple machines?

Yes, but each machine will maintain its own last-reported timestamps. If two machines report the same data, SeaLights may receive duplicate submissions. We recommend running reports from a single CI/CD runner where possible.

### Why do I see "TODO-lab-id" in my config.json?

The tool automatically discovers qTest user IDs during report generation and adds them to `userLabMapping` with `TODO-lab-id` as a placeholder. This means some test executions are not being reported to SeaLights yet. Run `npm run manage-user-mapping` to assign lab IDs to those users.

***

## Test Optimization Recommendations

### How long until I can use recommendations?

After initial setup and your first reports, SeaLights needs enough test execution and coverage data to train its model. This typically takes a few days of regular reporting. Your SeaLights account team can tell you when the model is ready for your project.

### What does "SL Skipped" mean in qTest?

It is the default skip status applied to tests that SeaLights' Test Optimization recommends skipping for the current code change. It means SeaLights determined that the test is unlikely to be affected by recent code changes and can safely be deferred to a later run. You can configure the status name in `config.json` under `recommendations.skipStatusName`.

### What if the recommendations are wrong?

Run the full test suite for the affected area and report the results to SeaLights. This feedback improves the model over time. If recommendations are consistently inaccurate, contact SeaLights support.

***

## Security

### Is config.json committed to version control?

No. `config.json` is included in `.gitignore` by default. Never remove it from `.gitignore` — it contains credentials.

### Who can access my credentials?

Only users with read access to `config.json` on the file system. Set `chmod 600 config.json` (Linux/macOS) or the Windows equivalent to restrict access to your user only. See [Installation — Secure Your Configuration File](https://docs.sealights.io/knowledgebase/setup-and-configuration/integrations/qtest-integration/installation#secure-your-configuration-file).
