Enhc/dx (3908) - Add test report logic documentation for CMA SDK porting#139
Enhc/dx (3908) - Add test report logic documentation for CMA SDK porting#139OMpawar-21 wants to merge 1 commit intodevelopmentfrom
Conversation
…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.
|
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. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
| - 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 |
There was a problem hiding this comment.
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 |
| @@ -0,0 +1,42 @@ | |||
| # Test report artifacts – do not commit | |||
There was a problem hiding this comment.
We don't need this here
@sunil-lakshman thoughts?
cc: @netrajpatel
| } | ||
|
|
||
| // 3. 📥 HTTP Responses | ||
| if (e.HttpResponses?.Count > 0) |
There was a problem hiding this comment.
I checked the generated HTML report there are cases where the responses are not captured.
cc: @netrajpatel
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:##TEST_REPORT_START##/##TEST_REPORT_END##JSON schema and test lifecycle (Begin → LogRequest/LogResponse/LogAssertion → Flush infinally)Why
--api-surface/--js-apiinrun-test-case.share not yet consumed by EnhancedTestReportTesting