@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,28 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
/**
|
|
3
|
+
* What a GraphQL call returned: the HTTP status and the parsed body (`data` and, when something failed, `errors`).
|
|
4
|
+
* @typedef {object} GraphQLResult
|
|
5
|
+
* @property {number} status The HTTP status.
|
|
6
|
+
* @property {any} [data] The operation's data, or null.
|
|
7
|
+
* @property {{ message: string, path?: string[] }[]} [errors] What failed, when something did.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Sends one GraphQL operation as an HTTP POST with JSON (GraphQL over HTTP). Many servers answer 200 even when the
|
|
12
|
+
* operation failed and put the failure in `errors`, so tests check `errors` as well as the status.
|
|
13
|
+
* @param {import('@playwright/test').APIRequestContext} request Playwright's request context.
|
|
14
|
+
* @param {string} path The endpoint's path relative to the base URL, from the test data.
|
|
15
|
+
* @param {string} query The operation text, from the test data.
|
|
16
|
+
* @param {Record<string, unknown>} variables Its variables.
|
|
17
|
+
* @returns {Promise<GraphQLResult>} The status and body.
|
|
18
|
+
*/
|
|
19
|
+
async function graphql(request, path, query, variables) {
|
|
20
|
+
const response = await request.post(path, {
|
|
21
|
+
data: { query, variables },
|
|
22
|
+
headers: { accept: 'application/graphql-response+json, application/json;q=0.9' },
|
|
23
|
+
});
|
|
24
|
+
const body = await response.json();
|
|
25
|
+
return { status: response.status(), ...body };
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
module.exports = { graphql };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
const { QUALITY } = require('../../resources/desc/quality.desc');
|
|
3
|
+
const { graphqlCase } = require('../../resources/testData/qualityData');
|
|
4
|
+
const { graphql } = require('../../src/services/graphqlClient');
|
|
5
|
+
const { titleOf, tagsOf } = require('../../utils/titles');
|
|
6
|
+
const { test, expect } = require('../../fixtures');
|
|
7
|
+
|
|
8
|
+
test.describe('Quality checks: GraphQL', () => {
|
|
9
|
+
const d6 = QUALITY['QC-6'];
|
|
10
|
+
test(titleOf(d6), tagsOf(d6), async ({ request }) => {
|
|
11
|
+
const result = await graphql(request, graphqlCase.path, graphqlCase.query, { id: graphqlCase.knownId });
|
|
12
|
+
expect(result.status).toBe(200);
|
|
13
|
+
expect(result.errors).toBeUndefined();
|
|
14
|
+
expect(result.data?.product?.name).toBe(graphqlCase.expectedName);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const d7 = QUALITY['QC-7'];
|
|
18
|
+
test(titleOf(d7), tagsOf(d7), async ({ request }) => {
|
|
19
|
+
const result = await graphql(request, graphqlCase.path, graphqlCase.query, { id: graphqlCase.unknownId });
|
|
20
|
+
expect(result.data?.product ?? null).toBeNull();
|
|
21
|
+
expect(result.errors?.length ?? 0).toBeGreaterThan(0);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
const { describeViolations, failing, scanAccessibility } = require('../../src/checks/accessibility');
|
|
3
|
+
const { brokenLinks, recordConsoleErrors } = require('../../src/checks/pageHealth');
|
|
4
|
+
const { loadTimings } = require('../../src/checks/performance');
|
|
5
|
+
const { QUALITY } = require('../../resources/desc/quality.desc');
|
|
6
|
+
const { accessibility, loadBudgetMs, pages } = require('../../resources/testData/qualityData');
|
|
7
|
+
const { ScannedPage } = require('../../pageObjects/scannedPage');
|
|
8
|
+
const { titleOf, tagsOf } = require('../../utils/titles');
|
|
9
|
+
const { test, expect } = require('../../fixtures');
|
|
10
|
+
|
|
11
|
+
for (const target of pages) {
|
|
12
|
+
test.describe(`Quality checks: ${target.name}`, () => {
|
|
13
|
+
const d1 = QUALITY['QC-1'];
|
|
14
|
+
test(`${titleOf(d1)} (fail on ${accessibility.failOn.join(', ')}) [${target.name}]`, tagsOf(d1), async ({ page }) => {
|
|
15
|
+
await new ScannedPage(page, target.path).open();
|
|
16
|
+
const violations = await scanAccessibility(page, accessibility.tags);
|
|
17
|
+
const blocking = failing(violations, accessibility.failOn);
|
|
18
|
+
await test.info().attach('accessibility-violations', { body: describeViolations(violations) || 'none', contentType: 'text/plain' });
|
|
19
|
+
expect(blocking, describeViolations(blocking)).toEqual([]);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const d2 = QUALITY['QC-2'];
|
|
23
|
+
test(`${titleOf(d2)} [${target.name}]`, tagsOf(d2), async ({ page }) => {
|
|
24
|
+
const errors = recordConsoleErrors(page);
|
|
25
|
+
await new ScannedPage(page, target.path).open();
|
|
26
|
+
await page.waitForLoadState('load');
|
|
27
|
+
expect(errors).toEqual([]);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const d3 = QUALITY['QC-3'];
|
|
31
|
+
test(`${titleOf(d3)} [${target.name}]`, tagsOf(d3), async ({ page, request }) => {
|
|
32
|
+
await new ScannedPage(page, target.path).open();
|
|
33
|
+
expect(await brokenLinks(page, request)).toEqual([]);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const d4 = QUALITY['QC-4'];
|
|
37
|
+
test(`${titleOf(d4)} (${loadBudgetMs} ms) [${target.name}]`, tagsOf(d4), async ({ page }) => {
|
|
38
|
+
await new ScannedPage(page, target.path).open();
|
|
39
|
+
const timings = await loadTimings(page);
|
|
40
|
+
await test.info().attach('load-timings', { body: JSON.stringify(timings), contentType: 'application/json' });
|
|
41
|
+
expect(timings.load).toBeLessThanOrEqual(loadBudgetMs);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const d5 = QUALITY['QC-5'];
|
|
45
|
+
test(`${titleOf(d5)} [${target.name}]`, tagsOf(d5), async ({ page }) => {
|
|
46
|
+
await new ScannedPage(page, target.path).open();
|
|
47
|
+
await expect(page).toHaveScreenshot(`${target.name}.png`, { fullPage: true, animations: 'disabled' });
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Locator, Page } from '@playwright/test';
|
|
2
|
+
import { BasePage } from './basePage';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Any page a quality check scans, at the path the test data names. It opens through BasePage.open (the suite's one
|
|
6
|
+
* navigation helper) and is ready when the page's main landmark (or body, for pages without one) is visible. It has
|
|
7
|
+
* no actions and no assertions.
|
|
8
|
+
*/
|
|
9
|
+
export class ScannedPage extends BasePage {
|
|
10
|
+
protected readonly readyMarker: Locator;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @param page The Playwright page this object drives.
|
|
14
|
+
* @param path The page's path relative to `BASE_URL`, from `resources/testData/qualityData.ts`.
|
|
15
|
+
*/
|
|
16
|
+
constructor(page: Page, protected readonly path: string) {
|
|
17
|
+
super(page);
|
|
18
|
+
this.readyMarker = page.locator('main, body').first();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { TestDescription } from '../../utils/titles';
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Test descriptions of the quality checks the user chose: one per check. Specs take titles and tags from here and
|
|
5
|
+
* add the scanned page's name. Delete the entries of checks the user didn't choose.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/** The quality checks' test cases (all read-only, tagged @quality). */
|
|
9
|
+
export const QUALITY = {
|
|
10
|
+
'QC-1': {
|
|
11
|
+
id: 'QC-1', ac: 'QC', tags: ['@quality'],
|
|
12
|
+
title: 'accessibility: no blocking WCAG A/AA violations',
|
|
13
|
+
preconditions: ['The page is open and ready'],
|
|
14
|
+
steps: ['Scan the page with axe-core for the WCAG tags in the quality data'],
|
|
15
|
+
expected: 'No violation with an impact the user chose to fail on',
|
|
16
|
+
},
|
|
17
|
+
'QC-2': {
|
|
18
|
+
id: 'QC-2', ac: 'QC', tags: ['@quality'],
|
|
19
|
+
title: 'no console errors while the page loads',
|
|
20
|
+
preconditions: ['Console errors are recorded from before the page opens'],
|
|
21
|
+
steps: ['Open the page', 'Wait for the load event'],
|
|
22
|
+
expected: 'No console error and no uncaught exception',
|
|
23
|
+
},
|
|
24
|
+
'QC-3': {
|
|
25
|
+
id: 'QC-3', ac: 'QC', tags: ['@quality'],
|
|
26
|
+
title: 'every link on the page resolves',
|
|
27
|
+
preconditions: ['The page is open and ready'],
|
|
28
|
+
steps: ['Request every same-origin link on the page'],
|
|
29
|
+
expected: 'No link answers 400 or more',
|
|
30
|
+
},
|
|
31
|
+
'QC-4': {
|
|
32
|
+
id: 'QC-4', ac: 'QC', tags: ['@quality'],
|
|
33
|
+
title: 'the page loads within the agreed budget',
|
|
34
|
+
preconditions: ['The load budget the user agreed'],
|
|
35
|
+
steps: ['Open the page', 'Read the Navigation Timing entries'],
|
|
36
|
+
expected: 'The load event fires within the budget',
|
|
37
|
+
},
|
|
38
|
+
'QC-5': {
|
|
39
|
+
id: 'QC-5', ac: 'QC', tags: ['@quality'],
|
|
40
|
+
title: 'the page looks the same as its approved screenshot',
|
|
41
|
+
preconditions: ['A screenshot baseline the user approved'],
|
|
42
|
+
steps: ['Open the page', 'Take a full-page screenshot with animations off'],
|
|
43
|
+
expected: 'It matches the approved baseline',
|
|
44
|
+
},
|
|
45
|
+
'QC-6': {
|
|
46
|
+
id: 'QC-6', ac: 'QC', tags: ['@quality'],
|
|
47
|
+
title: 'the product query returns the product and no errors',
|
|
48
|
+
preconditions: ['A product id the API has'],
|
|
49
|
+
steps: ['POST the query with the known id'],
|
|
50
|
+
expected: 'HTTP 200, no errors, the expected product name',
|
|
51
|
+
},
|
|
52
|
+
'QC-7': {
|
|
53
|
+
id: 'QC-7', ac: 'QC', tags: ['@quality'],
|
|
54
|
+
title: 'an unknown product id comes back as a GraphQL error, not as a product',
|
|
55
|
+
preconditions: ['A product id the API does not have'],
|
|
56
|
+
steps: ['POST the query with the unknown id'],
|
|
57
|
+
expected: 'No product and at least one error',
|
|
58
|
+
},
|
|
59
|
+
} satisfies Record<string, TestDescription>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Test data of the quality checks the user chose on the setup card
|
|
3
|
-
* which pages, which accessibility level and which impacts fail a test, the load
|
|
2
|
+
* Test data of the quality checks the user chose on the setup card, next to the suite's `testData.ts`. Each value
|
|
3
|
+
* here was confirmed with the user: which pages, which accessibility level and which impacts fail a test, the load
|
|
4
|
+
* budget, and the GraphQL operation.
|
|
4
5
|
*/
|
|
5
6
|
|
|
6
7
|
/** A page the checks scan. */
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { QUALITY } from '../../resources/desc/quality.desc';
|
|
2
|
+
import { graphqlCase } from '../../resources/testData/qualityData';
|
|
3
|
+
import { graphql } from '../../src/services/graphqlClient';
|
|
4
|
+
import { titleOf, tagsOf } from '../../utils/titles';
|
|
5
|
+
import { test, expect } from '../../fixtures';
|
|
6
|
+
|
|
7
|
+
test.describe('Quality checks: GraphQL', () => {
|
|
8
|
+
const d6 = QUALITY['QC-6'];
|
|
9
|
+
test(titleOf(d6), tagsOf(d6), async ({ request }) => {
|
|
10
|
+
const result = await graphql<{ product: { name: string; stock: number } | null }>(request, graphqlCase.path, graphqlCase.query, { id: graphqlCase.knownId });
|
|
11
|
+
expect(result.status).toBe(200);
|
|
12
|
+
expect(result.errors).toBeUndefined();
|
|
13
|
+
expect(result.data?.product?.name).toBe(graphqlCase.expectedName);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const d7 = QUALITY['QC-7'];
|
|
17
|
+
test(titleOf(d7), tagsOf(d7), async ({ request }) => {
|
|
18
|
+
const result = await graphql<{ product: unknown }>(request, graphqlCase.path, graphqlCase.query, { id: graphqlCase.unknownId });
|
|
19
|
+
expect(result.data?.product ?? null).toBeNull();
|
|
20
|
+
expect(result.errors?.length ?? 0).toBeGreaterThan(0);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { describeViolations, failing, scanAccessibility } from '../../src/checks/accessibility';
|
|
2
|
+
import { brokenLinks, recordConsoleErrors } from '../../src/checks/pageHealth';
|
|
3
|
+
import { loadTimings } from '../../src/checks/performance';
|
|
4
|
+
import { QUALITY } from '../../resources/desc/quality.desc';
|
|
5
|
+
import { accessibility, loadBudgetMs, pages } from '../../resources/testData/qualityData';
|
|
6
|
+
import { ScannedPage } from '../../pageObjects/scannedPage';
|
|
7
|
+
import { titleOf, tagsOf } from '../../utils/titles';
|
|
8
|
+
import { test, expect } from '../../fixtures';
|
|
9
|
+
|
|
10
|
+
for (const target of pages) {
|
|
11
|
+
test.describe(`Quality checks: ${target.name}`, () => {
|
|
12
|
+
const d1 = QUALITY['QC-1'];
|
|
13
|
+
test(`${titleOf(d1)} (fail on ${accessibility.failOn.join(', ')}) [${target.name}]`, tagsOf(d1), async ({ page }) => {
|
|
14
|
+
await new ScannedPage(page, target.path).open();
|
|
15
|
+
const violations = await scanAccessibility(page, accessibility.tags);
|
|
16
|
+
const blocking = failing(violations, accessibility.failOn);
|
|
17
|
+
await test.info().attach('accessibility-violations', { body: describeViolations(violations) || 'none', contentType: 'text/plain' });
|
|
18
|
+
expect(blocking, describeViolations(blocking)).toEqual([]);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const d2 = QUALITY['QC-2'];
|
|
22
|
+
test(`${titleOf(d2)} [${target.name}]`, tagsOf(d2), async ({ page }) => {
|
|
23
|
+
const errors = recordConsoleErrors(page);
|
|
24
|
+
await new ScannedPage(page, target.path).open();
|
|
25
|
+
await page.waitForLoadState('load');
|
|
26
|
+
expect(errors).toEqual([]);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const d3 = QUALITY['QC-3'];
|
|
30
|
+
test(`${titleOf(d3)} [${target.name}]`, tagsOf(d3), async ({ page, request }) => {
|
|
31
|
+
await new ScannedPage(page, target.path).open();
|
|
32
|
+
expect(await brokenLinks(page, request)).toEqual([]);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const d4 = QUALITY['QC-4'];
|
|
36
|
+
test(`${titleOf(d4)} (${loadBudgetMs} ms) [${target.name}]`, tagsOf(d4), async ({ page }) => {
|
|
37
|
+
await new ScannedPage(page, target.path).open();
|
|
38
|
+
const timings = await loadTimings(page);
|
|
39
|
+
await test.info().attach('load-timings', { body: JSON.stringify(timings), contentType: 'application/json' });
|
|
40
|
+
expect(timings.load).toBeLessThanOrEqual(loadBudgetMs);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
const d5 = QUALITY['QC-5'];
|
|
44
|
+
test(`${titleOf(d5)} [${target.name}]`, tagsOf(d5), async ({ page }) => {
|
|
45
|
+
await new ScannedPage(page, target.path).open();
|
|
46
|
+
await expect(page).toHaveScreenshot(`${target.name}.png`, { fullPage: true, animations: 'disabled' });
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
}
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Used when a build starts a new API project in `sut/<app>/` (the user named this stack) or after Gate 4 approves it for an existing repo (D-nnn). Copy `python-pytest/`, fill every `{{TOKEN}}` (none may remain), rename `gitignore` to `.gitignore`, put the settings into the project's one `.env` (gitignored; names in `.env.example`), then run the health smoke test against the test environment before writing story tests.
|
|
4
4
|
|
|
5
|
-
- Stack: Python 3.9+, requests, pytest, jsonschema
|
|
6
|
-
- Tokens: `{{REQUESTS_VERSION}}`, `{{PYTEST_VERSION}}`, `{{JSONSCHEMA_VERSION}}`, `{{HEALTH_PATH}}`, `{{HEALTH_STATUS}}` (an unauthenticated health or status endpoint and its documented code); current versions are looked up at init and recorded.
|
|
7
|
-
- Files: `
|
|
8
|
-
- Settings at run time: `API_BASE_URL` (test environment), `API_TOKEN` (optional bearer token), read from the environment first, then `.env`.
|
|
5
|
+
- Stack: Python 3.9+, requests, pytest, jsonschema, pytest-html. The suite architecture for an API ([patterns.md](../../automation-implementation/references/patterns.md)): no pages and no browser; the token is set once on one shared client.
|
|
6
|
+
- Tokens: `{{REQUESTS_VERSION}}`, `{{PYTEST_VERSION}}`, `{{JSONSCHEMA_VERSION}}`, `{{PYTEST_HTML_VERSION}}`, `{{HEALTH_PATH}}`, `{{HEALTH_STATUS}}` (an unauthenticated health or status endpoint and its documented code), `{{PRODUCTS_PATH}}` (rename the products resource to the app's own); current versions are looked up at init and recorded.
|
|
7
|
+
- Files: `src/config/{env,flags,paths,load_env}.py` (settings; `.env` loaded first by `conftest.py`) · `src/services/api_client.py` (one session, token set once, timeout, `describe()` without headers) · `src/services/products_api.py` (one class per resource) · `resources/test_data/test_data.py` (paths, expected statuses, `new_product()` builder with run-unique values) · `resources/desc/products_desc.py` (TS-0 `smoke`, TS-1 `write`, TS-2) · `conftest.py` (`api`, `products` fixtures; `write` tests skipped unless `RUN_WRITE_TESTS=1`) · `tests/api/` · `tests/unit/` · `utils/` · `pytest.ini` (HTML report `reports/report.html`). Every function and class has a doc comment.
|
|
8
|
+
- Settings at run time: `API_BASE_URL` (test environment), `API_TOKEN` (optional bearer token), `RUN_WRITE_TESTS`, `LOG_LEVEL`, `TIMEOUT_SECONDS`, read from the environment first, then `.env`.
|
|
9
9
|
- CI (when the project has no test job and Gate 4 approves adding one): `ci/github-actions.yml` → `.github/workflows/api-tests.yml`; inputs `target`, `filter`, `repeat` (1 or 3); linted with actionlint 1.7.12 + shellcheck 0.11.0; its test step ran 3× on 2026-10-15 against the previous starter layout, and the command it calls is unchanged.
|
|
10
10
|
|
|
11
|
-
Run here 2026-
|
|
11
|
+
Run here 2026-11-12 (requests 2.32.5, pytest 9.2.0, pytest-html 4.2.0) against `evals/fixtures/api-stub/server.mjs`: 3/3 "6 passed, 1 skipped" (TS-1 is `write`); 3/3 "7 passed" with `RUN_WRITE_TESTS=1`; `-m smoke` 1 test; create status 201 → 200 fails with `Call POST /products: HTTP 201: …`; a wrong token fails TS-0 with HTTP 401 ([run record](../../../../evals/workflows/runs/2026-11-12-suite-architecture.md)).
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
One worked resource, **products**: a client per resource (`ProductsApi`: create, get, delete), a **builder** that makes a valid product with a run-unique name, a **cases file**, and two more cases: **TS-1** a created product can be read back unchanged (deleted in teardown, only after a successful create) and **TS-2** an unknown id answers 404. New token: `{{PRODUCTS_PATH}}`. Rename the resource to the app's own. Run here 2026-10-22 against `evals/fixtures/api-stub/server.mjs` (now with `/products`): 3/3 runs passed, fail check (create status 201 → 200) failed on the create assertion ([run record](../../../../evals/workflows/runs/2026-10-22-starter-v2.md)).
|
|
13
|
+
Earlier layouts: [2026-10-16](../../../../evals/workflows/runs/2026-10-16-starter-templates.md), [2026-10-22](../../../../evals/workflows/runs/2026-10-22-starter-v2.md).
|
|
@@ -1,17 +1,32 @@
|
|
|
1
|
-
"""Runner entry: loads the project's one `.env` and provides
|
|
2
|
-
|
|
1
|
+
"""Runner entry and fixtures: loads the project's one `.env` first and provides one shared API client (base URL and
|
|
2
|
+
token set once for the whole run) and the resource clients. Tests ask for these by name."""
|
|
3
|
+
from src.config.load_env import load_env_file
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
from api.config import load_env_file
|
|
6
|
-
from api.products_api import ProductsApi
|
|
7
|
-
from data import products_data
|
|
5
|
+
load_env_file() # first, so every setting below sees the .env
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
import pytest # noqa: E402
|
|
8
|
+
|
|
9
|
+
from resources.test_data.test_data import ROUTES # noqa: E402
|
|
10
|
+
from src.config import flags # noqa: E402
|
|
11
|
+
from src.services.api_client import ApiClient # noqa: E402
|
|
12
|
+
from src.services.products_api import ProductsApi # noqa: E402
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def pytest_collection_modifyitems(config, items):
|
|
16
|
+
"""Skip tests marked `write` unless RUN_WRITE_TESTS=1; add each case id to `-k` and its title to the report."""
|
|
17
|
+
skip_write = pytest.mark.skip(reason="creates or changes data in the API; set RUN_WRITE_TESTS=1 to run it")
|
|
18
|
+
for item in items:
|
|
19
|
+
if item.get_closest_marker("write") and not flags.run_write_tests():
|
|
20
|
+
item.add_marker(skip_write)
|
|
21
|
+
description = getattr(getattr(item, "function", None), "test_description", None)
|
|
22
|
+
if description is not None:
|
|
23
|
+
item.extra_keyword_matches.add(description.id)
|
|
24
|
+
item.user_properties.append(("title", item.function.__doc__))
|
|
10
25
|
|
|
11
26
|
|
|
12
27
|
@pytest.fixture(scope="session")
|
|
13
28
|
def api():
|
|
14
|
-
"""Yield one client for the whole
|
|
29
|
+
"""Yield one client for the whole run and close it afterwards."""
|
|
15
30
|
client = ApiClient.from_config()
|
|
16
31
|
yield client
|
|
17
32
|
client.close()
|
|
@@ -20,4 +35,4 @@ def api():
|
|
|
20
35
|
@pytest.fixture
|
|
21
36
|
def products(api) -> ProductsApi:
|
|
22
37
|
"""Return the products resource on the shared client."""
|
|
23
|
-
return ProductsApi(api,
|
|
38
|
+
return ProductsApi(api, ROUTES["products"])
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
[pytest]
|
|
2
2
|
testpaths = tests
|
|
3
|
-
# --tb=short: pytest's default long tracebacks print each frame's arguments (
|
|
4
|
-
|
|
3
|
+
# --tb=short: pytest's default long tracebacks print each frame's arguments (request headers with tokens).
|
|
4
|
+
# The HTML report is reports/report.html.
|
|
5
|
+
addopts = --tb=short --html=reports/report.html --self-contained-html
|
|
5
6
|
markers =
|
|
6
|
-
smoke:
|
|
7
|
+
smoke: the quick check (pytest -m smoke)
|
|
8
|
+
write: creates or changes data in the API; runs only with RUN_WRITE_TESTS=1
|
|
9
|
+
ac(name): the acceptance criterion a test covers
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Test data and test descriptions."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Test descriptions, one module per feature."""
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Test descriptions of the health check and the products resource: one per behaviour, keyed by case id. Tests take
|
|
2
|
+
their marks and titles from here (`utils/titles.case`). Replace these with the story's approved test cases."""
|
|
3
|
+
from utils.titles import TestDescription
|
|
4
|
+
|
|
5
|
+
PRODUCTS = {
|
|
6
|
+
"TS-0": TestDescription(
|
|
7
|
+
id="TS-0", ac="AC-0", tags=["smoke"],
|
|
8
|
+
title="the service answers the health check",
|
|
9
|
+
preconditions=["API_BASE_URL (and API_TOKEN, if the API needs one) set"],
|
|
10
|
+
steps=["GET the health endpoint"],
|
|
11
|
+
expected="The documented status",
|
|
12
|
+
),
|
|
13
|
+
"TS-1": TestDescription(
|
|
14
|
+
id="TS-1", ac="AC-1", tags=["write"],
|
|
15
|
+
title="a created product can be read back unchanged",
|
|
16
|
+
preconditions=["No product with this name"],
|
|
17
|
+
steps=["Create a product from the builder", "Read it by the returned id", "Delete it (only if it was created)"],
|
|
18
|
+
expected="201 on create; the read returns the same name and price",
|
|
19
|
+
),
|
|
20
|
+
"TS-2": TestDescription(
|
|
21
|
+
id="TS-2", ac="AC-1",
|
|
22
|
+
title="an unknown product id answers not found",
|
|
23
|
+
preconditions=["No product with this id"],
|
|
24
|
+
steps=["Read a product by an id that doesn't exist"],
|
|
25
|
+
expected="404",
|
|
26
|
+
),
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Test data and UI labels."""
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""The suite's test data, in one place: the API's paths, the expected statuses and values from the requirement or the
|
|
2
|
+
API's documentation, and builders that make valid synthetic records with run-unique values. Values you give replace
|
|
3
|
+
the defaults here. Secrets are never here: they stay in `.env` by name."""
|
|
4
|
+
from utils.random_data import unique_name
|
|
5
|
+
|
|
6
|
+
# Paths of the API's resources, relative to API_BASE_URL.
|
|
7
|
+
ROUTES = {
|
|
8
|
+
"health": "{{HEALTH_PATH}}",
|
|
9
|
+
"products": "{{PRODUCTS_PATH}}",
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
# Expected statuses and values per feature.
|
|
13
|
+
DATA = {
|
|
14
|
+
"health": {"status": {{HEALTH_STATUS}}},
|
|
15
|
+
"products": {"created_status": 201, "not_found_status": 404, "unknown_id": "does-not-exist"},
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def new_product(**overrides) -> dict:
|
|
20
|
+
"""Return a valid product with a run-unique name; a test overrides only the field it is about.
|
|
21
|
+
|
|
22
|
+
Args:
|
|
23
|
+
**overrides: Fields to change, e.g. ``price=0``.
|
|
24
|
+
"""
|
|
25
|
+
product = {"name": unique_name("Test product"), "price": 9.99}
|
|
26
|
+
product.update(overrides)
|
|
27
|
+
return product
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Framework code: configuration and services."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Settings, switches and file locations, read in one place."""
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""Settings of the suite, read in this one place, only when a value is used (importing never raises)."""
|
|
2
|
+
import os
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from utils.errors import MissingSettingError
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def required(name: str) -> str:
|
|
9
|
+
"""Return the value of a required setting.
|
|
10
|
+
|
|
11
|
+
Args:
|
|
12
|
+
name: Environment variable name, e.g. `API_BASE_URL`.
|
|
13
|
+
|
|
14
|
+
Raises:
|
|
15
|
+
MissingSettingError: When it isn't set.
|
|
16
|
+
"""
|
|
17
|
+
value = os.environ.get(name, "").strip()
|
|
18
|
+
if not value:
|
|
19
|
+
raise MissingSettingError(name)
|
|
20
|
+
return value
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def optional(name: str) -> Optional[str]:
|
|
24
|
+
"""Return the value of an optional setting, or None when it isn't set.
|
|
25
|
+
|
|
26
|
+
Args:
|
|
27
|
+
name: Environment variable name.
|
|
28
|
+
"""
|
|
29
|
+
return os.environ.get(name, "").strip() or None
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def base_url() -> str:
|
|
33
|
+
"""Return the API under test (`API_BASE_URL`, a test environment), without a trailing slash."""
|
|
34
|
+
return required("API_BASE_URL").rstrip("/")
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def token() -> Optional[str]:
|
|
38
|
+
"""Return the bearer token (`API_TOKEN`), or None for an API without one; never logged."""
|
|
39
|
+
return optional("API_TOKEN")
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""Switches and timeouts of a run, from the environment with safe defaults. Change behaviour here or in `.env`,
|
|
2
|
+
never inside a test. Read when used, so the `.env` loaded by `conftest.py` is always seen."""
|
|
3
|
+
import json
|
|
4
|
+
import os
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def measured_ms(key: str):
|
|
9
|
+
"""Return the site's measured timeout in ms for `key` (`timeouts.json` at the project root, written by Orion's
|
|
10
|
+
timing profile from the explored pages and the runs), or None when there is none."""
|
|
11
|
+
path = Path(__file__).resolve().parents[2] / "timeouts.json"
|
|
12
|
+
try:
|
|
13
|
+
value = json.loads(path.read_text(encoding="utf-8")).get(key, {}).get("ms")
|
|
14
|
+
except (OSError, ValueError, AttributeError):
|
|
15
|
+
return None
|
|
16
|
+
return int(value) if isinstance(value, (int, float)) and value > 0 else None
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def run_write_tests() -> bool:
|
|
20
|
+
"""Return True when tests marked `write` (they create or change data) should run: `RUN_WRITE_TESTS=1`."""
|
|
21
|
+
return os.environ.get("RUN_WRITE_TESTS") == "1"
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def log_level() -> str:
|
|
25
|
+
"""Return the log level of `utils/logger.py`: error, warn, info or debug (`LOG_LEVEL`)."""
|
|
26
|
+
return os.environ.get("LOG_LEVEL") or "info"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def timeout_seconds() -> int:
|
|
30
|
+
"""Return the per-request timeout in seconds (`TIMEOUT_SECONDS`; else the site's measured value in timeouts.json; default 30)."""
|
|
31
|
+
value = os.environ.get("TIMEOUT_SECONDS", "")
|
|
32
|
+
if value.isdigit() and int(value) > 0:
|
|
33
|
+
return int(value)
|
|
34
|
+
measured = measured_ms("requestTimeout")
|
|
35
|
+
return -(-measured // 1000) if measured else 30
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Loads the project's one `.env` into the environment. `conftest.py` calls it first; it is the only place that reads
|
|
2
|
+
the file. CI passes the same names as secrets instead."""
|
|
3
|
+
import os
|
|
4
|
+
|
|
5
|
+
from src.config.paths import paths
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def load_env_file() -> None:
|
|
9
|
+
"""Load `NAME=value` lines from the project's `.env`; variables already set (CI secrets) win; no file is fine."""
|
|
10
|
+
env_file = paths.root / ".env"
|
|
11
|
+
if not env_file.is_file():
|
|
12
|
+
return
|
|
13
|
+
for line in env_file.read_text(encoding="utf-8").splitlines():
|
|
14
|
+
if "=" in line and not line.lstrip().startswith("#"):
|
|
15
|
+
name, value = line.split("=", 1)
|
|
16
|
+
os.environ.setdefault(name.strip(), value.strip())
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Every file location the suite uses, in one place; nothing else builds a path."""
|
|
2
|
+
from dataclasses import dataclass
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@dataclass(frozen=True)
|
|
7
|
+
class Paths:
|
|
8
|
+
"""The project's folders and files."""
|
|
9
|
+
|
|
10
|
+
root: Path
|
|
11
|
+
reports: Path
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
_ROOT = Path(__file__).resolve().parents[2]
|
|
15
|
+
|
|
16
|
+
paths = Paths(root=_ROOT, reports=_ROOT / "reports")
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Clients for the API under test: one shared client, one class per resource."""
|
package/.claude/skills/requests/templates/python-pytest/{api/client.py → src/services/api_client.py}
RENAMED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
# @toolkit: shared helpers kept for stories to reuse; reuse or extend them before writing a new one.
|
|
2
|
+
"""One shared HTTP client for the API under test: base URL and token set once, per-request timeout, and failure
|
|
3
|
+
messages that never show headers (they can carry the token)."""
|
|
2
4
|
from typing import Optional
|
|
3
5
|
|
|
4
6
|
import requests
|
|
5
7
|
|
|
6
|
-
from
|
|
8
|
+
from src.config import env, flags
|
|
9
|
+
from utils import logger
|
|
7
10
|
|
|
8
11
|
|
|
9
12
|
class ApiClient:
|
|
10
|
-
"""One
|
|
13
|
+
"""One session for the whole run: JSON accept and, when given, the bearer token."""
|
|
11
14
|
|
|
12
15
|
def __init__(self, base_url: str, token: Optional[str] = None) -> None:
|
|
13
|
-
"""Open
|
|
16
|
+
"""Open the session.
|
|
14
17
|
|
|
15
18
|
Args:
|
|
16
19
|
base_url: The API's base URL.
|
|
@@ -24,11 +27,11 @@ class ApiClient:
|
|
|
24
27
|
|
|
25
28
|
@classmethod
|
|
26
29
|
def from_config(cls) -> "ApiClient":
|
|
27
|
-
"""Return a client for `API_BASE_URL` with `API_TOKEN` (raises
|
|
28
|
-
return cls(
|
|
30
|
+
"""Return a client for `API_BASE_URL` with `API_TOKEN` (raises MissingSettingError naming a missing base URL)."""
|
|
31
|
+
return cls(env.base_url(), env.token())
|
|
29
32
|
|
|
30
33
|
def request(self, method: str, path: str, **kwargs) -> requests.Response:
|
|
31
|
-
"""Send a request with the per-call timeout.
|
|
34
|
+
"""Send a request with the per-call timeout and log it (without headers).
|
|
32
35
|
|
|
33
36
|
Args:
|
|
34
37
|
method: HTTP method.
|
|
@@ -38,8 +41,10 @@ class ApiClient:
|
|
|
38
41
|
Returns:
|
|
39
42
|
The response, for the test to assert on.
|
|
40
43
|
"""
|
|
41
|
-
kwargs.setdefault("timeout",
|
|
42
|
-
|
|
44
|
+
kwargs.setdefault("timeout", flags.timeout_seconds())
|
|
45
|
+
response = self.session.request(method, f"{self.base_url}{path}", **kwargs)
|
|
46
|
+
logger.debug(f"{method} {path} -> {response.status_code}")
|
|
47
|
+
return response
|
|
43
48
|
|
|
44
49
|
def get(self, path: str, **kwargs) -> requests.Response:
|
|
45
50
|
"""Send a GET request; see `request`."""
|
|
@@ -59,7 +64,11 @@ class ApiClient:
|
|
|
59
64
|
|
|
60
65
|
|
|
61
66
|
def describe(response: requests.Response) -> str:
|
|
62
|
-
"""Return a failure message without headers
|
|
67
|
+
"""Return a failure message without headers: method, path, status and a short body.
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
response: The response a test asserted on.
|
|
71
|
+
"""
|
|
63
72
|
request = response.request
|
|
64
73
|
path = requests.utils.urlparse(request.url).path
|
|
65
74
|
return f"Call {request.method} {path}: HTTP {response.status_code}: {response.text[:300]}"
|