all passing
mar 26, 2026 ยท 15:28 utc branch main sha 70a732c
Diff Coverage
N/A
no diff available
Coverage
77.0%
branch: 43.4% · threshold: 80%
Suite Duration
0s
40 examples · 0 pending
Slowest Test
0.03s
OrderItem#subtotal_cents multiplies quantity by uni
Factory Creates
67
4 unique factories
peak memory 82 MB cpu 2.5s user / 0.3s sys factory.create events 55
Diff Coverage
Coverage
Performance
Factory Health
Insights
Diff coverage is not available. This report was either generated on the base branch or git diff could not be computed.
File Coverage Breakdown
click a file to view line-by-line coverage
File Line Cov Branch Cov Uncovered Churn (90d) Risk
app/services/pricing_engine.rb
29.2%
0.0% 17 11 779
app/services/payment_service.rb
60.0%
35.7% 10 6 240
app/services/cart_optimizer.rb
71.4%
33.3% 8 6 172
app/models/order.rb
78.6%
37.5% 6 6 128
Test Duration Distribution
40 examples · 0s total
<0.01s
34
0.01โ€“0.05s
6
0.05โ€“0.1s
0
0.1โ€“0.5s
0
0.5โ€“1s
0
>1s
0
Time by Spec File
File Total Time Examples Avg Time Slowest Example
spec/services/shipping_calculator_spec.rb 0.045s 5 0.009s ShippingCalculator#calculate adds weight surcharge for large (0.033s)
spec/jobs/inventory_sync_job_spec.rb 0.044s 2 0.022s InventorySyncJob#perform syncs products for active pharmacy (0.032s)
spec/models/order_item_spec.rb 0.042s 2 0.021s OrderItem#subtotal_cents multiplies quantity by unit price (0.034s)
spec/models/product_spec.rb 0.036s 13 0.003s Product#reserve! decrements stock (0.005s)
spec/models/order_spec.rb 0.033s 7 0.005s Order#recalculate_total! sums order item subtotals (0.014s)
spec/services/payment_service_spec.rb 0.019s 3 0.006s PaymentService#capture! captures confirmed orders (0.015s)
spec/services/cart_optimizer_spec.rb 0.016s 2 0.008s CartOptimizer#optimize returns the cheapest pharmacy (0.01s)
spec/models/pharmacy_spec.rb 0.009s 6 0.002s Pharmacy validations requires unique code (0.003s)
Slowest Examples (top 20)
click a test to view source
Example File Duration Status
OrderItem#subtotal_cents multiplies quantity by unit price spec/models/order_item_spec.rb :5 0.03s pass
ShippingCalculator#calculate adds weight surcharge for large orders spec/services/shipping_calculator_spec.rb :26 0.03s pass
InventorySyncJob#perform syncs products for active pharmacy spec/jobs/inventory_sync_job_spec.rb :13 0.03s pass
PaymentService#capture! captures confirmed orders spec/services/payment_service_spec.rb :18 0.01s pass
Order#recalculate_total! sums order item subtotals spec/models/order_spec.rb :51 0.01s pass
InventorySyncJob#perform skips inactive pharmacies spec/jobs/inventory_sync_job_spec.rb :17 0.01s pass
CartOptimizer#optimize returns the cheapest pharmacy spec/services/cart_optimizer_spec.rb :6 0.01s pass
OrderItem callback recalculates order total on save spec/models/order_item_spec.rb :13 0.01s pass
CartOptimizer#optimize raises when no pharmacies available spec/services/cart_optimizer_spec.rb :16 0.01s pass
Order#ship! ships confirmed orders spec/models/order_spec.rb :26 0.01s pass
Product#reserve! decrements stock spec/models/product_spec.rb :69 0.01s pass
Product scopes .in_stock returns products with stock > 0 spec/models/product_spec.rb :38 0.01s pass
Product scopes .active returns only active products spec/models/product_spec.rb :32 0.01s pass
Product scopes .by_category filters by category spec/models/product_spec.rb :44 0.01s pass
Order#deliver! delivers shipped orders spec/models/order_spec.rb :40 0.0s pass
ShippingCalculator#calculate returns express shipping cost spec/services/shipping_calculator_spec.rb :13 0.0s pass
Order#confirm! sets status to confirmed spec/models/order_spec.rb :18 0.0s pass
ShippingCalculator#calculate returns standard shipping cost spec/services/shipping_calculator_spec.rb :7 0.0s pass
Product validations requires unique minsan_code spec/models/product_spec.rb :19 0.0s pass
Pharmacy validations requires unique code spec/models/pharmacy_spec.rb :14 0.0s pass
Event Profiling (factory.create)
55 events · 00:00.182 of 00:00.251 (72.31%)
Suite Event Time Events Examples % of Run
72.31%) Total events 00:00.039 3 2 91.37%
spec/services/shipping_calculator_spec.rb 00:00.037 12 5 82.02%
spec/jobs/inventory_sync_job_spec.rb 00:00.037 12 2 83.11%
spec/models/product_spec.rb 00:00.017 9 13 47.43%
spec/models/order_spec.rb 00:00.017 7 7 52.05%
Factory Usage Ranking
click a factory to view details 67 total creates · 00:00.183
Factory Creates Top-Level Cascade Ratio Time
:product 35 24 1.5x 0.1s
:order 15 14 1.1x 0.0s
:order_item 11 11 1.0x 0.1s
:pharmacy 6 6 1.0x 0.0s
🔥
High-Risk Files
high churn + low coverage
files changed >5 times in 90 days with <70% coverage. these are where bugs are most likely to ship.
File Coverage Churn Risk Score
app/services/pricing_engine.rb 29.2% 11 commits 779
app/services/payment_service.rb 60.0% 6 commits 240
⏱️
Over-Tested Files
high coverage + very slow
No over-tested files detected.
🎭
False Security
>70% time in hooks
No false security issues detected.
⚠️
Untested Hot Paths
active development + low coverage
files with >10 commits in 90 days and <40% test coverage. these are being actively worked on with insufficient testing.
File Churn
app/services/pricing_engine.rb 11 commits