@orion-qa/orion 3.0.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/automation-strategist.md +1 -0
- package/.claude/agents/change-agent.md +1 -0
- package/.claude/agents/codebase-analyst.md +2 -1
- package/.claude/agents/environment-discovery.md +1 -0
- package/.claude/agents/evidence-validator.md +1 -0
- package/.claude/agents/executor.md +1 -0
- package/.claude/agents/failure-analyst.md +2 -1
- package/.claude/agents/implementer.md +2 -1
- package/.claude/agents/requirement-analyst.md +1 -0
- package/.claude/agents/reviewer.md +1 -0
- package/.claude/agents/test-reporter.md +1 -0
- package/.claude/settings.json +25 -0
- package/.claude/skills/appium/SKILL.md +1 -1
- package/.claude/skills/appium/templates/README.md +6 -9
- package/.claude/skills/appium/templates/ci/github-actions-android.yml +8 -2
- package/.claude/skills/appium/templates/ci/github-actions-ios.yml +8 -2
- package/.claude/skills/appium/templates/ci/github-actions-windows.yml +9 -2
- package/.claude/skills/appium/templates/project-java/.env.example +4 -0
- package/.claude/skills/appium/templates/project-java/pom.xml +2 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/{framework/Config.java → config/Env.java} +43 -52
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/config/Flags.java +45 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/config/Paths.java +14 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/desc/SignInDesc.java +30 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/{framework → driver}/DriverFactory.java +19 -13
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/{framework → driver}/DriverManager.java +12 -9
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/fixtures/BaseTest.java +75 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/{screens → pageObjects}/BaseScreen.java +12 -12
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/pageObjects/HomeScreen.java +26 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/pageObjects/LoginScreen.java +63 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/pageObjects/ShellScreen.java +26 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/setup/AuthSetup.java +49 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/testData/TestData.java +78 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/tests/ui/SignInTest.java +45 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/tests/unit/UtilsTest.java +34 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/{framework → utils}/AutomationError.java +4 -4
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/Case.java +20 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/CaseTransformer.java +54 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/Dates.java +42 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/Log.java +45 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/MissingSettingError.java +13 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/RandomData.java +41 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/Redact.java +33 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/TestDescription.java +25 -0
- package/.claude/skills/appium/templates/project-java/src/test/resources/testData/testData.properties +7 -0
- package/.claude/skills/appium/templates/project-java/testng.xml +11 -4
- package/.claude/skills/architecture-analysis/SKILL.md +3 -2
- package/.claude/skills/automation-implementation/SKILL.md +8 -5
- package/.claude/skills/automation-implementation/references/patterns.md +46 -24
- package/.claude/skills/automation-review/references/assertion-guard.md +1 -1
- package/.claude/skills/code-review/SKILL.md +5 -2
- package/.claude/skills/code-review/references/pattern-rules.md +12 -7
- package/.claude/skills/documentation/SKILL.md +23 -18
- package/.claude/skills/execution/SKILL.md +7 -3
- package/.claude/skills/httpclient/templates/README.md +6 -7
- package/.claude/skills/httpclient/templates/csharp-nunit/.env.example +4 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Automation.csproj +7 -3
- package/.claude/skills/httpclient/templates/csharp-nunit/Config/Env.cs +62 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Config/Flags.cs +35 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Config/Paths.cs +22 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Fixtures/BaseTest.cs +22 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Resources/Desc/ProductsDesc.cs +22 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Resources/TestData/TestData.cs +61 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Resources/TestData/testData.json +9 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Services/ApiClient.cs +48 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Services/HealthApi.cs +11 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/{Api → Services}/ProductsApi.cs +8 -5
- package/.claude/skills/httpclient/templates/csharp-nunit/Tests/Api/ProductsTests.cs +61 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Tests/Unit/UtilsTests.cs +40 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Utils/AutomationError.cs +15 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Utils/Dates.cs +18 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Utils/Log.cs +37 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Utils/RandomData.cs +26 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Utils/Redact.cs +22 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Utils/TestDescription.cs +55 -0
- package/.claude/skills/javascript/references/sources.md +1 -1
- package/.claude/skills/k6/SKILL.md +1 -1
- package/.claude/skills/k6/templates/README.md +5 -3
- package/.claude/skills/k6/templates/project/{data/cases.js → resources/desc/products.desc.js} +1 -1
- package/.claude/skills/k6/templates/project/resources/testData/testData.js +32 -0
- package/.claude/skills/k6/templates/project/{lib/config.js → src/config/env.js} +10 -5
- package/.claude/skills/k6/templates/project/{lib → src/services}/products-api.js +7 -5
- package/.claude/skills/k6/templates/project/{load → tests/load}/products.js +8 -8
- package/.claude/skills/karate/templates/README.md +4 -5
- package/.claude/skills/karate/templates/java-junit5/.env.example +2 -0
- package/.claude/skills/karate/templates/java-junit5/pom.xml +4 -0
- package/.claude/skills/karate/templates/java-junit5/src/test/java/{support → config}/EnvSettings.java +1 -1
- package/.claude/skills/karate/templates/java-junit5/src/test/java/karate-config.js +13 -6
- package/.claude/skills/karate/templates/java-junit5/src/test/java/logback-test.xml +1 -1
- package/.claude/skills/karate/templates/java-junit5/src/test/java/{api → tests}/ApiTest.java +7 -4
- package/.claude/skills/karate/templates/java-junit5/src/test/java/{api → tests/api}/health.feature +3 -3
- package/.claude/skills/karate/templates/java-junit5/src/test/java/tests/api/products.feature +29 -0
- package/.claude/skills/karate/templates/java-junit5/src/test/java/{support → utils}/MaskingLogModifier.java +1 -1
- package/.claude/skills/karate/templates/java-junit5/src/test/resources/testData/newProduct.js +7 -0
- package/.claude/skills/karate/templates/java-junit5/src/test/resources/testData/testData.json +6 -0
- package/.claude/skills/newman/templates/README.md +4 -5
- package/.claude/skills/newman/templates/collection/.env.example +2 -0
- package/.claude/skills/newman/templates/collection/collections/api.postman_collection.json +165 -145
- package/.claude/skills/newman/templates/collection/package.json +2 -1
- package/.claude/skills/newman/templates/collection/resources/desc/products.desc.json +53 -0
- package/.claude/skills/newman/templates/collection/resources/testData/testData.json +10 -0
- package/.claude/skills/newman/templates/collection/run.js +41 -31
- package/.claude/skills/newman/templates/collection/src/config/env.js +37 -0
- package/.claude/skills/orion/SKILL.md +19 -12
- package/.claude/skills/orion/references/assess-fix.md +35 -0
- package/.claude/skills/orion/references/batch.md +64 -0
- package/.claude/skills/orion/references/blockers.md +1 -1
- package/.claude/skills/orion/references/capabilities.md +1 -1
- package/.claude/skills/orion/references/conversation.md +65 -20
- package/.claude/skills/orion/references/delivery-formats.md +24 -36
- package/.claude/skills/orion/references/doctor.md +1 -1
- package/.claude/skills/orion/references/hosts.md +1 -0
- package/.claude/skills/orion/references/modes.md +7 -3
- package/.claude/skills/orion/references/plain-language.md +55 -0
- package/.claude/skills/orion/references/project-context-files.md +8 -2
- package/.claude/skills/orion/references/recovery-loop.md +8 -0
- package/.claude/skills/orion/references/setup-card.md +29 -8
- package/.claude/skills/orion/references/status-lines.md +9 -4
- package/.claude/skills/orion/references/task-brief.md +1 -0
- package/.claude/skills/orion/references/work-branch.md +3 -1
- package/.claude/skills/orion/scripts/batch_detect.mjs +98 -0
- package/.claude/skills/orion/scripts/batch_state.mjs +179 -0
- package/.claude/skills/orion/scripts/browser_setup.mjs +41 -21
- package/.claude/skills/orion/scripts/cases_export.py +724 -0
- package/.claude/skills/orion/scripts/codemap.mjs +116 -0
- package/.claude/skills/orion/scripts/done_check.mjs +195 -0
- package/.claude/skills/orion/scripts/env_check.mjs +8 -3
- package/.claude/skills/orion/scripts/env_check.py +12 -5
- package/.claude/skills/orion/scripts/fix_plan.mjs +170 -0
- package/.claude/skills/orion/scripts/graph.mjs +400 -0
- package/.claude/skills/orion/scripts/hooks/lean_guard.mjs +162 -0
- package/.claude/skills/orion/scripts/lib/inside.mjs +31 -0
- package/.claude/skills/orion/scripts/lib/scan.mjs +357 -0
- package/.claude/skills/orion/scripts/lib/table.mjs +116 -0
- package/.claude/skills/orion/scripts/parity_check.mjs +166 -0
- package/.claude/skills/orion/scripts/quiet.mjs +160 -0
- package/.claude/skills/orion/scripts/report_check.mjs +77 -0
- package/.claude/skills/orion/scripts/results_parse.mjs +209 -0
- package/.claude/skills/orion/scripts/reuse_check.mjs +251 -0
- package/.claude/skills/orion/scripts/rules.mjs +92 -0
- package/.claude/skills/orion/scripts/run_state.mjs +238 -0
- package/.claude/skills/orion/scripts/suite_check.mjs +267 -0
- package/.claude/skills/orion/scripts/timing_profile.mjs +128 -0
- package/.claude/skills/orion/scripts/usage_report.mjs +315 -0
- package/.claude/skills/orion/templates/project-context/assessment.md +45 -0
- package/.claude/skills/orion/templates/project-context/defects.md +5 -0
- package/.claude/skills/orion/templates/project-context/report.md +45 -0
- package/.claude/skills/orion/templates/project-context/retry-policy.md +6 -0
- package/.claude/skills/orion/templates/project-context/run.md +4 -1
- package/.claude/skills/orion/templates/project-context/test-case-map.md +5 -0
- package/.claude/skills/orion/templates/project-context/test-design.md +24 -0
- package/.claude/skills/pact/SKILL.md +2 -2
- package/.claude/skills/pact/templates/README.md +4 -2
- package/.claude/skills/pact/templates/project/package.json +2 -2
- package/.claude/skills/pact/templates/project/{data/cases.js → resources/desc/products.desc.js} +3 -3
- package/.claude/skills/pact/templates/project/resources/testData/testData.js +21 -0
- package/.claude/skills/pact/templates/project/src/config/env.js +32 -0
- package/.claude/skills/pact/templates/project/src/{products-client.js → services/products-client.js} +4 -2
- package/.claude/skills/pact/templates/project/tests/contract/products.contract.test.js +46 -0
- package/.claude/skills/pact/templates/project/{verify → tests/verify}/products.verify.js +7 -22
- package/.claude/skills/playwright/SKILL.md +6 -6
- package/.claude/skills/playwright/templates/README.md +29 -10
- package/.claude/skills/playwright/templates/ci/Jenkinsfile +1 -1
- package/.claude/skills/playwright/templates/ci/azure-pipelines.yml +1 -1
- package/.claude/skills/playwright/templates/ci/github-actions-javascript.yml +1 -1
- package/.claude/skills/playwright/templates/ci/github-actions.yml +1 -1
- package/.claude/skills/playwright/templates/ci/gitlab-ci.yml +1 -1
- package/.claude/skills/playwright/templates/dotnet/.env.example +7 -0
- package/.claude/skills/playwright/templates/dotnet/.runsettings +17 -0
- package/.claude/skills/playwright/templates/dotnet/Automation.csproj +8 -0
- package/.claude/skills/playwright/templates/dotnet/Config/Env.cs +89 -0
- package/.claude/skills/playwright/templates/dotnet/Config/Flags.cs +56 -0
- package/.claude/skills/playwright/templates/dotnet/Config/Paths.cs +31 -0
- package/.claude/skills/playwright/templates/dotnet/Fixtures/ApiBaseTest.cs +39 -0
- package/.claude/skills/playwright/templates/dotnet/Fixtures/BaseTest.cs +72 -0
- package/.claude/skills/playwright/templates/dotnet/PageObjects/BasePage.cs +63 -0
- package/.claude/skills/playwright/templates/dotnet/PageObjects/HomePage.cs +21 -0
- package/.claude/skills/playwright/templates/dotnet/PageObjects/LoginPage.cs +54 -0
- package/.claude/skills/playwright/templates/dotnet/PageObjects/ShellPage.cs +29 -0
- package/.claude/skills/playwright/templates/dotnet/Resources/Desc/SignInDesc.cs +23 -0
- package/.claude/skills/playwright/templates/dotnet/Resources/TestData/TestData.cs +74 -0
- package/.claude/skills/playwright/templates/dotnet/Resources/TestData/testData.json +19 -0
- package/.claude/skills/playwright/templates/dotnet/Services/ApiClient.cs +51 -0
- package/.claude/skills/playwright/templates/dotnet/Setup/AuthSetup.cs +63 -0
- package/.claude/skills/playwright/templates/dotnet/Tests/Api/SessionTests.cs +18 -0
- package/.claude/skills/playwright/templates/dotnet/Tests/Ui/SignInTests.cs +48 -0
- package/.claude/skills/playwright/templates/dotnet/Tests/Unit/UtilsTests.cs +40 -0
- package/.claude/skills/playwright/templates/dotnet/Utils/AutomationError.cs +15 -0
- package/.claude/skills/playwright/templates/dotnet/Utils/Dates.cs +18 -0
- package/.claude/skills/playwright/templates/dotnet/Utils/Log.cs +37 -0
- package/.claude/skills/playwright/templates/dotnet/Utils/RandomData.cs +26 -0
- package/.claude/skills/playwright/templates/dotnet/Utils/Redact.cs +22 -0
- package/.claude/skills/playwright/templates/dotnet/Utils/TestDescription.cs +55 -0
- package/.claude/skills/playwright/templates/dotnet/gitignore +6 -1
- package/.claude/skills/playwright/templates/javascript/.env.example +8 -0
- package/.claude/skills/playwright/templates/javascript/fixtures/index.js +85 -0
- package/.claude/skills/playwright/templates/javascript/fixtures/session.js +82 -0
- package/.claude/skills/playwright/templates/javascript/gitignore +7 -0
- package/.claude/skills/playwright/templates/javascript/jsconfig.json +12 -0
- package/.claude/skills/playwright/templates/javascript/package.json +7 -3
- package/.claude/skills/playwright/templates/javascript/pageObjects/basePage.js +62 -0
- package/.claude/skills/playwright/templates/javascript/pageObjects/homePage.js +19 -0
- package/.claude/skills/playwright/templates/javascript/pageObjects/loginPage.js +44 -0
- package/.claude/skills/playwright/templates/javascript/pageObjects/shellPage.js +26 -0
- package/.claude/skills/playwright/templates/javascript/playwright.config.js +45 -24
- package/.claude/skills/playwright/templates/javascript/reporters/summaryReporter.js +233 -0
- package/.claude/skills/playwright/templates/javascript/resources/desc/signIn.desc.js +33 -0
- package/.claude/skills/playwright/templates/javascript/resources/testData/testData.js +45 -0
- package/.claude/skills/playwright/templates/javascript/setup/auth.setup.js +17 -0
- package/.claude/skills/playwright/templates/javascript/setup/auth.teardown.js +16 -0
- package/.claude/skills/playwright/templates/javascript/src/config/env.js +107 -0
- package/.claude/skills/playwright/templates/javascript/src/config/flags.js +70 -0
- package/.claude/skills/playwright/templates/javascript/src/config/loadEnv.js +21 -0
- package/.claude/skills/playwright/templates/javascript/src/config/paths.js +22 -0
- package/.claude/skills/playwright/templates/javascript/src/services/apiClient.js +68 -0
- package/.claude/skills/playwright/templates/javascript/tests/api/session.spec.js +15 -0
- package/.claude/skills/playwright/templates/javascript/tests/ui/signIn.spec.js +35 -0
- package/.claude/skills/playwright/templates/javascript/tests/unit/summaryReporter.test.js +34 -0
- package/.claude/skills/playwright/templates/javascript/tests/unit/utils.test.js +31 -0
- package/.claude/skills/playwright/templates/javascript/utils/date.js +28 -0
- package/.claude/skills/playwright/templates/javascript/{src → utils}/errors.js +1 -0
- package/.claude/skills/playwright/templates/javascript/utils/formFill.js +29 -0
- package/.claude/skills/playwright/templates/javascript/utils/logger.js +33 -0
- package/.claude/skills/playwright/templates/javascript/utils/random.js +37 -0
- package/.claude/skills/playwright/templates/javascript/utils/redact.js +35 -0
- package/.claude/skills/playwright/templates/javascript/utils/titles.js +38 -0
- package/.claude/skills/playwright/templates/project/.env.example +8 -0
- package/.claude/skills/playwright/templates/project/fixtures/index.ts +86 -0
- package/.claude/skills/playwright/templates/project/fixtures/session.ts +78 -0
- package/.claude/skills/playwright/templates/project/gitignore +9 -2
- package/.claude/skills/playwright/templates/project/package.json +8 -6
- package/.claude/skills/playwright/templates/project/pageObjects/basePage.ts +57 -0
- package/.claude/skills/playwright/templates/project/pageObjects/homePage.ts +20 -0
- package/.claude/skills/playwright/templates/project/pageObjects/loginPage.ts +47 -0
- package/.claude/skills/playwright/templates/project/pageObjects/shellPage.ts +22 -0
- package/.claude/skills/playwright/templates/project/playwright.config.ts +49 -23
- package/.claude/skills/playwright/templates/project/reporters/summaryReporter.ts +241 -0
- package/.claude/skills/playwright/templates/project/resources/desc/signIn.desc.ts +32 -0
- package/.claude/skills/playwright/templates/project/resources/testData/testData.ts +42 -0
- package/.claude/skills/playwright/templates/project/setup/auth.setup.ts +16 -0
- package/.claude/skills/playwright/templates/project/setup/auth.teardown.ts +15 -0
- package/.claude/skills/playwright/templates/project/src/config/env.ts +109 -0
- package/.claude/skills/playwright/templates/project/src/config/flags.ts +70 -0
- package/.claude/skills/playwright/templates/project/src/config/loadEnv.ts +17 -0
- package/.claude/skills/playwright/templates/project/src/config/paths.ts +19 -0
- package/.claude/skills/playwright/templates/project/src/services/apiClient.ts +70 -0
- package/.claude/skills/playwright/templates/project/tests/api/session.spec.ts +14 -0
- package/.claude/skills/playwright/templates/project/tests/ui/signIn.spec.ts +34 -0
- package/.claude/skills/playwright/templates/project/tests/unit/summaryReporter.test.ts +33 -0
- package/.claude/skills/playwright/templates/project/tests/unit/utils.test.ts +30 -0
- package/.claude/skills/playwright/templates/project/tsconfig.json +3 -8
- package/.claude/skills/playwright/templates/project/utils/date.ts +25 -0
- package/.claude/skills/playwright/templates/project/utils/formFill.ts +27 -0
- package/.claude/skills/playwright/templates/project/utils/logger.ts +32 -0
- package/.claude/skills/playwright/templates/project/utils/random.ts +34 -0
- package/.claude/skills/playwright/templates/project/utils/redact.ts +32 -0
- package/.claude/skills/playwright/templates/project/utils/titles.ts +42 -0
- package/.claude/skills/playwright/templates/python/.env.example +8 -0
- package/.claude/skills/playwright/templates/python/conftest.py +91 -16
- package/.claude/skills/playwright/templates/python/gitignore +5 -0
- package/.claude/skills/playwright/templates/python/page_objects/__init__.py +1 -0
- package/.claude/skills/playwright/templates/python/page_objects/base_page.py +57 -0
- package/.claude/skills/playwright/templates/python/page_objects/home_page.py +22 -0
- package/.claude/skills/playwright/templates/python/page_objects/login_page.py +42 -0
- package/.claude/skills/playwright/templates/python/page_objects/shell_page.py +21 -0
- package/.claude/skills/playwright/templates/python/pytest.ini +5 -2
- package/.claude/skills/playwright/templates/python/requirements.txt +1 -0
- package/.claude/skills/playwright/templates/python/resources/__init__.py +1 -0
- package/.claude/skills/playwright/templates/python/resources/desc/__init__.py +1 -0
- package/.claude/skills/playwright/templates/python/resources/desc/sign_in_desc.py +27 -0
- package/.claude/skills/playwright/templates/python/resources/test_data/__init__.py +1 -0
- package/.claude/skills/playwright/templates/python/resources/test_data/test_data.py +41 -0
- package/.claude/skills/playwright/templates/python/setup/__init__.py +1 -0
- package/.claude/skills/playwright/templates/python/setup/auth.py +53 -0
- package/.claude/skills/playwright/templates/python/src/__init__.py +1 -0
- package/.claude/skills/playwright/templates/python/src/config/__init__.py +1 -0
- package/.claude/skills/playwright/templates/python/src/config/env.py +109 -0
- package/.claude/skills/playwright/templates/python/src/config/flags.py +63 -0
- package/.claude/skills/playwright/templates/python/src/config/load_env.py +16 -0
- package/.claude/skills/playwright/templates/python/src/config/paths.py +25 -0
- package/.claude/skills/playwright/templates/python/src/services/__init__.py +1 -0
- package/.claude/skills/playwright/templates/python/src/services/api_client.py +60 -0
- package/.claude/skills/playwright/templates/python/tests/api/test_session.py +14 -0
- package/.claude/skills/playwright/templates/python/tests/ui/test_sign_in.py +36 -0
- package/.claude/skills/playwright/templates/python/tests/unit/test_utils.py +32 -0
- package/.claude/skills/playwright/templates/python/utils/__init__.py +1 -0
- package/.claude/skills/playwright/templates/python/utils/dates.py +23 -0
- package/.claude/skills/playwright/templates/python/{framework → utils}/errors.py +3 -2
- package/.claude/skills/playwright/templates/python/utils/form_fill.py +26 -0
- package/.claude/skills/playwright/templates/python/utils/logger.py +40 -0
- package/.claude/skills/playwright/templates/python/utils/markers.py +6 -0
- package/.claude/skills/playwright/templates/python/utils/random_data.py +35 -0
- package/.claude/skills/playwright/templates/python/utils/redact.py +30 -0
- package/.claude/skills/playwright/templates/python/utils/titles.py +53 -0
- package/.claude/skills/quality-checks/SKILL.md +11 -11
- package/.claude/skills/quality-checks/templates/README.md +14 -12
- package/.claude/skills/quality-checks/templates/playwright-js/pageObjects/scannedPage.js +21 -0
- package/.claude/skills/quality-checks/templates/playwright-js/resources/desc/quality.desc.js +63 -0
- package/.claude/skills/quality-checks/templates/playwright-js/resources/testData/qualityData.js +32 -0
- package/.claude/skills/quality-checks/templates/playwright-js/src/checks/accessibility.js +50 -0
- package/.claude/skills/quality-checks/templates/playwright-js/src/checks/pageHealth.js +38 -0
- package/.claude/skills/quality-checks/templates/playwright-js/src/checks/performance.js +21 -0
- package/.claude/skills/quality-checks/templates/playwright-js/src/services/graphqlClient.js +28 -0
- package/.claude/skills/quality-checks/templates/playwright-js/tests/api/graphql.spec.js +23 -0
- package/.claude/skills/quality-checks/templates/playwright-js/tests/ui/quality.spec.js +50 -0
- package/.claude/skills/quality-checks/templates/playwright-ts/pageObjects/scannedPage.ts +20 -0
- package/.claude/skills/quality-checks/templates/playwright-ts/resources/desc/quality.desc.ts +59 -0
- package/.claude/skills/quality-checks/templates/playwright-ts/{src/data/quality.data.ts → resources/testData/qualityData.ts} +3 -2
- package/.claude/skills/quality-checks/templates/playwright-ts/tests/api/graphql.spec.ts +22 -0
- package/.claude/skills/quality-checks/templates/playwright-ts/tests/ui/quality.spec.ts +49 -0
- package/.claude/skills/requests/templates/README.md +6 -7
- package/.claude/skills/requests/templates/python-pytest/.env.example +4 -0
- package/.claude/skills/requests/templates/python-pytest/conftest.py +24 -9
- package/.claude/skills/requests/templates/python-pytest/pytest.ini +6 -3
- package/.claude/skills/requests/templates/python-pytest/requirements.txt +1 -0
- package/.claude/skills/requests/templates/python-pytest/resources/__init__.py +1 -0
- package/.claude/skills/requests/templates/python-pytest/resources/desc/__init__.py +1 -0
- package/.claude/skills/requests/templates/python-pytest/resources/desc/products_desc.py +27 -0
- package/.claude/skills/requests/templates/python-pytest/resources/test_data/__init__.py +1 -0
- package/.claude/skills/requests/templates/python-pytest/resources/test_data/test_data.py +27 -0
- package/.claude/skills/requests/templates/python-pytest/src/__init__.py +1 -0
- package/.claude/skills/requests/templates/python-pytest/src/config/__init__.py +1 -0
- package/.claude/skills/requests/templates/python-pytest/src/config/env.py +39 -0
- package/.claude/skills/requests/templates/python-pytest/src/config/flags.py +35 -0
- package/.claude/skills/requests/templates/python-pytest/src/config/load_env.py +16 -0
- package/.claude/skills/requests/templates/python-pytest/src/config/paths.py +16 -0
- package/.claude/skills/requests/templates/python-pytest/src/services/__init__.py +1 -0
- package/.claude/skills/requests/templates/python-pytest/{api/client.py → src/services/api_client.py} +19 -10
- package/.claude/skills/requests/templates/python-pytest/{api → src/services}/products_api.py +3 -9
- package/.claude/skills/requests/templates/python-pytest/tests/api/test_products.py +35 -0
- package/.claude/skills/requests/templates/python-pytest/tests/unit/test_utils.py +32 -0
- package/.claude/skills/requests/templates/python-pytest/utils/__init__.py +1 -0
- package/.claude/skills/requests/templates/python-pytest/utils/dates.py +23 -0
- package/.claude/skills/{selenium/templates/python-pytest/framework → requests/templates/python-pytest/utils}/errors.py +4 -3
- package/.claude/skills/requests/templates/python-pytest/utils/logger.py +40 -0
- package/.claude/skills/requests/templates/python-pytest/utils/random_data.py +35 -0
- package/.claude/skills/requests/templates/python-pytest/utils/redact.py +30 -0
- package/.claude/skills/requests/templates/python-pytest/utils/titles.py +53 -0
- package/.claude/skills/requirement-analysis/SKILL.md +1 -1
- package/.claude/skills/rest-assured/SKILL.md +1 -1
- package/.claude/skills/rest-assured/templates/README.md +6 -7
- package/.claude/skills/rest-assured/templates/ci/github-actions.yml +5 -2
- package/.claude/skills/rest-assured/templates/java-testng/.env.example +3 -0
- package/.claude/skills/rest-assured/templates/java-testng/pom.xml +7 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/{api/ApiConfig.java → config/Env.java} +35 -22
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/config/Flags.java +17 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/config/Paths.java +14 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/desc/ProductsDesc.java +26 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/fixtures/BaseTest.java +29 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/services/ApiSpec.java +31 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/services/HealthApi.java +17 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/{api → services}/ProductsApi.java +19 -14
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/{data → testData}/ProductBuilder.java +4 -8
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/testData/TestData.java +64 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/tests/api/ProductsTest.java +49 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/tests/unit/UtilsTest.java +34 -0
- package/.claude/skills/{selenium/templates/java-testng/src/test/java/automation/framework → rest-assured/templates/java-testng/src/test/java/automation/utils}/AutomationError.java +4 -4
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/Case.java +20 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/CaseTransformer.java +54 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/Dates.java +42 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/Log.java +45 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/MissingSettingError.java +13 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/RandomData.java +41 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/Redact.java +33 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/TestDescription.java +25 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/resources/testData/testData.properties +14 -0
- package/.claude/skills/rest-assured/templates/java-testng/testng.xml +14 -0
- package/.claude/skills/selenium/SKILL.md +1 -1
- package/.claude/skills/selenium/templates/README.md +25 -13
- package/.claude/skills/selenium/templates/ci/github-actions-java.yml +5 -2
- package/.claude/skills/selenium/templates/csharp-nunit/.env.example +15 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Automation.csproj +7 -0
- package/.claude/skills/selenium/templates/csharp-nunit/{Framework/Config.cs → Config/Env.cs} +33 -34
- package/.claude/skills/selenium/templates/csharp-nunit/Config/Flags.cs +39 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Config/Paths.cs +31 -0
- package/.claude/skills/selenium/templates/csharp-nunit/{Framework → Driver}/DriverFactory.cs +16 -13
- package/.claude/skills/selenium/templates/csharp-nunit/Driver/DriverManager.cs +27 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Fixtures/BaseTest.cs +56 -0
- package/.claude/skills/selenium/templates/csharp-nunit/{Pages → PageObjects}/BasePage.cs +44 -14
- package/.claude/skills/selenium/templates/csharp-nunit/PageObjects/HomePage.cs +21 -0
- package/.claude/skills/selenium/templates/csharp-nunit/PageObjects/LoginPage.cs +53 -0
- package/.claude/skills/selenium/templates/csharp-nunit/PageObjects/ShellPage.cs +22 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Resources/Desc/SignInDesc.cs +23 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Resources/TestData/TestData.cs +74 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Resources/TestData/testData.json +14 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Services/ApiClient.cs +71 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Setup/AuthSetup.cs +104 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Tests/Api/SessionTests.cs +23 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Tests/Ui/SignInTests.cs +42 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Tests/Unit/UtilsTests.cs +40 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Utils/AutomationError.cs +15 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Utils/Dates.cs +18 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Utils/FormFill.cs +20 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Utils/Log.cs +37 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Utils/RandomData.cs +26 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Utils/Redact.cs +22 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Utils/TestDescription.cs +55 -0
- package/.claude/skills/selenium/templates/csharp-nunit/gitignore +6 -2
- package/.claude/skills/selenium/templates/java-testng/.env.example +12 -0
- package/.claude/skills/selenium/templates/java-testng/gitignore +5 -2
- package/.claude/skills/selenium/templates/java-testng/pom.xml +2 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/{framework/Config.java → config/Env.java} +45 -55
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/config/Flags.java +50 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/config/Paths.java +20 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/desc/SignInDesc.java +30 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/{framework → driver}/DriverFactory.java +15 -12
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/{framework → driver}/DriverManager.java +4 -7
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/fixtures/BaseTest.java +87 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/{pages → pageObjects}/BasePage.java +41 -17
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/pageObjects/HomePage.java +32 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/pageObjects/LoginPage.java +69 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/pageObjects/ShellPage.java +34 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/services/ApiClient.java +93 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/setup/AuthSetup.java +125 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/testData/TestData.java +88 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/tests/api/SessionTest.java +23 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/tests/ui/SignInTest.java +46 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/tests/unit/UtilsTest.java +34 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/AutomationError.java +18 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/Case.java +20 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/CaseTransformer.java +54 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/Dates.java +42 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/FormFill.java +25 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/Log.java +45 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/MissingSettingError.java +13 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/RandomData.java +41 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/Redact.java +33 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/TestDescription.java +25 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/resources/testData/testData.properties +11 -0
- package/.claude/skills/selenium/templates/java-testng/testng.xml +15 -5
- package/.claude/skills/selenium/templates/python-pytest/.env.example +12 -0
- package/.claude/skills/selenium/templates/python-pytest/conftest.py +63 -12
- package/.claude/skills/selenium/templates/python-pytest/gitignore +7 -2
- package/.claude/skills/selenium/templates/python-pytest/page_objects/__init__.py +1 -0
- package/.claude/skills/selenium/templates/python-pytest/{pages → page_objects}/base_page.py +20 -20
- package/.claude/skills/selenium/templates/python-pytest/page_objects/home_page.py +17 -0
- package/.claude/skills/selenium/templates/python-pytest/{pages → page_objects}/login_page.py +12 -14
- package/.claude/skills/selenium/templates/python-pytest/page_objects/shell_page.py +16 -0
- package/.claude/skills/selenium/templates/python-pytest/pytest.ini +6 -2
- package/.claude/skills/selenium/templates/python-pytest/requirements.txt +1 -0
- package/.claude/skills/selenium/templates/python-pytest/resources/__init__.py +1 -0
- package/.claude/skills/selenium/templates/python-pytest/resources/desc/__init__.py +1 -0
- package/.claude/skills/selenium/templates/python-pytest/resources/desc/sign_in_desc.py +27 -0
- package/.claude/skills/selenium/templates/python-pytest/resources/test_data/__init__.py +1 -0
- package/.claude/skills/selenium/templates/python-pytest/resources/test_data/test_data.py +25 -0
- package/.claude/skills/selenium/templates/python-pytest/setup/__init__.py +1 -0
- package/.claude/skills/selenium/templates/python-pytest/setup/auth.py +60 -0
- package/.claude/skills/selenium/templates/python-pytest/src/__init__.py +1 -0
- package/.claude/skills/selenium/templates/python-pytest/src/config/__init__.py +1 -0
- package/.claude/skills/selenium/templates/python-pytest/src/config/env.py +68 -0
- package/.claude/skills/selenium/templates/python-pytest/src/config/flags.py +40 -0
- package/.claude/skills/selenium/templates/python-pytest/src/config/load_env.py +16 -0
- package/.claude/skills/selenium/templates/python-pytest/src/config/paths.py +25 -0
- package/.claude/skills/selenium/templates/python-pytest/src/driver/__init__.py +1 -0
- package/.claude/skills/selenium/templates/python-pytest/{framework → src/driver}/driver_factory.py +11 -18
- package/.claude/skills/selenium/templates/python-pytest/{framework → src/driver}/driver_manager.py +3 -3
- package/.claude/skills/selenium/templates/python-pytest/src/services/__init__.py +1 -0
- package/.claude/skills/selenium/templates/python-pytest/src/services/api_client.py +89 -0
- package/.claude/skills/selenium/templates/python-pytest/tests/api/test_session.py +11 -0
- package/.claude/skills/selenium/templates/python-pytest/tests/ui/test_sign_in.py +34 -0
- package/.claude/skills/selenium/templates/python-pytest/tests/unit/test_utils.py +32 -0
- package/.claude/skills/selenium/templates/python-pytest/utils/__init__.py +1 -0
- package/.claude/skills/selenium/templates/python-pytest/utils/dates.py +23 -0
- package/.claude/skills/selenium/templates/python-pytest/utils/errors.py +28 -0
- package/.claude/skills/selenium/templates/python-pytest/utils/form_fill.py +29 -0
- package/.claude/skills/selenium/templates/python-pytest/utils/logger.py +40 -0
- package/.claude/skills/selenium/templates/python-pytest/utils/markers.py +6 -0
- package/.claude/skills/selenium/templates/python-pytest/utils/random_data.py +35 -0
- package/.claude/skills/selenium/templates/python-pytest/utils/redact.py +30 -0
- package/.claude/skills/selenium/templates/python-pytest/utils/titles.py +53 -0
- package/.claude/skills/self-healing/SKILL.md +2 -2
- package/.claude/skills/test-design/SKILL.md +1 -1
- package/.claude/skills/test-reporting/references/tool-mapping.md +13 -9
- package/.claude/skills/ui-observation/SKILL.md +8 -6
- package/.claude/skills/ui-observation/references/login-methods.md +1 -1
- package/.claude-plugin/plugin.json +15 -2
- package/.codex/agents/automation-strategist.toml +1 -0
- package/.codex/agents/change-agent.toml +1 -0
- package/.codex/agents/codebase-analyst.toml +1 -0
- package/.codex/agents/environment-discovery.toml +1 -0
- package/.codex/agents/evidence-validator.toml +1 -0
- package/.codex/agents/executor.toml +1 -0
- package/.codex/agents/failure-analyst.toml +1 -0
- package/.codex/agents/implementer.toml +2 -1
- package/.codex/agents/requirement-analyst.toml +1 -0
- package/.codex/agents/reviewer.toml +1 -0
- package/.codex/agents/test-reporter.toml +1 -0
- package/.codex/hooks.json +15 -0
- package/.cursor/commands/orion.md +1 -1
- package/.cursor/hooks.json +10 -0
- package/.devin/hooks.v1.json +13 -0
- package/.gemini/agents/automation-strategist.md +1 -0
- package/.gemini/agents/change-agent.md +1 -0
- package/.gemini/agents/codebase-analyst.md +1 -0
- package/.gemini/agents/environment-discovery.md +1 -0
- package/.gemini/agents/evidence-validator.md +1 -0
- package/.gemini/agents/executor.md +1 -0
- package/.gemini/agents/failure-analyst.md +1 -0
- package/.gemini/agents/implementer.md +2 -1
- package/.gemini/agents/requirement-analyst.md +1 -0
- package/.gemini/agents/reviewer.md +1 -0
- package/.gemini/agents/test-reporter.md +1 -0
- package/.gemini/commands/orion.toml +2 -2
- package/.github/hooks/orion-lean.json +13 -0
- package/.github/prompts/orion.prompt.md +2 -2
- package/.windsurf/workflows/orion.md +2 -2
- package/AGENTS.md +6 -6
- package/README.md +55 -140
- package/assets/architecture.svg +104 -0
- package/assets/run-flow.svg +1 -1
- package/bin/orion.mjs +6 -6
- package/hosts/gemini-extension/gemini-extension.json +1 -1
- package/hosts/gemini-extension/hooks/hooks.json +16 -0
- package/hosts/gemini-extension/policies/platform.toml +5 -0
- package/package.json +6 -1
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/data/Cases.java +0 -37
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/data/SignInData.java +0 -25
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/flows/SignInFlow.java +0 -34
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/framework/Account.java +0 -19
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/screens/HomeScreen.java +0 -36
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/screens/LoginScreen.java +0 -57
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/tests/BaseTest.java +0 -33
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/tests/SmokeTest.java +0 -17
- package/.claude/skills/httpclient/templates/csharp-nunit/Api/ApiClient.cs +0 -61
- package/.claude/skills/httpclient/templates/csharp-nunit/Api/ApiConfig.cs +0 -61
- package/.claude/skills/httpclient/templates/csharp-nunit/Api/ApiError.cs +0 -17
- package/.claude/skills/httpclient/templates/csharp-nunit/Data/Cases.cs +0 -41
- package/.claude/skills/httpclient/templates/csharp-nunit/Data/HealthData.cs +0 -11
- package/.claude/skills/httpclient/templates/csharp-nunit/Data/ProductBuilder.cs +0 -16
- package/.claude/skills/httpclient/templates/csharp-nunit/Data/ProductsData.cs +0 -17
- package/.claude/skills/httpclient/templates/csharp-nunit/Tests/HealthTests.cs +0 -18
- package/.claude/skills/httpclient/templates/csharp-nunit/Tests/ProductsTests.cs +0 -48
- package/.claude/skills/k6/templates/project/data/builders.js +0 -8
- package/.claude/skills/karate/templates/java-junit5/src/test/java/api/products.feature +0 -33
- package/.claude/skills/pact/templates/project/test/contract/products.contract.test.js +0 -45
- package/.claude/skills/playwright/templates/dotnet/Components/AccountMenu.cs +0 -23
- package/.claude/skills/playwright/templates/dotnet/Data/Cases.cs +0 -43
- package/.claude/skills/playwright/templates/dotnet/Data/SignInData.cs +0 -24
- package/.claude/skills/playwright/templates/dotnet/Flows/SignInFlow.cs +0 -51
- package/.claude/skills/playwright/templates/dotnet/Framework/AutomationError.cs +0 -17
- package/.claude/skills/playwright/templates/dotnet/Framework/Config.cs +0 -91
- package/.claude/skills/playwright/templates/dotnet/Pages/BasePage.cs +0 -57
- package/.claude/skills/playwright/templates/dotnet/Pages/HomePage.cs +0 -26
- package/.claude/skills/playwright/templates/dotnet/Pages/LoginPage.cs +0 -45
- package/.claude/skills/playwright/templates/dotnet/Tests/SmokeTests.cs +0 -47
- package/.claude/skills/playwright/templates/javascript/src/components/account-menu.component.js +0 -30
- package/.claude/skills/playwright/templates/javascript/src/config.js +0 -53
- package/.claude/skills/playwright/templates/javascript/src/data/accounts.js +0 -23
- package/.claude/skills/playwright/templates/javascript/src/data/cases.js +0 -49
- package/.claude/skills/playwright/templates/javascript/src/data/sign-in.data.js +0 -12
- package/.claude/skills/playwright/templates/javascript/src/flows/sign-in.flow.js +0 -53
- package/.claude/skills/playwright/templates/javascript/src/pages/base.page.js +0 -59
- package/.claude/skills/playwright/templates/javascript/src/pages/home.page.js +0 -31
- package/.claude/skills/playwright/templates/javascript/src/pages/login.page.js +0 -56
- package/.claude/skills/playwright/templates/javascript/tests/fixtures.js +0 -20
- package/.claude/skills/playwright/templates/javascript/tests/smoke.spec.js +0 -22
- package/.claude/skills/playwright/templates/project/src/components/account-menu.component.ts +0 -27
- package/.claude/skills/playwright/templates/project/src/config.ts +0 -56
- package/.claude/skills/playwright/templates/project/src/data/accounts.ts +0 -21
- package/.claude/skills/playwright/templates/project/src/data/cases.ts +0 -55
- package/.claude/skills/playwright/templates/project/src/data/sign-in.data.ts +0 -10
- package/.claude/skills/playwright/templates/project/src/flows/sign-in.flow.ts +0 -51
- package/.claude/skills/playwright/templates/project/src/pages/base.page.ts +0 -52
- package/.claude/skills/playwright/templates/project/src/pages/home.page.ts +0 -30
- package/.claude/skills/playwright/templates/project/src/pages/login.page.ts +0 -53
- package/.claude/skills/playwright/templates/project/tests/fixtures.ts +0 -25
- package/.claude/skills/playwright/templates/project/tests/smoke.spec.ts +0 -22
- package/.claude/skills/playwright/templates/python/components/__init__.py +0 -1
- package/.claude/skills/playwright/templates/python/components/account_menu.py +0 -22
- package/.claude/skills/playwright/templates/python/data/accounts.py +0 -14
- package/.claude/skills/playwright/templates/python/data/cases.py +0 -33
- package/.claude/skills/playwright/templates/python/data/sign_in_data.py +0 -9
- package/.claude/skills/playwright/templates/python/flows/sign_in.py +0 -63
- package/.claude/skills/playwright/templates/python/framework/config.py +0 -86
- package/.claude/skills/playwright/templates/python/pages/base_page.py +0 -51
- package/.claude/skills/playwright/templates/python/pages/home_page.py +0 -21
- package/.claude/skills/playwright/templates/python/pages/login_page.py +0 -40
- package/.claude/skills/playwright/templates/python/tests/test_smoke.py +0 -26
- package/.claude/skills/quality-checks/templates/playwright-ts/src/pages/scanned.page.ts +0 -16
- package/.claude/skills/quality-checks/templates/playwright-ts/tests/quality.spec.ts +0 -58
- package/.claude/skills/requests/templates/python-pytest/api/config.py +0 -43
- package/.claude/skills/requests/templates/python-pytest/api/errors.py +0 -15
- package/.claude/skills/requests/templates/python-pytest/data/builders.py +0 -16
- package/.claude/skills/requests/templates/python-pytest/data/cases.py +0 -30
- package/.claude/skills/requests/templates/python-pytest/data/health_data.py +0 -6
- package/.claude/skills/requests/templates/python-pytest/data/products_data.py +0 -10
- package/.claude/skills/requests/templates/python-pytest/tests/test_health.py +0 -12
- package/.claude/skills/requests/templates/python-pytest/tests/test_products.py +0 -25
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/api/ApiError.java +0 -18
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/api/ApiSpec.java +0 -29
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/api/HealthApi.java +0 -21
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/data/Cases.java +0 -45
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/data/HealthData.java +0 -12
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/data/ProductsData.java +0 -16
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/tests/HealthTest.java +0 -15
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/tests/ProductsTest.java +0 -37
- package/.claude/skills/selenium/templates/csharp-nunit/Components/AccountMenu.cs +0 -26
- package/.claude/skills/selenium/templates/csharp-nunit/Data/Cases.cs +0 -43
- package/.claude/skills/selenium/templates/csharp-nunit/Data/SignInData.cs +0 -24
- package/.claude/skills/selenium/templates/csharp-nunit/Flows/SignInFlow.cs +0 -51
- package/.claude/skills/selenium/templates/csharp-nunit/Framework/AutomationError.cs +0 -17
- package/.claude/skills/selenium/templates/csharp-nunit/Framework/DriverManager.cs +0 -26
- package/.claude/skills/selenium/templates/csharp-nunit/Pages/HomePage.cs +0 -28
- package/.claude/skills/selenium/templates/csharp-nunit/Pages/LoginPage.cs +0 -58
- package/.claude/skills/selenium/templates/csharp-nunit/Tests/BaseTest.cs +0 -22
- package/.claude/skills/selenium/templates/csharp-nunit/Tests/SmokeTests.cs +0 -37
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/components/AccountMenu.java +0 -37
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/data/Cases.java +0 -48
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/data/SignInData.java +0 -36
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/flows/SignInFlow.java +0 -60
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/framework/Account.java +0 -19
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/pages/HomePage.java +0 -45
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/pages/LoginPage.java +0 -78
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/tests/BaseTest.java +0 -33
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/tests/SmokeTest.java +0 -33
- package/.claude/skills/selenium/templates/python-pytest/components/__init__.py +0 -1
- package/.claude/skills/selenium/templates/python-pytest/components/account_menu.py +0 -19
- package/.claude/skills/selenium/templates/python-pytest/data/accounts.py +0 -14
- package/.claude/skills/selenium/templates/python-pytest/data/cases.py +0 -33
- package/.claude/skills/selenium/templates/python-pytest/data/sign_in_data.py +0 -9
- package/.claude/skills/selenium/templates/python-pytest/flows/__init__.py +0 -0
- package/.claude/skills/selenium/templates/python-pytest/flows/sign_in.py +0 -61
- package/.claude/skills/selenium/templates/python-pytest/framework/__init__.py +0 -0
- package/.claude/skills/selenium/templates/python-pytest/framework/config.py +0 -90
- package/.claude/skills/selenium/templates/python-pytest/pages/__init__.py +0 -0
- package/.claude/skills/selenium/templates/python-pytest/pages/home_page.py +0 -23
- package/.claude/skills/selenium/templates/python-pytest/tests/test_smoke.py +0 -25
- /package/.claude/skills/karate/templates/java-junit5/src/test/java/{api → tests/api}/delete-product.feature +0 -0
- /package/.claude/skills/playwright/templates/{python/data/__init__.py → dotnet/auth/.gitkeep} +0 -0
- /package/.claude/skills/playwright/templates/{python/flows/__init__.py → javascript/auth/.gitkeep} +0 -0
- /package/.claude/skills/playwright/templates/{python/framework/__init__.py → project/auth/.gitkeep} +0 -0
- /package/.claude/skills/playwright/templates/project/{src → utils}/errors.ts +0 -0
- /package/.claude/skills/playwright/templates/python/{pages/__init__.py → auth/.gitkeep} +0 -0
- /package/.claude/skills/quality-checks/templates/playwright-ts/src/checks/{page-health.ts → pageHealth.ts} +0 -0
- /package/.claude/skills/quality-checks/templates/playwright-ts/src/{api/graphql.ts → services/graphqlClient.ts} +0 -0
- /package/.claude/skills/{requests/templates/python-pytest/api/__init__.py → selenium/templates/csharp-nunit/auth/.gitkeep} +0 -0
- /package/.claude/skills/{requests/templates/python-pytest/data/__init__.py → selenium/templates/java-testng/auth/.gitkeep} +0 -0
- /package/.claude/skills/selenium/templates/python-pytest/{data/__init__.py → auth/.gitkeep} +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
package automation.services;
|
|
2
|
+
|
|
3
|
+
import automation.config.Env;
|
|
4
|
+
import io.restassured.builder.RequestSpecBuilder;
|
|
5
|
+
import io.restassured.config.LogConfig;
|
|
6
|
+
import io.restassured.config.RestAssuredConfig;
|
|
7
|
+
import io.restassured.http.ContentType;
|
|
8
|
+
import io.restassured.specification.RequestSpecification;
|
|
9
|
+
|
|
10
|
+
/** One shared request specification: base URI and token set once, from `config/Env`; Authorization masked in logs. */
|
|
11
|
+
public final class ApiSpec {
|
|
12
|
+
private static RequestSpecification spec;
|
|
13
|
+
|
|
14
|
+
/** Not instantiable: use {@link #request()}. */
|
|
15
|
+
private ApiSpec() {}
|
|
16
|
+
|
|
17
|
+
/** @return the specification every call starts from: base URI, JSON, the token (if set) and masked logging */
|
|
18
|
+
public static synchronized RequestSpecification request() {
|
|
19
|
+
if (spec == null) {
|
|
20
|
+
RequestSpecBuilder builder = new RequestSpecBuilder()
|
|
21
|
+
.setBaseUri(Env.baseUrl())
|
|
22
|
+
.setContentType(ContentType.JSON)
|
|
23
|
+
.setConfig(RestAssuredConfig.config().logConfig(LogConfig.logConfig()
|
|
24
|
+
.enableLoggingOfRequestAndResponseIfValidationFails()
|
|
25
|
+
.blacklistHeader("Authorization")));
|
|
26
|
+
Env.token().ifPresent(token -> builder.addHeader("Authorization", "Bearer " + token));
|
|
27
|
+
spec = builder.build();
|
|
28
|
+
}
|
|
29
|
+
return spec;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
package automation.services;
|
|
2
|
+
|
|
3
|
+
import static io.restassured.RestAssured.given;
|
|
4
|
+
|
|
5
|
+
import automation.testData.TestData;
|
|
6
|
+
import io.restassured.response.Response;
|
|
7
|
+
|
|
8
|
+
/** Client for the health endpoint: builds the call from the shared spec; tests assert on what it returns. */
|
|
9
|
+
public final class HealthApi {
|
|
10
|
+
/** Not instantiable: use {@link #get()}. */
|
|
11
|
+
private HealthApi() {}
|
|
12
|
+
|
|
13
|
+
/** @return the health endpoint's response, for the test to assert on */
|
|
14
|
+
public static Response get() {
|
|
15
|
+
return given().spec(ApiSpec.request()).when().get(TestData.route("health"));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
package automation.
|
|
1
|
+
package automation.services;
|
|
2
2
|
|
|
3
3
|
import static io.restassured.RestAssured.given;
|
|
4
4
|
|
|
5
|
-
import automation.
|
|
6
|
-
import
|
|
5
|
+
import automation.testData.ProductBuilder.Product;
|
|
6
|
+
import automation.testData.TestData;
|
|
7
|
+
import automation.utils.Log;
|
|
7
8
|
import io.restassured.response.Response;
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -14,36 +15,40 @@ public final class ProductsApi {
|
|
|
14
15
|
/** Not instantiable: static calls built from the shared spec. */
|
|
15
16
|
private ProductsApi() {}
|
|
16
17
|
|
|
18
|
+
/** @return the resource's path, from the test data */
|
|
19
|
+
private static String path() {
|
|
20
|
+
return TestData.route("products");
|
|
21
|
+
}
|
|
22
|
+
|
|
17
23
|
/**
|
|
18
24
|
* Creates a product.
|
|
19
25
|
*
|
|
20
|
-
* @param path the resource's path, from the test data
|
|
21
26
|
* @param product the product's fields, from the builder
|
|
22
27
|
* @return the response (201 with the new product)
|
|
23
28
|
*/
|
|
24
|
-
public static Response create(
|
|
25
|
-
|
|
29
|
+
public static Response create(Product product) {
|
|
30
|
+
Response response = given().spec(ApiSpec.request()).body(product.toJson()).when().post(path());
|
|
31
|
+
Log.debug("POST " + path() + " -> " + response.statusCode());
|
|
32
|
+
return response;
|
|
26
33
|
}
|
|
27
34
|
|
|
28
35
|
/**
|
|
29
36
|
* Reads one product.
|
|
30
37
|
*
|
|
31
|
-
* @param
|
|
32
|
-
* @param id the product's id
|
|
38
|
+
* @param id the product's id
|
|
33
39
|
* @return the response
|
|
34
40
|
*/
|
|
35
|
-
public static Response get(String
|
|
36
|
-
return given().spec(ApiSpec.request()).when().get(path + "/" + id);
|
|
41
|
+
public static Response get(String id) {
|
|
42
|
+
return given().spec(ApiSpec.request()).when().get(path() + "/" + id);
|
|
37
43
|
}
|
|
38
44
|
|
|
39
45
|
/**
|
|
40
46
|
* Deletes one product (cleanup).
|
|
41
47
|
*
|
|
42
|
-
* @param
|
|
43
|
-
* @param id the product's id
|
|
48
|
+
* @param id the product's id
|
|
44
49
|
* @return the response
|
|
45
50
|
*/
|
|
46
|
-
public static Response delete(String
|
|
47
|
-
return given().spec(ApiSpec.request()).when().delete(path + "/" + id);
|
|
51
|
+
public static Response delete(String id) {
|
|
52
|
+
return given().spec(ApiSpec.request()).when().delete(path() + "/" + id);
|
|
48
53
|
}
|
|
49
54
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
package automation.
|
|
1
|
+
package automation.testData;
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import automation.utils.RandomData;
|
|
4
4
|
|
|
5
5
|
/** Builds valid synthetic products: a new name per call, so tests never share or collide on records. */
|
|
6
6
|
public final class ProductBuilder {
|
|
@@ -24,12 +24,8 @@ public final class ProductBuilder {
|
|
|
24
24
|
/** Not instantiable: use {@link #newProduct()}. */
|
|
25
25
|
private ProductBuilder() {}
|
|
26
26
|
|
|
27
|
-
/**
|
|
28
|
-
* A valid product with a run-unique name; a test changes only the field it is about (with {@code new Product(...)}).
|
|
29
|
-
*
|
|
30
|
-
* @return the product
|
|
31
|
-
*/
|
|
27
|
+
/** @return a valid product with a run-unique name; a test changes only the field it is about */
|
|
32
28
|
public static Product newProduct() {
|
|
33
|
-
return new Product("Test product
|
|
29
|
+
return new Product(RandomData.uniqueName("Test product"), 9.99);
|
|
34
30
|
}
|
|
35
31
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
package automation.testData;
|
|
2
|
+
|
|
3
|
+
import automation.utils.AutomationError;
|
|
4
|
+
import java.io.IOException;
|
|
5
|
+
import java.io.InputStream;
|
|
6
|
+
import java.io.InputStreamReader;
|
|
7
|
+
import java.nio.charset.StandardCharsets;
|
|
8
|
+
import java.util.Properties;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The suite's test data: values from `src/test/resources/testData/testData.properties` (paths, expected statuses and
|
|
12
|
+
* labels by language) (builders for data a test creates are in `ProductBuilder`). Tests and pages read data only through here.
|
|
13
|
+
*/
|
|
14
|
+
public final class TestData {
|
|
15
|
+
private static final Properties VALUES = load();
|
|
16
|
+
|
|
17
|
+
/** Not instantiable: use the static methods. */
|
|
18
|
+
private TestData() {}
|
|
19
|
+
|
|
20
|
+
/** @return the properties file's values, read once from the test classpath */
|
|
21
|
+
private static Properties load() {
|
|
22
|
+
Properties properties = new Properties();
|
|
23
|
+
try (InputStream in = TestData.class.getResourceAsStream("/testData/testData.properties")) {
|
|
24
|
+
if (in == null) throw new AutomationError("Read", "testData/testData.properties", "not on the test classpath");
|
|
25
|
+
properties.load(new InputStreamReader(in, StandardCharsets.UTF_8));
|
|
26
|
+
} catch (IOException e) {
|
|
27
|
+
throw new AutomationError("Read", "testData/testData.properties", e.getMessage());
|
|
28
|
+
}
|
|
29
|
+
return properties;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A value from the data file.
|
|
34
|
+
*
|
|
35
|
+
* @param key e.g. `signIn.greeting`
|
|
36
|
+
* @return its value
|
|
37
|
+
* @throws AutomationError when the key is missing
|
|
38
|
+
*/
|
|
39
|
+
public static String value(String key) {
|
|
40
|
+
String v = VALUES.getProperty(key);
|
|
41
|
+
if (v == null) throw new AutomationError("Read test data", key, "missing in testData.properties");
|
|
42
|
+
return v;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* A page's path, relative to `BASE_URL`.
|
|
47
|
+
*
|
|
48
|
+
* @param page e.g. `login`
|
|
49
|
+
* @return `route.<page>`
|
|
50
|
+
*/
|
|
51
|
+
public static String route(String page) {
|
|
52
|
+
return value("route." + page);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* A whole number from the data file, e.g. an expected status.
|
|
57
|
+
*
|
|
58
|
+
* @param key e.g. `products.createdStatus`
|
|
59
|
+
* @return its value
|
|
60
|
+
*/
|
|
61
|
+
public static int number(String key) {
|
|
62
|
+
return Integer.parseInt(value(key));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
package automation.tests.api;
|
|
2
|
+
|
|
3
|
+
import static org.hamcrest.Matchers.equalTo;
|
|
4
|
+
|
|
5
|
+
import automation.desc.ProductsDesc;
|
|
6
|
+
import automation.fixtures.BaseTest;
|
|
7
|
+
import automation.services.HealthApi;
|
|
8
|
+
import automation.services.ProductsApi;
|
|
9
|
+
import automation.testData.ProductBuilder;
|
|
10
|
+
import automation.testData.ProductBuilder.Product;
|
|
11
|
+
import automation.testData.TestData;
|
|
12
|
+
import automation.utils.Case;
|
|
13
|
+
import io.restassured.response.Response;
|
|
14
|
+
import org.testng.annotations.Test;
|
|
15
|
+
|
|
16
|
+
/** Health check and products: each test takes its title and groups from `desc/ProductsDesc`. */
|
|
17
|
+
public class ProductsTest extends BaseTest {
|
|
18
|
+
/** TS-0 (title and groups from the description). */
|
|
19
|
+
@Test
|
|
20
|
+
@Case(desc = ProductsDesc.class, id = "TS-0")
|
|
21
|
+
public void serviceAnswersHealthCheck() {
|
|
22
|
+
HealthApi.get().then().statusCode(TestData.number("health.status"));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** TS-1 (title and groups from the description). */
|
|
26
|
+
@Test
|
|
27
|
+
@Case(desc = ProductsDesc.class, id = "TS-1")
|
|
28
|
+
public void createdProductCanBeReadBack() {
|
|
29
|
+
Product product = ProductBuilder.newProduct();
|
|
30
|
+
Response created = ProductsApi.create(product);
|
|
31
|
+
created.then().statusCode(TestData.number("products.createdStatus"));
|
|
32
|
+
String id = created.jsonPath().getString("id");
|
|
33
|
+
try {
|
|
34
|
+
ProductsApi.get(id).then().statusCode(200)
|
|
35
|
+
.body("name", equalTo(product.name()))
|
|
36
|
+
.body("price", equalTo((float) product.price()));
|
|
37
|
+
} finally {
|
|
38
|
+
// Teardown runs only when the create above succeeded.
|
|
39
|
+
ProductsApi.delete(id);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** TS-2 (title and groups from the description). */
|
|
44
|
+
@Test
|
|
45
|
+
@Case(desc = ProductsDesc.class, id = "TS-2")
|
|
46
|
+
public void unknownProductAnswersNotFound() {
|
|
47
|
+
ProductsApi.get(TestData.value("products.unknownId")).then().statusCode(TestData.number("products.notFoundStatus"));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
package automation.tests.unit;
|
|
2
|
+
|
|
3
|
+
import static org.testng.Assert.assertEquals;
|
|
4
|
+
import static org.testng.Assert.assertTrue;
|
|
5
|
+
|
|
6
|
+
import automation.utils.Dates;
|
|
7
|
+
import automation.utils.RandomData;
|
|
8
|
+
import java.time.LocalDate;
|
|
9
|
+
import java.util.HashSet;
|
|
10
|
+
import java.util.Set;
|
|
11
|
+
import org.testng.annotations.Test;
|
|
12
|
+
|
|
13
|
+
/** Unit tests of the suite's own helpers: no browser and no app, so they run in seconds (`mvn test -Dgroups=unit`). */
|
|
14
|
+
public class UtilsTest {
|
|
15
|
+
/** uniqueSuffix gives a different value each call. */
|
|
16
|
+
@Test(groups = "unit")
|
|
17
|
+
public void uniqueSuffixDiffersEachCall() {
|
|
18
|
+
Set<String> values = new HashSet<>();
|
|
19
|
+
for (int i = 0; i < 50; i++) values.add(RandomData.uniqueSuffix());
|
|
20
|
+
assertEquals(values.size(), 50);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** uniqueEmail keeps the base address and adds a tag. */
|
|
24
|
+
@Test(groups = "unit")
|
|
25
|
+
public void uniqueEmailKeepsBaseAndAddsTag() {
|
|
26
|
+
assertTrue(RandomData.uniqueEmail("qa.team@company.test").matches("qa\\.team\\+[0-9a-f]{6}@company\\.test"));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** addDays and isoDate compute dates from a fixed day. */
|
|
30
|
+
@Test(groups = "unit")
|
|
31
|
+
public void addDaysAndIsoDateFromAFixedDay() {
|
|
32
|
+
assertEquals(Dates.isoDate(Dates.addDays(1, LocalDate.of(2026, 1, 31))), "2026-02-01");
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
package automation.
|
|
1
|
+
package automation.utils;
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* The one error type the suite raises, so every failure reads the same way:
|
|
5
|
-
*
|
|
4
|
+
* The one error type the suite raises, so every failure reads the same way: what was being done, where (URL or
|
|
5
|
+
* element), and what came back (status or state).
|
|
6
6
|
*/
|
|
7
7
|
public class AutomationError extends RuntimeException {
|
|
8
8
|
/**
|
|
@@ -10,7 +10,7 @@ public class AutomationError extends RuntimeException {
|
|
|
10
10
|
*
|
|
11
11
|
* @param action what the suite was doing, e.g. "Open" or "Wait for"
|
|
12
12
|
* @param where the URL or element it was acting on
|
|
13
|
-
* @param detail what came back: the state that was never reached
|
|
13
|
+
* @param detail what came back: an HTTP status, or the state that was never reached
|
|
14
14
|
*/
|
|
15
15
|
public AutomationError(String action, String where, String detail) {
|
|
16
16
|
super(action + " " + where + ": " + detail);
|
package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/Case.java
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
package automation.utils;
|
|
2
|
+
|
|
3
|
+
import java.lang.annotation.ElementType;
|
|
4
|
+
import java.lang.annotation.Retention;
|
|
5
|
+
import java.lang.annotation.RetentionPolicy;
|
|
6
|
+
import java.lang.annotation.Target;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Points a test method to its description: `@Case(desc = SignInDesc.class, id = "TS-0")`. {@link CaseTransformer}
|
|
10
|
+
* turns it into the test's description and TestNG groups.
|
|
11
|
+
*/
|
|
12
|
+
@Retention(RetentionPolicy.RUNTIME)
|
|
13
|
+
@Target(ElementType.METHOD)
|
|
14
|
+
public @interface Case {
|
|
15
|
+
/** @return the class in `desc/` that holds the case (a `public static final Map<String, TestDescription> CASES`) */
|
|
16
|
+
Class<?> desc();
|
|
17
|
+
|
|
18
|
+
/** @return the case id, e.g. `TS-0` */
|
|
19
|
+
String id();
|
|
20
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
package automation.utils;
|
|
2
|
+
|
|
3
|
+
import java.lang.reflect.Constructor;
|
|
4
|
+
import java.lang.reflect.Method;
|
|
5
|
+
import java.util.ArrayList;
|
|
6
|
+
import java.util.List;
|
|
7
|
+
import java.util.Map;
|
|
8
|
+
import org.testng.IAnnotationTransformer;
|
|
9
|
+
import org.testng.annotations.ITestAnnotation;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Gives every `@Case` test its title and groups from the description, so they are written once, in `desc/`
|
|
13
|
+
* (`mvn test -Dgroups=smoke` selects by the description's tags). Registered in `testng.xml`.
|
|
14
|
+
*/
|
|
15
|
+
public class CaseTransformer implements IAnnotationTransformer {
|
|
16
|
+
/**
|
|
17
|
+
* Looks a case up in its description class.
|
|
18
|
+
*
|
|
19
|
+
* @param ref the test's `@Case`
|
|
20
|
+
* @return the description
|
|
21
|
+
* @throws AutomationError when the class has no such case
|
|
22
|
+
*/
|
|
23
|
+
@SuppressWarnings("unchecked")
|
|
24
|
+
public static TestDescription describe(Case ref) {
|
|
25
|
+
try {
|
|
26
|
+
Map<String, TestDescription> cases = (Map<String, TestDescription>) ref.desc().getField("CASES").get(null);
|
|
27
|
+
TestDescription d = cases.get(ref.id());
|
|
28
|
+
if (d == null) throw new AutomationError("Find case", ref.desc().getSimpleName(), ref.id() + " is not described");
|
|
29
|
+
return d;
|
|
30
|
+
} catch (ReflectiveOperationException e) {
|
|
31
|
+
throw new AutomationError("Read", ref.desc().getName(), "no public static CASES map");
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Sets the description and adds the tags as groups for each test method with `@Case`.
|
|
37
|
+
*
|
|
38
|
+
* @param annotation the method's `@Test`
|
|
39
|
+
* @param testClass unused (class-level annotation)
|
|
40
|
+
* @param constructor unused
|
|
41
|
+
* @param method the test method
|
|
42
|
+
*/
|
|
43
|
+
@Override
|
|
44
|
+
@SuppressWarnings("rawtypes")
|
|
45
|
+
public void transform(ITestAnnotation annotation, Class testClass, Constructor constructor, Method method) {
|
|
46
|
+
if (method == null || !method.isAnnotationPresent(Case.class)) return;
|
|
47
|
+
TestDescription d = describe(method.getAnnotation(Case.class));
|
|
48
|
+
annotation.setDescription(d.fullTitle());
|
|
49
|
+
List<String> groups = new ArrayList<>(List.of(annotation.getGroups()));
|
|
50
|
+
groups.addAll(d.tags());
|
|
51
|
+
groups.add(d.ac());
|
|
52
|
+
annotation.setGroups(groups.toArray(new String[0]));
|
|
53
|
+
}
|
|
54
|
+
}
|
package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/Dates.java
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// @toolkit: shared helpers kept for stories to reuse; reuse or extend them before writing a new one.
|
|
2
|
+
package automation.utils;
|
|
3
|
+
|
|
4
|
+
import java.time.LocalDate;
|
|
5
|
+
import java.time.ZoneOffset;
|
|
6
|
+
|
|
7
|
+
/** Dates as tests need them: computed from today, so data stays valid on any day the suite runs. */
|
|
8
|
+
public final class Dates {
|
|
9
|
+
/** Not instantiable: use the static methods. */
|
|
10
|
+
private Dates() {}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* A date a number of days from a start date (negative for the past).
|
|
14
|
+
*
|
|
15
|
+
* @param days days to add
|
|
16
|
+
* @param start the start date
|
|
17
|
+
* @return the new date
|
|
18
|
+
*/
|
|
19
|
+
public static LocalDate addDays(int days, LocalDate start) {
|
|
20
|
+
return start.plusDays(days);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* A date a number of days from today (UTC).
|
|
25
|
+
*
|
|
26
|
+
* @param days days to add
|
|
27
|
+
* @return the new date
|
|
28
|
+
*/
|
|
29
|
+
public static LocalDate addDays(int days) {
|
|
30
|
+
return addDays(days, LocalDate.now(ZoneOffset.UTC));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A date as `YYYY-MM-DD`, the format most date inputs and APIs accept.
|
|
35
|
+
*
|
|
36
|
+
* @param date the date
|
|
37
|
+
* @return the ISO date
|
|
38
|
+
*/
|
|
39
|
+
public static String isoDate(LocalDate date) {
|
|
40
|
+
return date.toString();
|
|
41
|
+
}
|
|
42
|
+
}
|
package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/Log.java
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
package automation.utils;
|
|
2
|
+
|
|
3
|
+
import automation.config.Flags;
|
|
4
|
+
import java.time.Instant;
|
|
5
|
+
import java.util.List;
|
|
6
|
+
|
|
7
|
+
/** The suite's logger: use it instead of System.out, so every line is levelled (`LOG_LEVEL`) and secrets are masked. */
|
|
8
|
+
public final class Log {
|
|
9
|
+
private static final List<String> LEVELS = List.of("error", "warn", "info", "debug");
|
|
10
|
+
|
|
11
|
+
/** Not instantiable: use the static methods. */
|
|
12
|
+
private Log() {}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Prints one log line when its level is enabled.
|
|
16
|
+
*
|
|
17
|
+
* @param level one of error, warn, info, debug
|
|
18
|
+
* @param message the message
|
|
19
|
+
*/
|
|
20
|
+
private static void write(String level, String message) {
|
|
21
|
+
int current = LEVELS.indexOf(Flags.logLevel());
|
|
22
|
+
if (LEVELS.indexOf(level) > (current < 0 ? 2 : current)) return;
|
|
23
|
+
System.out.println(Instant.now() + " " + level.toUpperCase() + " " + Redact.redact(message));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** @param message what failed */
|
|
27
|
+
public static void error(String message) {
|
|
28
|
+
write("error", message);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** @param message what looks wrong but didn't fail */
|
|
32
|
+
public static void warn(String message) {
|
|
33
|
+
write("warn", message);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** @param message a step worth seeing in a normal run */
|
|
37
|
+
public static void info(String message) {
|
|
38
|
+
write("info", message);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** @param message detail for debugging only */
|
|
42
|
+
public static void debug(String message) {
|
|
43
|
+
write("debug", message);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
package automation.utils;
|
|
2
|
+
|
|
3
|
+
/** A setting the run needs is missing from the environment and the project's `.env`. */
|
|
4
|
+
public class MissingSettingError extends AutomationError {
|
|
5
|
+
/**
|
|
6
|
+
* Names the missing variable.
|
|
7
|
+
*
|
|
8
|
+
* @param name the environment variable that has no value
|
|
9
|
+
*/
|
|
10
|
+
public MissingSettingError(String name) {
|
|
11
|
+
super("Read setting", name, "not set (add it to the project .env or the CI secrets; never to code)");
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// @toolkit: shared helpers kept for stories to reuse; reuse or extend them before writing a new one.
|
|
2
|
+
package automation.utils;
|
|
3
|
+
|
|
4
|
+
import java.security.SecureRandom;
|
|
5
|
+
import java.util.HexFormat;
|
|
6
|
+
|
|
7
|
+
/** Run-unique values for data a test creates, so repeated and parallel runs never collide with each other's data. */
|
|
8
|
+
public final class RandomData {
|
|
9
|
+
private static final SecureRandom RANDOM = new SecureRandom();
|
|
10
|
+
|
|
11
|
+
/** Not instantiable: use the static methods. */
|
|
12
|
+
private RandomData() {}
|
|
13
|
+
|
|
14
|
+
/** @return a short suffix unique to this call, e.g. `k3f9a2` (6 lower-case hex characters) */
|
|
15
|
+
public static String uniqueSuffix() {
|
|
16
|
+
byte[] bytes = new byte[3];
|
|
17
|
+
RANDOM.nextBytes(bytes);
|
|
18
|
+
return HexFormat.of().formatHex(bytes);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* A unique test e-mail address on the user's base address.
|
|
23
|
+
*
|
|
24
|
+
* @param base an address the user gave, e.g. `qa.team@company.test`
|
|
25
|
+
* @return `name+suffix@domain`
|
|
26
|
+
*/
|
|
27
|
+
public static String uniqueEmail(String base) {
|
|
28
|
+
int at = base.indexOf('@');
|
|
29
|
+
return base.substring(0, at) + "+" + uniqueSuffix() + base.substring(at);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A unique name with a readable prefix, e.g. `Customer k3f9a2`.
|
|
34
|
+
*
|
|
35
|
+
* @param prefix what the value is
|
|
36
|
+
* @return the prefix and a run-unique suffix
|
|
37
|
+
*/
|
|
38
|
+
public static String uniqueName(String prefix) {
|
|
39
|
+
return prefix + " " + uniqueSuffix();
|
|
40
|
+
}
|
|
41
|
+
}
|
package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/Redact.java
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
package automation.utils;
|
|
2
|
+
|
|
3
|
+
import automation.config.Env;
|
|
4
|
+
import java.util.Comparator;
|
|
5
|
+
import java.util.List;
|
|
6
|
+
import java.util.regex.Pattern;
|
|
7
|
+
|
|
8
|
+
/** Masks secret values before anything is logged: the values of every setting whose name marks it as a secret. */
|
|
9
|
+
public final class Redact {
|
|
10
|
+
/** Names that mark a setting as a secret. */
|
|
11
|
+
public static final Pattern SECRET_NAME = Pattern.compile("(PASSWORD|PASSWD|TOKEN|SECRET|API_KEY|COOKIE|SESSION)", Pattern.CASE_INSENSITIVE);
|
|
12
|
+
|
|
13
|
+
/** Not instantiable: use {@link #redact(String, String...)}. */
|
|
14
|
+
private Redact() {}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Replaces every secret value in a text with `***`.
|
|
18
|
+
*
|
|
19
|
+
* @param text the text to clean
|
|
20
|
+
* @param extra more values to mask, e.g. a token read at run time
|
|
21
|
+
* @return the text with the secrets masked
|
|
22
|
+
*/
|
|
23
|
+
public static String redact(String text, String... extra) {
|
|
24
|
+
List<String> values = new java.util.ArrayList<>(List.of(extra));
|
|
25
|
+
Env.all().forEach((name, value) -> {
|
|
26
|
+
if (SECRET_NAME.matcher(name).find() && value != null && value.length() >= 4) values.add(value);
|
|
27
|
+
});
|
|
28
|
+
values.sort(Comparator.comparingInt(String::length).reversed());
|
|
29
|
+
String out = String.valueOf(text);
|
|
30
|
+
for (String value : values) out = out.replace(value, "***");
|
|
31
|
+
return out;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
package automation.utils;
|
|
2
|
+
|
|
3
|
+
import java.util.List;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* One test case, as written in a description class in `desc/`: id, criterion, story, behaviour, preconditions, steps, expected
|
|
7
|
+
* result and tags (`smoke`, `write`, `signedOut`). Tests point to it with {@link Case}; the title and the TestNG groups
|
|
8
|
+
* come from here, so a result traces to its case and acceptance criterion.
|
|
9
|
+
*
|
|
10
|
+
* @param id case id, e.g. `TS-0`
|
|
11
|
+
* @param ac the acceptance criterion it covers, e.g. `AC-1`
|
|
12
|
+
* @param story the story or issue key
|
|
13
|
+
* @param title the behaviour, in the requirement's words
|
|
14
|
+
* @param preconditions what must be true before the steps
|
|
15
|
+
* @param steps what the test does
|
|
16
|
+
* @param expected the result the test asserts
|
|
17
|
+
* @param tags TestNG groups: `smoke` (quick check), `write` (changes data), `signedOut` (UI suites: starts signed out)
|
|
18
|
+
*/
|
|
19
|
+
public record TestDescription(String id, String ac, String story, String title, List<String> preconditions,
|
|
20
|
+
List<String> steps, String expected, List<String> tags) {
|
|
21
|
+
/** @return the title a test reports under: case id, story, behaviour */
|
|
22
|
+
public String fullTitle() {
|
|
23
|
+
return id + (story == null || story.isBlank() ? "" : " [" + story + "]") + " " + title;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# The suite's test data, in one place (read by testData/TestData.java). Values you give replace the defaults here;
|
|
2
|
+
# expected values come from the requirement or the API's documentation. Secrets are never here: they stay in .env by name.
|
|
3
|
+
|
|
4
|
+
# Paths of the API's resources, relative to API_BASE_URL
|
|
5
|
+
route.health={{HEALTH_PATH}}
|
|
6
|
+
route.products={{PRODUCTS_PATH}}
|
|
7
|
+
|
|
8
|
+
# Health check
|
|
9
|
+
health.status={{HEALTH_STATUS}}
|
|
10
|
+
|
|
11
|
+
# Products
|
|
12
|
+
products.createdStatus=201
|
|
13
|
+
products.notFoundStatus=404
|
|
14
|
+
products.unknownId=does-not-exist
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
|
|
2
|
+
<!-- One thread: the tests share a test environment. CaseTransformer gives @Case tests their title and groups from desc/.
|
|
3
|
+
Select with groups: mvn test -Dgroups=smoke (quick check), -Dgroups=unit; RUN_WRITE_TESTS=1 runs the `write` tests. -->
|
|
4
|
+
<suite name="{{PROJECT_NAME}}">
|
|
5
|
+
<listeners>
|
|
6
|
+
<listener class-name="automation.utils.CaseTransformer"/>
|
|
7
|
+
</listeners>
|
|
8
|
+
<test name="api">
|
|
9
|
+
<packages><package name="automation.tests.api"/></packages>
|
|
10
|
+
</test>
|
|
11
|
+
<test name="unit">
|
|
12
|
+
<packages><package name="automation.tests.unit"/></packages>
|
|
13
|
+
</test>
|
|
14
|
+
</suite>
|
|
@@ -32,7 +32,7 @@ Via the runner adapter (testng, junit5, pytest, nunit). Selenium has no runner o
|
|
|
32
32
|
- Options from the environment in the templates: `BROWSER` (chrome, firefox, edge), `HEADLESS` (default true), `BROWSER_BINARY` (a browser not on the default path), `BROWSER_ARGS` (comma-separated, e.g. `--no-sandbox,--disable-dev-shm-usage` in a root container), `TIMEOUT_SECONDS` (explicit waits). A Grid is not in the templates: add it in DriverFactory (`RemoteWebDriver` with the project's URL variable) when the project uses one.
|
|
33
33
|
|
|
34
34
|
## Initialize (new project, after Gate 4)
|
|
35
|
-
Copy the stack's folder from [templates/](templates/README.md) (Java + TestNG, Python + pytest, C# + NUnit), fill every `{{TOKEN}}`, pin versions, then run the smoke test; it must pass before any story test is written.
|
|
35
|
+
Copy the stack's folder from [templates/](templates/README.md) (Java + TestNG, Python + pytest, C# + NUnit; all on the suite architecture: sign in once and reuse the cookies, locators in page objects, data and cases in their own files), fill every `{{TOKEN}}`, pin versions, then run the smoke test; it must pass before any story test is written.
|
|
36
36
|
|
|
37
37
|
## Failure signals
|
|
38
38
|
| Signal | Likely class |
|