feat(5626): Python TRX/Cobertura HTML report; run-test-case.sh; unit-test w…#45
Open
OMpawar-21 wants to merge 1 commit intodevelopmentfrom
Open
feat(5626): Python TRX/Cobertura HTML report; run-test-case.sh; unit-test w…#45OMpawar-21 wants to merge 1 commit intodevelopmentfrom
OMpawar-21 wants to merge 1 commit intodevelopmentfrom
Conversation
…orkflow Adds generate_test_report.py, run-test-case/run-unit-test-case.sh, unit-test workflow, and test project cleanup .
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 local and CI support for unit tests with coverage, and generates an HTML report from TRX + Cobertura using a Python script (no ReportGenerator / .NET 8+ requirement for HTML).
Changes
Scripts/run-unit-test-case.sh— ClearsTestResults, runsdotnet teston the test project with TRX logging and Coverlet (XPlat code coverage).Scripts/run-test-case.sh— Runs tests on the solution, findscoverage.cobertura.xml, invokesScripts/generate_test_report.pyto writeCoverage-<date>/index.htmlunder the test project’sTestResultsfolder.Scripts/generate_test_report.py— Standard-library-only TRX + Cobertura parser; builds HTML (summary, pass rate, coverage tables, tests by class file). Duration removed from the report UI..github/workflows/unit-test.yml— Runsrun-unit-test-case.shon Windows forpushandpull_request(no dorny/test-reporter).Contentstack.Utils.Tests.csproj— Removed duplicateReferenceto a built DLL; aligned test package versions (e.g. Test SDK, coverlet, Newtonsoft) with the management SDK pattern where applicable.How to verify
bash Scripts/run-test-case.sh.../TestResults/Coverage-Contentstack-DotNet-Test-Case-<date>/index.htmlin a browser.Notes
Contentstack.UtilsAPI and package version unchanged.