Skip to content

Commit 9f48f2d

Browse files
authored
Create TESTS_BACKLOG.md
1 parent a95225a commit 9f48f2d

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

TESTS_BACKLOG.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# ✅ commons-security — Test Coverage & Quality Backlog
2+
3+
This document tracks enhancements and refinements for the test suite across all crypto components
4+
(**AES**, **RSA**, **Digest**, **Signature**, **Password**, **Shamir**, **CryptoUtils**, **Encoding**).
5+
6+
---
7+
8+
## 🥇 Top Priority — Correctness & Determinism
9+
10+
| ✅ / ☐ | Task | Modules |
11+
|:--:|------|----------|
12+
|| Use `StandardCharsets.UTF_8` explicitly in all `getBytes()` / `new String(byte[])` calls | EncodingUtilsTest, DigestUtilsTest, SignatureUtilsTest, PasswordEncoderUtilsTest, CryptoUtilsTest |
13+
|| Add negative AES test: decrypt with wrong password should not equal plaintext | CryptoUtilsTest |
14+
|| Add negative RSA test: decrypt with wrong private key should not equal plaintext | CryptoUtilsTest |
15+
|| Add password mismatch tests (verify false when password differs) | PasswordEncoderUtilsTest |
16+
|| Add signature mismatch tests (wrong key or tampered data) | SignatureUtilsTest |
17+
|| Validate Shamir threshold arguments (`threshold > total` or `< 2` should throw) | ShamirTest |
18+
|| Add at least one known fixed digest vector (e.g. SHA-256 of “OpenAI”) | DigestUtilsTest |
19+
|| Add known fixed signature vector regression test | SignatureUtilsTest |
20+
21+
---
22+
23+
## 🥈 Medium Priority — Completeness & Robustness
24+
25+
| ✅ / ☐ | Task | Modules |
26+
|:--:|------|----------|
27+
|| Verify all combinations of threshold shares reconstruct correctly (3-of-5) | ShamirTest |
28+
|| Verify all generated shares are unique | ShamirTest |
29+
|| Validate prefix format `{ARGON2}`, `{BCRYPT}`, `{SCRYPT}`, `{PBKDF2}` | PasswordEncoderUtilsTest |
30+
|| Verify Argon2 hash does **not** match when checked with BCrypt/Scrypt encoder | PasswordEncoderUtilsTest |
31+
|| Compare `CryptoUtils` AES/RSA results with direct `AesEncryptor`/`RsaCipher` results | CryptoUtilsTest |
32+
|| Add invalid share handling test — ensure exceptions bubble up | CryptoUtilsTest |
33+
34+
---
35+
36+
## 🥉 Low Priority — Polish & Future-Proofing
37+
38+
| ✅ / ☐ | Task | Modules |
39+
|:--:|------|----------|
40+
|| Use `"BC"` provider explicitly in `MessageDigest` / `Signature.getInstance()` | DigestUtilsTest, SignatureUtilsTest |
41+
|| Add Argon2 encoding performance sanity check (`@Timeout(2)`) | PasswordEncoderUtilsTest |
42+
|| Tag large / slow tests (e.g. 100 KB Shamir secret) with `@Tag("slow")` | ShamirTest |
43+
|| Add share encoding idempotence test (double-encoded ≠ valid) | ShamirTest |
44+
|| Add RSASSA-PSS placeholder tests for upcoming modernization | SignatureUtilsTest |
45+
46+
---
47+
48+
## 🧱 Structural / Naming Cleanup
49+
50+
| ✅ / ☐ | Task | Modules |
51+
|:--:|------|----------|
52+
|| Organize tests into feature packages:<br> `encoding/`, `aes/`, `rsa/`, `signature/`, `password/`, `shamir/`, `crypto/` | All |
53+
|| Rename `CryptoUtilsTest``CryptoUtilsIntegrationTest` | crypto |
54+
|| Use `@TestMethodOrder` **only** when order truly matters (e.g. key generation) | KeyUtilsTest |
55+
56+
---
57+
58+
## 🏁 When complete
59+
60+
✅ 100 % functional & negative-path coverage
61+
✅ Deterministic, reproducible results across providers
62+
✅ UTF-8 & provider consistency
63+
✅ Cross-algorithm isolation and regression protection
64+
✅ CI-ready, fast, and maintainable structure

0 commit comments

Comments
 (0)