Files
tilbudgivern/docs/UI_TESTING_SETUP.md
T

52 lines
882 B
Markdown

# UI-test med Playwright og Selenium
## Forudsætninger
```bash
npm ci
cd tests && npm ci
```
Lokale UI-tests forventer den samlede server på `http://localhost:4032`.
## Playwright
Start applikationen i én terminal:
```bash
npm run dev
```
Kør derefter testen i en anden terminal:
```bash
npm run test:pw:local
```
Andre nyttige kommandoer:
```bash
npm run test:pw:headed
npm run test:pw:ui
npm run test:pw:report
```
Kør en enkelt test med:
```bash
cd tests
PLAYWRIGHT_BASE_URL=http://localhost:4032 npx playwright test path/to/test.spec.js
```
## Selenium
```bash
npm run test:selenium:local
```
## Resultater
- Playwright-output gemmes under `tests/test-results/` og `tests/playwright-report/`.
- Testartefakter må ikke committes.
- Dokumentér den konkrete kommando og resultatet i PR'en; behold ikke gamle beståelsesprocenter som permanent dokumentation.