Skip to content

Enhc/dx (3908) - Add test report logic documentation for CMA SDK porting#139

Open
OMpawar-21 wants to merge 1 commit intodevelopmentfrom
enhc/DX-3908
Open

Enhc/dx (3908) - Add test report logic documentation for CMA SDK porting#139
OMpawar-21 wants to merge 1 commit intodevelopmentfrom
enhc/DX-3908

Conversation

@OMpawar-21
Copy link

Summary

Adds a single source-of-truth document for the test report pipeline so other CMA SDKs (and AI agents) can replicate the same setup.


What's included

  • docs/TEST_REPORT_LOGIC.md – Documentation covering:
    • Goals and high-level architecture (TRX → EnhancedTestReport → CI)
    • Repository layout (scripts, workflows, EnhancedTestReport tool, TestReportHelper)
    • Prerequisites (.NET, coverlet, optional ReportGenerator, gitignore)
    • Step-by-step unit pipeline (CI) and full pipeline (local/integration)
    • EnhancedTestReport CLI reference (all supported flags)
    • Structured stdout contract: ##TEST_REPORT_START## / ##TEST_REPORT_END## JSON schema and test lifecycle (Begin → LogRequest/LogResponse/LogAssertion → Flush in finally)
    • Porting checklist for other CMA SDKs (Java, Node, Python, etc.)
    • Maintenance checklist and quick path reference

Why

  • Enables consistent test reporting across CMA SDKs
  • Gives AI agents and new contributors a single doc to implement or port the pipeline
  • Clarifies that --api-surface / --js-api in run-test-case.sh are not yet consumed by EnhancedTestReport

Testing

  • Documentation only; no code or workflow changes.

…line so other CMA SDKs (and AI agents) can replicate the same setup.

## What's included
- **`docs/TEST_REPORT_LOGIC.md`** – Documentation covering:
  - Goals and high-level architecture (TRX → EnhancedTestReport → CI)
  - Repository layout (scripts, workflows, `EnhancedTestReport` tool, `TestReportHelper`)
  - Prerequisites (.NET, coverlet, optional ReportGenerator, gitignore)
  - Step-by-step unit pipeline (CI) and full pipeline (local/integration)
  - EnhancedTestReport CLI reference (all supported flags)
  - Structured stdout contract: `##TEST_REPORT_START##` / `##TEST_REPORT_END##` JSON schema and test lifecycle (Begin → LogRequest/LogResponse/LogAssertion → Flush in `finally`)
  - Porting checklist for other CMA SDKs (Java, Node, Python, etc.)
  - Maintenance checklist and quick path reference
## Why
- Enables consistent test reporting across CMA SDKs
- Gives AI agents and new contributors a single doc to implement or port the pipeline
- Clarifies that `--api-surface` / `--js-api` in `run-test-case.sh` are not yet consumed by EnhancedTestReport
## Testing
- Documentation only; no code or workflow changes.
@OMpawar-21 OMpawar-21 requested a review from a team as a code owner March 10, 2026 12:34
@github-actions
Copy link

We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the next branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch.

@OMpawar-21 OMpawar-21 changed the base branch from main to development March 10, 2026 12:34
@OMpawar-21 OMpawar-21 requested a review from cs-raj March 10, 2026 12:35
@github-actions
Copy link

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 0 ✅ Passed
🔵 Low Severity 0 0 0 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security checks passed

Comment on lines +24 to +30
- name: Upload enhanced HTML report
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: EnhancedReport-Contentstack-DotNet-Test-Case
path: ./Contentstack.Management.Core.Unit.Tests/TestResults/EnhancedReport-Contentstack-DotNet-Test-Case.html
if-no-files-found: warn No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this added to display the report after the workflow run?


### Test reports and security

Generated test artifacts (TRX, coverage HTML, EnhancedReport HTML) **must not be committed**—they can contain stack URLs, tokens, and org data from test output. They are ignored via `.gitignore` under `**/TestResults/` and related patterns. See **[docs/TEST_REPORT_SECURITY.md](docs/TEST_REPORT_SECURITY.md)** for rationale and good practice. No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this here
cc: @netrajpatel

@@ -0,0 +1,42 @@
# Test report artifacts – do not commit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this here
@sunil-lakshman thoughts?
cc: @netrajpatel

}

// 3. 📥 HTTP Responses
if (e.HttpResponses?.Count > 0)
Copy link
Contributor

@cs-raj cs-raj Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the generated HTML report there are cases where the responses are not captured.
cc: @netrajpatel

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.

2 participants