# Load And Test

> Rebuild CDS artifacts, reload SQLite fixture data, and run the full test suite. Use after schema or service changes.

- Skill: `sap-samples/load-and-test` (Agent Skill)
- Install (CLI): `npx skillmds@latest add sap-samples/load-and-test`
- Raw SKILL.md: https://api.skillmd.com/api/skills/sap-samples/load-and-test/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: sap-samples (https://skillmd.com/u/sap-samples)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/sap-samples/load-and-test

---


Run the following commands **sequentially** from the `cap/` directory. Each step depends on the previous one succeeding.

## Steps

1. **Build CDS artifacts and typed models**
   ```bash
   cd cap && npm run build
   ```
   This runs `cds build` and regenerates `@cds-models/` via `@cap-js/cds-typer`.

2. **Reload SQLite fixture data**
   ```bash
   cd cap && npm run load_sqlite
   ```
   Runs `convertData.js` with the SQLite profile to populate `db.sqlite`.

3. **Run full test suite**
   ```bash
   cd cap && npm test
   ```
   Runs model + handler tests with a 60-second timeout.

## Rules

- **Stop on failure.** If any step fails, report the error immediately. Do not continue to the next step.
- **Report results.** After all steps pass, summarize: build status, data load count, and test results (pass/fail/skip counts).

