Skip to content

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Dec 4, 2025

Summary

  • Add 411 comprehensive tests across 7 new test files
  • Exclude pjs-bench and pjs-demo from codecov coverage reports
  • Fix coverage generation workflow syntax

Coverage Improvement

Metric Before After Change
Overall 62.55% 72.79% +10.24pp
Tests 537 892 +355

Layer Coverage

Layer Requirement Result
Domain business logic 80% 87.6%
Application layer 70% 88.7%
Infrastructure 60% 72.3%

New Test Files

pjs-core (7 files, 331 tests)

File Tests Coverage Impact
compression_streaming_integration.rs 40 stream/compression: 0% → 64%
domain_ports_test.rs 64 ports: 0% → 100%
parser_value_comprehensive.rs 65 parser/value.rs: 30% → 86%
parser_simd_zero_copy_comprehensive.rs 84 simd_zero_copy.rs: 35% → 46%
infrastructure_integration_comprehensive.rs 78 integration: 0% → 50-62%

pjs-domain (2 files, 80 tests)

File Tests Coverage Impact
stream_comprehensive.rs 49 entities/stream.rs: 57% → 87%
events_comprehensive.rs 31 events/mod.rs: 59% → 88%

Key Improvements

Previously 0% Coverage → Now Tested

  • object_pool.rs: 0% → 60.74%
  • simd_acceleration.rs: 0% → 62.61%
  • streaming_adapter.rs: 0% → 44.89%
  • universal_adapter.rs: 0% → 48.60%
  • stream/compression_integration.rs: 0% → 64%
  • domain/ports/*: 0% → 100%

Major Improvements

  • parser/value.rs: 30% → 86% (+56pp)
  • entities/stream.rs: 57% → 87% (+30pp)
  • events/mod.rs: 59% → 88% (+29pp)

CI/CD Updates

  • Exclude pjs-bench and pjs-demo from coverage generation (--exclude)
  • Filter excluded crates from reports (--ignore-filename-regex)
  • Fix cargo llvm-cov nextest command syntax

Test Plan

  • All 892 tests passing
  • Coverage report generates without demo/bench crates
  • No clippy warnings
  • All coverage targets met
  • cargo +nightly fmt --check passes

- Add comprehensive integration tests for compression streaming (40 tests)
- Add domain ports unit tests (64 tests)
- Exclude pjs-bench and pjs-demo from coverage generation
- Use --ignore-filename-regex to filter out excluded crates from reports

Coverage improvement: 62.55% → 70.03% (excluding demo/bench)
Eliminated zero-coverage modules:
- stream/compression_integration.rs: 0% → 64.33%
- domain/ports/mod.rs: 0% → 100%
- domain/ports/writer.rs: 0% → 100%
@codecov-commenter
Copy link

codecov-commenter commented Dec 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #40      +/-   ##
==========================================
+ Coverage   62.74%   68.57%   +5.82%     
==========================================
  Files          68       68              
  Lines       16584    16584              
==========================================
+ Hits        10406    11372     +966     
+ Misses       6178     5212     -966     
Flag Coverage Δ
unittests 68.57% <ø> (+5.82%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 12 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 663ba47...6202142. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

WASM Bundle Size Report

Target Raw (KB) Gzipped (KB) Status
web 155 70 ✓ PASS
nodejs 156 70 ✓ PASS
bundler 155 70 ✓ PASS

@bug-ops bug-ops force-pushed the test/improve-coverage-exclude-demo-bench branch from bf72871 to 681145a Compare December 4, 2025 16:49
@github-actions
Copy link

github-actions bot commented Dec 4, 2025

WASM Bundle Size Report

Target Raw (KB) Gzipped (KB) Status
web 155 70 ✓ PASS
nodejs 156 70 ✓ PASS
bundler 155 70 ✓ PASS

Add 229 new tests to improve coverage:

Parser tests (pjs-core):
- parser_value_comprehensive.rs (65 tests): value.rs 30% → 86%
- parser_simd_zero_copy_comprehensive.rs (84 tests): simd_zero_copy.rs 35% → 46%

Domain tests (pjs-domain):
- stream_comprehensive.rs (49 tests): stream.rs 57% → 87%
- events_comprehensive.rs (31 tests): events/mod.rs 59% → 88%

Coverage: 62.55% → 70.36% (+7.81pp)
All 814 tests passing
@bug-ops bug-ops force-pushed the test/improve-coverage-exclude-demo-bench branch from 681145a to 8f589d0 Compare December 4, 2025 16:51
@github-actions
Copy link

github-actions bot commented Dec 4, 2025

WASM Bundle Size Report

Target Raw (KB) Gzipped (KB) Status
web 155 70 ✓ PASS
nodejs 156 70 ✓ PASS
bundler 155 70 ✓ PASS

Add comprehensive tests for infrastructure/integration layer:
- object_pool.rs: 0% → 60.74% (30 tests)
- simd_acceleration.rs: 0% → 62.61% (24 tests)
- streaming_adapter.rs: 0% → 44.89% (14 tests)
- universal_adapter.rs: 0% → 48.60% (10 tests)

Fix clippy warnings in existing tests:
- Replace drop() with let _ = for non-Drop types
- Replace match with if let for single patterns
- Replace vec![] with array literals

Coverage: 70.36% → 72.79%
Total tests: 814 → 892
@github-actions
Copy link

github-actions bot commented Dec 4, 2025

WASM Bundle Size Report

Target Raw (KB) Gzipped (KB) Status
web 155 70 ✓ PASS
nodejs 156 70 ✓ PASS
bundler 155 70 ✓ PASS

@bug-ops bug-ops merged commit 60a9031 into main Dec 4, 2025
29 checks passed
@bug-ops bug-ops deleted the test/improve-coverage-exclude-demo-bench branch December 4, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants