بنقرة واحدة
microshift-dev-generate-tests
Generate test cases for a Jira OCPSTRAT ticket and automate them using Robot Framework
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Generate test cases for a Jira OCPSTRAT ticket and automate them using Robot Framework
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Surface your daily task list — QA-ready tickets, sprint backlog, carry-over items, open PRs, RHEL verification queue, and quarterly reminders. Use at the start of your day to see what needs attention.
Show detailed info about a specific TODO task — its tracked links, notes, and live Jira/PR status. Use when the user asks about a task, wants context to resume work on it, or asks what's needed to finish a ticket. Not for listing all tasks (read the TODO file directly or use edge-ic:sprint-status for sprint-wide views)
End-of-week automation - review active work and prepare next week's TODO
Run the full Prow CI release testing workflow — create PR, trigger jobs, check status, merge PR, download and upload artifacts
Generate interactive PCP performance dashboard from a Prow job URL
Download Prow job artifacts, identify root cause of failure, and produce a structured error report
| name | microshift-dev:generate-tests |
| argument-hint | <jira-ticket-id> |
| description | Generate test cases for a Jira OCPSTRAT ticket and automate them using Robot Framework |
| user-invocable | true |
| allowed-tools | Bash, Read, Write, Glob, Grep, WebFetch |
/microshift-dev:generate-tests JIRA-TICKET-ID
Generate comprehensive Robot Framework test coverage for MicroShift/OpenShift features based on Jira OCPSTRAT tickets.
NOTE: For other projects or to customize this workflow, see TEMPLATE.md alongside this skill for a generic template you can adapt.
Jira Access: This command requires access to Red Hat Jira (https://issues.redhat.com).
Fallback: If Jira access fails, you'll be prompted to manually provide:
https://issues.redhat.com/browse/<JIRA-TICKET-ID>VALIDATION - Check for sufficient information: After analyzing the ticket, verify:
If BOTH conditions fail (no detailed description AND no PR links):
Ask user for additional information: "The OCPSTRAT ticket lacks detailed information for test generation. It's missing:
Please provide ONE of the following to continue:
Or type 'skip' to proceed with limited information (may result in generic tests)."
Wait for user response:
If at least ONE condition passes, proceed to Step 2.
Create test case document in current working directory: test_cases_OCPSTRAT-XXXX.md
Focus ONLY on the 10 most impactful test scenarios NOT already covered:
For each test, provide:
BEFORE writing any tests:
Common keyword locations to check:
test/extended/util/*.robot - Utility keywordsresources/**/*.robot - Shared resource filesWhen creating tests:
Robot Framework Test File Creation Process:
test_cases_OCPSTRAT-XXXX.mdbackup-restore-on-reboot.robot, multi-nic.robot, isolated-network.robottest/suites/<category>/ subdirectory:
test/suites/network/<feature-name>.robot (e.g., coredns-hosts-file.robot)<feature-name>.robot (kebab-case, lowercase)CRITICAL Robot Framework Teardown Rules:
Run Keyword And Ignore ErrorRun Keyword And Ignore Error in ANY teardown section[Teardown], Suite Teardown, Test Teardown, and keyword teardownsRun Keyword And Ignore Error in test cases/setup when you need conditional logicCorrect Teardown Example:
Suite Teardown Cleanup Test Resources
Cleanup Test Resources
[Documentation] Clean up all test resources
Oc Delete pod --all -n ${NAMESPACE}
Remove Test Files
Restart MicroShift
Incorrect Teardown (DON'T DO THIS):
Suite Teardown Run Keyword And Ignore Error Cleanup Test Resources
Cleanup Test Resources
Run Keyword And Ignore Error Oc Delete pod --all -n ${NAMESPACE}
Run Keyword And Ignore Error Remove Test Files
Keyword Reuse Example:
# GOOD - Reusing existing keywords
*** Test Cases ***
Test CoreDNS Hosts File
[Documentation] Test hosts file resolution
Setup MicroShift Config dns.hostsFile=/etc/custom-hosts
Restart MicroShift
Wait For MicroShift Ready
Deploy Test Pod dns-test ${NAMESPACE}
${ip}= Resolve Hostname In Pod dns-test ${NAMESPACE} test.local
Should Be Equal ${ip} 192.168.1.100
# BAD - Creating duplicate keywords
*** Keywords ***
My Custom MicroShift Restart
[Documentation] Restart MicroShift (DON'T DO THIS - use existing keyword!)
Run Process systemctl restart microshift
Sleep 10s
IMPORTANT: Before creating git branch, WAIT for user confirmation.
Ask user for confirmation:
Prompt user: "Would you like me to create a new git branch in the microshift repository? The branch will be named test-OCPSTRAT-XXXX-YYYYMMDD. (yes/no)"
If user confirms (yes):
test-OCPSTRAT-XXXX-$(date +%Y%m%d)Prompt user: "Please provide the full path to your microshift repository (e.g., /home/username/microshift):"
Commands (use the path provided by user):
cd <user-provided-microshift-repo-path>
git status
git checkout -b test-OCPSTRAT-XXXX-$(date +%Y%m%d)
git branch --show-current
After branch is created, create Robot Framework test file directly in the microshift repository:
Determine appropriate test suite directory based on feature type
test/suites/network/test/suites/storage/test/suites/backup/Create the .robot file with kebab-case naming convention
test/suites/network/coredns-hosts-file.robotImplement the top 3-5 most critical tests from Step 3
Add file to git staging
Commands (use the user-provided microshift repository path):
# After file is created, stage it
cd <user-provided-microshift-repo-path>
git add test/suites/<category>/<feature-name>.robot
git status
Output to user:
<user-provided-microshift-repo-path>test/suites/<category>/<feature-name>.robotProvide: