enhc: add integration test coverage for locale, webhook, extension, label, branch, audit log, and management token#200
Open
aniket-shikhare-cstk wants to merge 3 commits into
Conversation
…abel, branch, audit log, and management token - Add 7 new integration test files (Contentstack005–009, 023, 024) covering locale, webhook, extension, label, branch, audit log, and management token APIs - Add TestAssemblySetup with AssemblyInitialize for dynamic stack creation - Add TestRunContext for in-memory stack API key sharing across tests - Update Contentstack.cs with 8 new optional config keys (MemberEmail, TfaEmail, TfaPassword, OAuth, PersonalizeHost, DeleteDynamicResources, DamV2Enabled, AmOrgUid) - Add LoggingHttpHandler to capture HTTP request/response with timestamps and cURL - Add TestOutputLogger for structured JSON output (ASSERTION, HTTP_REQUEST, HTTP_RESPONSE) - Update generate_integration_test_report.py with per-transaction timestamp and duration display - Update .gitignore to exclude appSettings.json, appsettings.template.json, SDK_METHOD_COVERAGE_MAP.md
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
…stead of /management_tokens
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
…tivity compatibility
- Code (Contentstack.cs:33) uses AddJsonFile("appsettings.json") (lowercase s)
- File was named appSettings.json (capital S) — matched on macOS (case-insensitive)
but not on Linux CI (case-sensitive), causing FileNotFoundException at test runtime
- Update csproj Content Include and gitignore to match lowercase filename
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
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
TestAssemblySetupwith[AssemblyInitialize]for dynamic stack creation before the test run, replacing the static pre-existing stack dependencyTestRunContextfor in-memory sharing of the stack API key across test classesContentstack.cswith 8 optional config properties (TfaEmail, TfaPassword, OAuth, PersonalizeHost, MemberEmail, DeleteDynamicResources, DamV2Enabled, AmOrgUid) read fromappSettings.jsonHTTP Logging Infrastructure
LoggingHttpHandler— aDelegatingHandlerthat intercepts every HTTP request/response and emits structured JSON to stdout, including method, URL, headers, body, cURL command, and timestampTestOutputLoggerfor structured log emission using###TEST_OUTPUT_START###/###TEST_OUTPUT_END###markers parsed by the HTML report generatorgenerate_integration_test_report.pyto display per-transaction timestamps and duration (ms) in the HTML reportTest plan
dotnet buildpasses with no errorsdotnet test --filter "FullyQualifiedName~Integration"runs the new test classesTestAssemblySetupcreates a stack at run start and setsTestRunContext.StackApiKeyScripts/generate_integration_test_report.pyshows per-case assertions, cURL commands, and HTTP timestampsappSettings.jsonis gitignored and not included in this PR