-
Task
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
False
-
-
False
-
-
This is a summary about the current tests for the Kiali plugin for backstage:
| Aspect | Unit Tests (Jest) | E2E Tests (Playwright) |
|---|---|---|
| Number of tests | 32 tests | 1 test |
| Test files | 7 files | 1 file |
| Current coverage | 27.97% statements | N/A (not executable) |
| Framework | Jest + React Testing Library | Playwright |
| Configuration | Complete | Incomplete (missing playwright.config.ts) |
| Executable | Yes (yarn test:all) | No (not configured) |
| In CI/CD | Yes (GitHub Actions) | No |
| Backend coverage | 86-93% (excellent) | N/A |
| Frontend coverage | <30% (very low) | N/A |
| Critical areas untested | services/Api.ts (4.31%), main pages | N/A |
| Status | Functional | Not functional |
| Priority | Improve frontend coverage | Configure to enable |
By test:
| Location | Test Files | Current Coverage | Priority | Reason |
|---|---|---|---|---|
| Backend - Clients | plugins/kiali-backend/src/clients/*.test.ts (3 files) | 93.14% | Low | Already well covered |
| Backend - Service | plugins/kiali-backend/src/service/*.test.ts (2 files) | 86.58% | Low | Already well covered |
| Frontend - Plugin Core | plugins/kiali/src/plugin.test.ts (1 file) | <30% | High | Core plugin functionality |
| Frontend - Services | No tests | 4.31% | Critical | Main API client (services/Api.ts) |
| Frontend - Pages | No tests | 9-30% | High | Main user-facing pages |
| Frontend - Store | No tests | 24.56% | High | Global state management |
| Frontend - Components | No tests | 0-50% | Medium | UI components |
| Frontend - Utils | No tests | 15.33% | Medium | Utility functions |
| App Package | packages/app/src/App.test.tsx (1 file) | 94.11% | Low | Already well covered |
| E2E Tests | packages/app/e2e-tests/app.test.ts (1 file) | N/A | Medium | Needs configuration |
Considerations:
- Upstream code runs in a shared repo. This repo is running a GH task: yarn test:all
- Dowstream code: The code is tested locally using rhdh-local. In OpenShift, it should run the latest tag from https://github.com/redhat-developer/rhdh-plugin-export-overlays . There is a Kiali hack script already for this: https://github.com/kiali/kiali/blob/master/hack/backstage/install-kiali-rhdh.sh