Skip to content

Add PlatformValidation management scenario tests with recording/playback - #50724

Open
shivangirana20 wants to merge 7 commits into
mainfrom
dev/shivangirana/live-testsc7491a6c
Open

shivangirana20 wants to merge 7 commits into
mainfrom
dev/shivangirana/live-testsc7491a6c

Conversation

@shivangirana20

@shivangirana20 shivangirana20 commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Summary

Add PlatformValidation management scenario tests and migrate them from live-only execution to ResourceManagerTestProxyTestBase recording/playback, following the Java SDK team's recommendation and the management test framework guide.

Recordings were captured in the service-enabled subscription using the same approved VHD fixture as the other language tests. Normal PR tests now use playback without Azure credentials, image secrets, or the shared SDK subscription being enabled for this service. No production/generated SDK code changes.

Coverage and safety

  • Eight scenarios preserve CloudValidation create/GET/LIST/PATCH/PUT/delete, execution-plan create/GET/LIST/PATCH/delete, operation-status GET, and provider/catalog discovery.
  • Boot execution validates EPR GET/LIST, successful terminal state, timestamps and summary counts, VTR GET/LIST and pass details, and child absence after deletion.
  • Keep ownership checks, bounded conflict retries, failure retention, and managed-group disappearance checks. Never delete the supplied parent group.
  • Use deterministic recorded configuration and a shared proxy-aware pipeline. Redact signed image/result URLs, identity fields, emails, and subscription IDs; disable pre-sanitization body logging.
  • Add four sanitizer regressions, including the framework's actual sanitizer-request JSON serialization.

Published recordings

All eight recordings are published to Azure/azure-sdk-assets; assets.json pins:

java/platformvalidation/azure-resourcemanager-platformvalidation_81dc07912e

The recording audit found no original subscription/tenant IDs, approved image URL/storage host/signature, emails, or remaining SAS queries. Refresh recordings for each new API-version SDK PR.

Validation

  • RECORD: 8 scenarios + 14 helper tests passed; 0 failed, 0 skipped.
  • Real boot workload: 1 passed, 0 failed, 0 skipped; EPR/VTR validations and full scenario cleanup passed.
  • Credential-free full-module PLAYBACK, including a repeat after publishing the assets pointer: 54 passed; 0 failed, 0 skipped.
  • Checkstyle: 0 violations. Spotless and git diff --check passed.
  • Confirmed the dedicated parent group contains no remaining CloudValidations; the parent group itself is retained.

Optional live pipeline

The existing live pipeline and provisioning files remain available, but are not required for playback. Its shared subscription still needs RP registration/regional enablement before live tests can pass; this migration does not claim that environment issue is fixed. Boot execution in RECORD/LIVE remains an explicit opt-in with a secret image fixture.

Shivangi Rana and others added 2 commits October 9, 2026 14:38
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4b765d16-4aa7-490a-a31d-a9166f5da2e7
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4b765d16-4aa7-490a-a31d-a9166f5da2e7
@shivangirana20

Copy link
Copy Markdown
Member Author

/azp run prepare-pipelines

@github-actions github-actions Bot added the Mgmt This issue is related to a management-plane library. label Oct 9, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
35 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@shivangirana20 shivangirana20 changed the title (AI Generated) Test hardening: bootExecutionLifecycle in PlatformValidationLiveTests Add PlatformValidation management live tests and pipeline setup Oct 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The live tests can fail with IllegalAccessError due to a missing test-only module read edge, and shared teardown can delete investigation resources after test failures, bypassing cleanup safeguards.

2 open issues
What changed in this PR

Adds live management-plane coverage for PlatformValidation, with pipeline setup and local execution guidance. Production and generated SDK code remain unchanged.

Changes:

  • Adds eight live scenarios covering resource lifecycles, boot execution, catalog discovery, and operation status.
  • Adds ten helper regressions for cleanup, polling, endpoint configuration, image validation, and serialization.
  • Configures a serial Windows live-test pipeline with optional boot execution and documents prerequisites and safeguards.
File Description
sdk/​platformvalidation/​tests.mgmt.yml Configures serial Canary testing and optional image-backed execution.
sdk/​platformvalidation/​test-resources.bicep Grants parent-group Contributor access and exports test configuration.
sdk/​platformvalidation/​azure-resourcemanager-platformvalidation/​src/​test/​java/​com/​azure/​resourcemanager/​platformvalidation/​PlatformValidationLiveTests.java Adds live scenarios and guarded cleanup helpers.
sdk/​platformvalidation/​azure-resourcemanager-platformvalidation/​src/​test/​java/​com/​azure/​resourcemanager/​platformvalidation/​PlatformValidationLiveTestHelpersTests.java Adds offline regression tests for live-test helpers.
sdk/​platformvalidation/​azure-resourcemanager-platformvalidation/​README.md Documents live-test setup, safeguards, and pipeline usage.
sdk/​platformvalidation/​azure-resourcemanager-platformvalidation/​pom.xml Adds test-scoped resource-management and test-framework dependencies.
sdk/​platformvalidation/​azure-resourcemanager-platformvalidation/​CHANGELOG.md Records endpoint configuration and cleanup retry changes.

Review effort: Balanced

@@ -48,6 +48,18 @@
<revapi.skip>true</revapi.skip>
</properties>
parameters:
ServiceDirectory: platformvalidation
MaxParallel: 1
TestOptions: '$(TestOptions) -Djunit.jupiter.execution.parallel.enabled=false'
@XiaofeiCao

Copy link
Copy Markdown
Member

/azp run java - platformvalidation - mgmt - tests

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6685658c-c986-42c5-aee8-fca8f020c7ee
@shivangirana20

Copy link
Copy Markdown
Member Author

/azp run java - platformvalidation - mgmt - tests

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Preserve full CV, plan, run, and test-result validation using approved-subscription recordings. Publish sanitized assets and verify all scenarios without Azure credentials.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6685658c-c986-42c5-aee8-fca8f020c7ee
@shivangirana20 shivangirana20 changed the title Add PlatformValidation management live tests and pipeline setup Add PlatformValidation management scenario tests with recording/playback Oct 29, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Mgmt This issue is related to a management-plane library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants