Test Suite Overview
| Metric | Value |
|---|
| Total test cases | 62 |
| Cypress (end-to-end) tests | 23 |
| JUnit (server-side) tests | 39 |
| Edge case tests | 9 |
| Features covered | 11 |
Test Distribution:
JUnit (server) ██████████████████████████████████████████ 39 (63%)
Cypress (E2E) █████████████████████████ 23 (37%)
Feature Coverage
The following table shows which features have automated test coverage and how many edge cases are explicitly tested.
| Feature | Tests | Edge Cases | Coverage Level |
|---|
| Risk management | 38 | 5 | High |
| Enum fields | 13 | 4 | High |
| Columns | 11 | 4 | Medium |
| General operations | 6 | 0 | Medium |
| Filtering | 4 | 3 | Medium |
| Export (Excel/PDF) | 4 | 0 | Low |
| Undo/redo | 4 | 0 | Low |
| Persistence (save) | 3 | 0 | Low |
| Configuration | 2 | 0 | Low |
| PDF export | 2 | 0 | Low |
| Data loading | 1 | 0 | Minimal |
“High” means the feature has both happy-path and edge-case tests. “Low” means only basic functionality is verified. Features not listed (e.g., reviews, formulas, cross-project) have no dedicated automated tests.
Edge Cases Tested
Edge case tests validate behavior under unusual or boundary conditions. These are the 9 documented edge cases:
Boundary Conditions
| Test | Suite | What It Validates |
|---|
testMaximalize | RisksheetTest (JUnit) | Grid behavior at maximum capacity |
Duplicate/Conflict Handling
| Test | Suite | What It Validates |
|---|
testTaskDuplicate | RisksheetTest (JUnit) | Duplicate task link prevention |
| Test | Suite | What It Validates |
|---|
testPasteNonExistingFuncItem | RisksheetTest (JUnit) | Paste of non-existent function item |
testEmptyFmMergeCause | RisksheetTest (JUnit) | Cell merging with empty failure mode |
| Test | Suite | What It Validates |
|---|
testEnterInvalidFuncItem | RisksheetTest (JUnit) | Entry of invalid function item reference |
| Dependent enum filter (continent) | Cypress E2E | Invalid options filtered after parent selection |
| Dependent enum filter (country) | Cypress E2E | Cascading filter on country change |
| Dependent enum filter (state) | Cypress E2E | Final-level cascading filter |
| Clear invalid values on reassignment | Cypress E2E | All child values cleared on parent change |
Test Suites Detail
RisksheetTest (JUnit) — 35 tests
The primary server-side test suite covering core risk management operations:
- CRUD operations: Create, read, update, delete risk items and tasks
- Cell merging: Level 1 and Level 2 merge behavior after add/remove
- Formulas: RPN calculation verification
- Undo/redo: Add, remove, and counter operations
- Save/persist: Data round-trip through Polarion API
- UI operations: Search, context menu, checkbox, enum, date, time, percent fields
- Help: Help page accessibility
Dependent Enumeration Tests (Cypress) — 12 tests
Comprehensive E2E tests for dependent (cascading) enum fields:
- Single-select enums (7 tests): Continent > Country > State cascading with validation
- Multi-select enums (5 tests): Shipping > Payment > Currency cascading
Export Tests (Cypress) — 4 tests
- Excel export before and after changes
- PDF export before and after changes
Other Suites
| Suite | Tests | Focus |
|---|
| ComparisonTest | 3 | Baseline comparison UI |
| RevisionTest | 1 | Historical revision loading |
| Risk creation flow | 2 | E2E risk creation from toolbar and context menu |
| Resolved config properties | 2 | Configuration property resolution |
| Mitigation task type | 2 | Task type display name |
| Compare filter | 1 | Filter button visibility in comparison mode |
Untested Areas
The following features lack dedicated automated tests:
| Feature | Risk Level | Notes |
|---|
| Review workflows | Medium | Comment, approval, and work item-based reviews |
| Formula evaluation | Medium | Complex formulas with multiple references |
| Cross-project linking | High | Multi-project task resolution |
| Custom renderers | Low | JavaScript-based cell rendering |
| Cell decorators | Low | Conditional CSS application |
| Multi-level hierarchy (3+ levels) | Medium | Deep nesting behavior |
| Baseline freezing | Medium | Downstream items at revision |
| Configuration inheritance | Medium | Template-to-document fallback |
| Permissions enforcement | High | Role-based field restrictions |
| Large document performance | High | 500+ work items |
When adding new features or fixing bugs, consider adding test cases to the relevant suite. Cypress tests live in com.nextedy.risksheet.tests/cypress/e2e/ and JUnit tests in com.nextedy.risksheet.tests/src/test/java/.
Assertion Patterns
The test suites use these assertion styles:
| Pattern | Usage Count | Framework |
|---|
.should() | 21 | Cypress |
assertEquals() | 19 | JUnit |
assertTrue() | 13 | JUnit |
expect() | 4 | Cypress |
assertNotNull() | 1 | JUnit |
Related Pages