Documentation Index
Fetch the complete documentation index at: https://docs.mangrovesystems.com/llms.txt
Use this file to discover all available pages before exploring further.
- Design comprehensive test datasets for your project
- Calculate expected outputs before running tests
- Test edge cases: missing data, extreme values, and boundary conditions
- Use Analytics and Data Inputs views to validate results
Designing test datasets
A good test dataset covers three scenarios: happy path, edge cases, and error cases.- Happy path
- Edge cases
- Error cases
| Event Type | Count | Typical Values |
|---|---|---|
| Feedstock Receipt | 5 | 8-15 t wet mass, 10-20% moisture |
| Lab Analysis | 3 | 75-85% carbon, 0.2-0.5 H:C ratio |
| Biochar Delivery | 4 | 2-6 t biochar |
| Energy Consumption | 1 | 10,000 kWh, 500 gal propane |
| Transportation | 4 | 100-250 km per delivery |
Calculating expected outputs
Before running the pipeline, calculate the expected output for each test scenario by hand or in a spreadsheet. This is critical — without expected values, you can’t tell if the output is correct.Set up a spreadsheet
Enter your test data
Calculate batch-level outputs
| Delivery | Mass (t) | Carbon % | Gross tCO2e | Alloc. Elec | Alloc. Propane | Transport | Net tCO2e |
|---|---|---|---|---|---|---|---|
| DEL-001 | 3 | 80% | 8.81 | 1.25 | 0.61 | 0.11 | 6.84 |
| DEL-002 | 5 | 78% | 14.31 | 2.09 | 1.02 | 0.14 | 11.06 |
| DEL-003 | 4 | 82% | 12.04 | 1.67 | 0.82 | 0.13 | 9.42 |
| DEL-004 | 2 | 79% | 5.80 | 0.83 | 0.41 | 0.09 | 4.47 |
| Total | 14 | 40.96 | 5.84 | 2.86 | 0.47 | 31.79 |
Validating results in Mangrove
After running Generate Batches, use these views to validate:Data Inputs view
Check that all events were created correctly:- Event count matches expected
- Datapoint values are correct
- Evidence is attached where required
- Date ranges are within the accounting period
Batch outputs
For each batch, verify:- Gross carbon matches your spreadsheet
- Allocated emissions are proportional to mass
- Transport emissions are assigned to the correct batch
- Net carbon = gross - total emissions
Ledger balances
Check that each ledger reconciles:- Credits (incoming batches) match expected values
- Debits (allocations to downstream ledgers) are correct
- Running balance makes physical sense
Systematic edge case testing
For each edge case, follow this pattern: Edge cases to test for Mangrove Biochar:| Edge Case | Expected Behavior |
|---|---|
| Moisture = 50% | Dry mass is halved; all downstream values proportionally reduced |
| H:C ratio = 0.75 | Permanence factor = 0.7 (lowest tier); net carbon is lower |
| Mass = 0.5 t | Very small batch; emissions may be a large proportion of gross carbon |
| Distance = 0 km | Transport emissions = 0; only shared emissions allocated |
| Carbon content = 95% | High carbon; verify no overflow or rounding errors |
Check your understanding
Why should you calculate expected outputs before running the pipeline?
Why should you calculate expected outputs before running the pipeline?
What are the 3 types of test scenarios you should create?
What are the 3 types of test scenarios you should create?
Next, learn about common problems and how to fix them in Lesson 5.3: Common Integration Pitfalls.