Adds/updates the Enhanced Test Report tool that generates an HTML report from test results (TRX) and optional code coverage (Cobertura). The report provides a single view of test outcomes and coverage for the Contentstack Management .NET SDK.#137
Draft
OMpawar-21 wants to merge 10 commits intodevelopmentfrom
Draft
Adds/updates the Enhanced Test Report tool that generates an HTML report from test results (TRX) and optional code coverage (Cobertura). The report provides a single view of test outcomes and coverage for the Contentstack Management .NET SDK.#137OMpawar-21 wants to merge 10 commits intodevelopmentfrom
OMpawar-21 wants to merge 10 commits intodevelopmentfrom
Conversation
…BulkUnpublishService.cs.
Description
In BulkUnpublishService.cs, two comment-only lines were added to document an alternative way of sending the bulk unpublish options:
skip_workflow_stage_check – A commented call AddQueryResource("skip_workflow_stage_check", "true") was added next to the existing Headers["skip_workflow_stage_check"] = "true" assignment.
approvals – A commented call AddQueryResource("approvals", "true") was added next to the existing Headers["approvals"] = "true" assignment.
…add integration tests - Bulk publish/unpublish: send skip_workflow_stage_check and approvals as query params via AddQueryResource instead of headers (BulkPublishService; BulkUnpublishService already used query params). - Unit tests: in BulkPublishServiceTest, BulkUnpublishServiceTest, and BulkOperationServicesTest, assert on QueryResources instead of Headers for these two flags. - Integration tests: add EnsureBulkTestContentTypeAndEntriesAsync() so bulk_test_content_type and at least one entry exist; add Test003a (bulk publish with skipWorkflowStage and approvals) and Test004a (bulk unpublish with same flags).
…ndling Integration tests (Contentstack015_BulkOperationTest): - API version 3.2: - Test003b: bulk publish with skipWorkflowStage, approvals, and apiVersion "3.2" (api_version header). - Test004b: bulk unpublish with skipWorkflowStage, approvals, and apiVersion "3.2" (api_version header). - Error handling and assertions: - Add FailWithError(operation, ex) to report HTTP status, ErrorCode, and API message on ContentstackErrorException. - In Test003a, Test004a, Test003b, Test004b: assert response.StatusCode == HttpStatusCode.OK and use FailWithError in catch. - Add Test004c: negative test for bulk unpublish with invalid data (empty entries, non-existent env); expect ContentstackErrorException and assert non-success status and presence of error message. - Usings: System.Net (HttpStatusCode), Contentstack.Management.Core.Exceptions (ContentstackErrorException).
…3a/004a/003b/004b), and 422/141 handling with console output. Ensure environment (find/create bulk_test_env) and workflow “oggy” (find/create with branches/stages) in ClassInitialize; add Test000c for environment; update Test000a/000b with find-or-create and Branches; Test002 creates five entries and assigns workflow stages; Test003a/004a/003b/004b use bulkTestEnvironmentUid, PublishWithReference, and skipWorkflowStage/approvals (003b/004b with api_version 3.2); treat 422 ErrorCode 141 as expected and log full message to console; fix UnPublish → Unpublish.
…ulk_UnPublish_With_SkipWorkflowStage_And_Approvals Added Proper Assertion and Status Code Mapping
…play - Group tests by source file/class: parse TRX TestDefinitions for className, add ByClass grouping, and render sections as e.g. Contentstack001_LoginTest.cs with tests listed under each. Fall back to ByAssembly when no class info. - Show "All files" code coverage at top: move the overall coverage block (Statements, Branches, Functions, Lines) to appear right after the test summary so it’s visible without scrolling. Code coverage section below contains only the per-file table. - Improve code coverage UI: dedicated All files card with clear labels, per-file table with caption and improved spacing, and color cues for low/mid coverage (red/yellow). Table shows File, Statements, Branches, Functions, Lines, and Uncovered line #s in a clear layout. - Render request/response headers in a single block: display headers as "name: value" lines in a <pre> block when tests supply header data, for a consistent, readable format.
…t Report
- Remove SDK comparison section (.NET vs JS CMA) and all support for it:
--js-api option, LoadJsApi(), AppendSdkComparisonSection(), JsApiEntry.
- Remove method-wise test coverage section and all support for it:
--api-surface option, LoadApiSurface(), BuildMethodToTestsMap(),
SdkMethodToNormalizedKey(), AppendMethodCoverageSection(), ApiSurfaceEntry.
- Report now includes only:
- Test results summary (Total, Passed, Failed, Skipped, Duration)
- Test groups by class/assembly with expandable cases (assertions,
HTTP requests/responses, errors, context)
- Code coverage when Cobertura XML is provided (--cobertura /
--cobertura-dir): "All files" summary and per-file coverage table.
- Help text updated to drop api-surface and js-api; cobertura options
retained for code coverage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds/updates the Enhanced Test Report tool that generates an HTML report from test results (TRX) and optional code coverage (Cobertura). The report provides a single view of test outcomes and coverage for the Contentstack Management .NET SDK.
What the report includes
Test results
Code coverage (optional)
When Cobertura XML is provided:
Usage
--trx <path>--trx-dir <dir>*.trxfiles (recursive).--cobertura <path>--cobertura-dir <dir>coverage.cobertura.xml(recursive).--output <path>EnhancedTestReport.html).--help,-hExamples
Test results only
EnhancedTestReport --trx-dir ./TestResults --output report.html
Test results + code coverage
EnhancedTestReport --trx-dir ./TestResults --cobertura-dir ./TestResults --output report.html