feat(polarion): add automated Polarion test case sync#7
Closed
rnetser wants to merge 1 commit into
Closed
Conversation
Add scripts/polarion_sync/ package that auto-creates Polarion test cases for new tests on PR merge. Three-stage pipeline: 1. Scan merged commit for tests missing @pytest.mark.polarion markers 2. Create Polarion TestCase work items via pylero 3. Inject markers, validate diff, push to main (or create follow-up PR) Features: - AST-based scanner detects unlinked tests (including parametrized) - Jira-Epic-Polarion requirement resolution with caching - Sibling test case fallback for requirement linking - All-or-nothing push gate with diff validation - Follow-up PR creation when requirement linking fails - Idempotent injection (skips existing markers) - 25 unit tests covering scanner, injector, client, and push gate Assisted-by: Claude <noreply@anthropic.com> Signed-off-by: rnetser <rnetser@redhat.com>
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.
What this PR does / why we need it:
Adds
scripts/polarion_sync/package that automatically creates Polarion test cases for new tests on PR merge. Intended to run as a Jenkins post-merge job (triggered by shmee webhook).Three-stage pipeline:
@pytest.mark.polarionmarkers (including parametrized tests)@pytest.mark.polarion("CNV-XXXXX")markers, validates diff, pushes to mainKey features:
POLARION_DISABLE_SSL_VERIFYenv varUsage:
Assisted-by: Claude noreply@anthropic.com
Which issue(s) this PR fixes:
Special notes for reviewer:
~/.pyleroconfig# noqa: PLC0415on lazy imports explicitly requested by maintainerexcept Exceptionon pylero/jira API calls falls under AGENTS.md exception fix: preserve full module path in pytest marker analyzer ImportVisitor #5 (unversioned external libraries)jira-ticket: