test merge-results
test merge-results - Merge manual test results into test manifest
Merge manual test results from test-results/
This command transforms manual test results into test entries and updates the test manifest with aggregated statistics. If no manifest exists, a new one is created. If a manual suite already exists, it is replaced.
Transformation: - Each ManualTestResult becomes a test entry with type "manual" - Scenario name extracted from scenario_id (last path component) - Duration converted from seconds to milliseconds - Package set to "manual", suite set to "manual"
Flags
| Flag | Description |
|---|---|
--module |
Module moniker to merge results for (required) |
--version |
Release version (required) |
Notes
Expected Output:
- Updated test.manifest.json with manual test entries
- Manual suite added/updated in suites object
- Summary counts updated
- Exit code 0 on success, non-zero on error
Examples
Merge manual test results from test-results/<module>/<version>/manual-results.json into the test manifest at out/test/<module>/test.manifest.json.
Synopsis
Description
Transforms manual test results into test entries and updates the test manifest with aggregated statistics. If no manifest exists, a new one is created. If a manual suite already exists, it is replaced with the new results.
This command integrates manual test results into the same test manifest used for automated tests, providing a unified view of all test results across automated and manual testing efforts.
Flags
--module <moniker>(required) - Module moniker to merge results for--version <version>(required) - Release version
Input
Reads from: test-results/<module>/<version>/manual-results.json
This file must have been created by test import-manual command.
Output
Creates or updates: out/test/<module>/test.manifest.json
Output message:
Merged manual test results for eac-commands v1.2.0
Location: out/test/eac-commands/test.manifest.json
Manual tests: 5 passed, 1 failed, 0 skipped
Total tests in manifest: 785
Transformation Logic
Each ManualTestResult becomes a TestEntry in the manifest:
Input (from manual-results.json):
{
"scenario_id": "eac-commands/feature1/manual-scenario",
"status": "passed",
"duration_seconds": 30.2,
"notes": "Test completed successfully",
"error": ""
}
Output (in test.manifest.json):
{
"name": "manual-scenario",
"package": "manual",
"type": "manual",
"suite": "manual",
"status": "passed",
"duration_ms": 30200,
"tags": [],
"file_path": "",
"error": ""
}
Field Mappings
| Source Field | Target Field | Transformation |
|---|---|---|
| scenario_id | name | Extract last path component |
| status | status | Direct copy (passed/failed/skipped) |
| duration_seconds | duration_ms | Convert seconds to milliseconds |
| error | error | Direct copy (if present) |
| notes | (not stored) | Not preserved in manifest |
| evidence | (not stored) | Not preserved in manifest |
| - | package | Set to "manual" |
| - | type | Set to "manual" |
| - | suite | Set to "manual" |
| - | tags | Empty array |
| - | file_path | Empty string |
Manifest Updates
New Manifest Creation
If manifest doesn't exist:
- Creates new manifest with metadata from import_metadata
- Adds manual suite to suites object
- Populates tests array with manual test entries
- Calculates summary statistics
Existing Manifest Update
If manifest exists:
- Removes all existing manual test entries
- Appends new manual test entries
- Replaces manual suite statistics
- Recalculates summary statistics
Manual Suite Statistics
The manual suite in the manifest includes:
{
"suites": {
"manual": {
"run_time": "2026-01-19T12:00:00Z",
"duration_seconds": 120.5,
"tests": {
"total": 6,
"passed": 5,
"failed": 1,
"skipped": 0
}
}
}
}
Summary Updates
The manifest summary aggregates all tests (automated + manual):
Examples
Merge Manual Test Results
Output:
Merged manual test results for eac-commands v1.2.0
Location: out/test/eac-commands/test.manifest.json
Manual tests: 5 passed, 1 failed, 0 skipped
Total tests in manifest: 785
Verify Merged Results
# View test summary
r2r eac show test-summary eac-commands
# View manual suite details
r2r eac show suite manual --module eac-commands
Error Conditions
| Exit Code | Condition |
|---|---|
| 1 | Module flag missing |
| 1 | Version flag missing |
| 1 | Manual results file not found |
| 1 | Invalid JSON in results file |
| 1 | Unknown module |
| 1 | Invalid version format |
Version Format Validation
Accepts both semver and calver formats:
Semver: v1.2.3, v1.2.3-alpha.1, v2.0.0-rc.1
Calver: v2024.01.19, v2026.12.31-hotfix
Workflow Integration
This command is the fourth and final step in the manual testing workflow:
- Export →
test export-manualgenerates scenarios - Execute → Human tester fills in results
- Import →
test import-manualvalidates and stores results - Merge →
test merge-resultsadds to test manifest ← You are here
Viewing Merged Results
Test Summary
Shows aggregated statistics including manual tests.
Manual Suite Details
Shows only manual test results.
All Tests
Lists all tests including manual entries with type "manual".
Common Scenarios
First-Time Merge
If no test manifest exists:
Creates new manifest with only manual tests.
Update Existing Manual Results
To replace previous manual test results:
# Re-import new results
r2r eac test import-manual --input updated-results.json --release v1.2.0 --force
# Re-merge
r2r eac test merge-results --module eac-commands --version v1.2.0
Old manual tests are removed, new ones added.
Merge After Automated Tests
Typical workflow:
# Run automated tests (creates manifest)
r2r eac test eac-commands
# Merge manual results (updates manifest)
r2r eac test merge-results --module eac-commands --version v1.2.0
Manifest now contains both automated and manual test results.
Idempotency
The merge command is idempotent - running it multiple times with the same input produces the same result:
# First merge
r2r eac test merge-results --module eac-commands --version v1.2.0
# Second merge (produces identical manifest)
r2r eac test merge-results --module eac-commands --version v1.2.0
This is safe because:
- All existing manual tests are removed before merge
- New manual tests are added from current import file
- Summary is recalculated from scratch
Best Practices
Run After Import
Always run merge immediately after successful import:
r2r eac test import-manual --input results.json --release v1.2.0 && \
r2r eac test merge-results --module eac-commands --version v1.2.0
Version Consistency
Use the same version for export, import, and merge:
VERSION="v1.2.0"
r2r eac test export-manual --module eac-commands --release $VERSION
r2r eac test import-manual --input results.json --release $VERSION
r2r eac test merge-results --module eac-commands --version $VERSION
CI Integration
In CI pipelines, merge manual results before generating test reports:
# Automated tests
r2r eac test eac-commands
# Merge manual results (if available)
if [ -f "test-results/eac-commands/v1.2.0/manual-results.json" ]; then
r2r eac test merge-results --module eac-commands --version v1.2.0
fi
# Generate reports
r2r eac show test-summary eac-commands
Troubleshooting
Manual Results File Not Found
Solution: Run test import-manual first to create the results file.
Invalid JSON
Solution: Check JSON syntax in manual-results.json file.
Unknown Module
Solution: Verify module moniker with r2r eac show modules.
Invalid Version Format
Solution: Use valid semver or calver format for --version flag.
See Also
- test export-manual - Export manual test scenarios
- test import-manual - Import manual test results
- show test-summary - View aggregated results
- Execute Manual Tests - Full workflow guide
- test Commands
Tutorials | How-to Guides | Explanation | Reference
You are here: Reference — information-oriented technical descriptions of the system.