@orion-qa/orion 3.0.0 → 3.1.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/codebase-analyst.md +1 -1
- package/.claude/settings.json +9 -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 +2 -1
- package/.claude/skills/automation-implementation/SKILL.md +2 -1
- package/.claude/skills/automation-implementation/references/patterns.md +46 -24
- package/.claude/skills/code-review/SKILL.md +3 -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 +6 -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 +9 -7
- package/.claude/skills/orion/references/assess-fix.md +34 -0
- package/.claude/skills/orion/references/capabilities.md +1 -1
- package/.claude/skills/orion/references/conversation.md +9 -8
- package/.claude/skills/orion/references/delivery-formats.md +1 -1
- package/.claude/skills/orion/references/modes.md +3 -1
- package/.claude/skills/orion/references/project-context-files.md +6 -1
- package/.claude/skills/orion/references/setup-card.md +12 -6
- package/.claude/skills/orion/references/status-lines.md +6 -2
- 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/browser_setup.mjs +30 -15
- 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 +149 -0
- package/.claude/skills/orion/scripts/graph.mjs +400 -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/parity_check.mjs +166 -0
- package/.claude/skills/orion/scripts/report_check.mjs +77 -0
- package/.claude/skills/orion/scripts/results_parse.mjs +203 -0
- package/.claude/skills/orion/scripts/reuse_check.mjs +251 -0
- package/.claude/skills/orion/scripts/run_state.mjs +171 -0
- package/.claude/skills/orion/scripts/suite_check.mjs +228 -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/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 +18 -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 +59 -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 +83 -0
- package/.claude/skills/playwright/templates/javascript/fixtures/session.js +79 -0
- package/.claude/skills/playwright/templates/javascript/gitignore +7 -0
- package/.claude/skills/playwright/templates/javascript/jsconfig.json +11 -0
- package/.claude/skills/playwright/templates/javascript/package.json +7 -3
- package/.claude/skills/playwright/templates/javascript/pageObjects/basePage.js +58 -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 +42 -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 +79 -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 +84 -0
- package/.claude/skills/playwright/templates/project/fixtures/session.ts +76 -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 +53 -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 +46 -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 +81 -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 +54 -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/{framework/config.py → src/config/env.py} +24 -33
- 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 +40 -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 +38 -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 +17 -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 +1 -1
- package/.claude/skills/test-design/SKILL.md +1 -1
- package/.claude/skills/ui-observation/SKILL.md +7 -6
- package/.claude/skills/ui-observation/references/login-methods.md +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.cursor/commands/orion.md +1 -1
- package/.gemini/commands/orion.toml +2 -2
- package/.github/prompts/orion.prompt.md +2 -2
- package/.windsurf/workflows/orion.md +2 -2
- package/AGENTS.md +1 -1
- package/README.md +23 -3
- package/assets/architecture.svg +104 -0
- package/hosts/gemini-extension/gemini-extension.json +1 -1
- package/package.json +2 -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/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
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
"""The one error type the suite raises, so every failure reads the same way
|
|
1
|
+
"""The one error type the suite raises, so every failure reads the same way: what was being done, where (URL or
|
|
2
|
+
element), and what came back (status or state)."""
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
class AutomationError(Exception):
|
|
5
|
-
"""
|
|
6
|
+
"""A step of the suite failed: the action, where, and what came back."""
|
|
6
7
|
|
|
7
8
|
def __init__(self, action: str, where: str, detail: str) -> None:
|
|
8
9
|
"""Build the message from its three parts.
|
|
@@ -10,7 +11,7 @@ class AutomationError(Exception):
|
|
|
10
11
|
Args:
|
|
11
12
|
action: What the suite was doing, e.g. "Open" or "Wait for".
|
|
12
13
|
where: The URL or element it was acting on.
|
|
13
|
-
detail: What came back: the state that was never reached
|
|
14
|
+
detail: What came back: an HTTP status, or the state that was never reached.
|
|
14
15
|
"""
|
|
15
16
|
super().__init__(f"{action} {where}: {detail}")
|
|
16
17
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""The suite's logger: use it instead of `print`, so every line is levelled (`LOG_LEVEL`) and secrets are masked."""
|
|
2
|
+
from datetime import datetime, timezone
|
|
3
|
+
|
|
4
|
+
from src.config import flags
|
|
5
|
+
from utils.redact import redact
|
|
6
|
+
|
|
7
|
+
LEVELS = ["error", "warn", "info", "debug"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def _write(level: str, message: str) -> None:
|
|
11
|
+
"""Print one log line when its level is enabled, with secrets masked.
|
|
12
|
+
|
|
13
|
+
Args:
|
|
14
|
+
level: One of LEVELS.
|
|
15
|
+
message: The message.
|
|
16
|
+
"""
|
|
17
|
+
current = flags.log_level() if flags.log_level() in LEVELS else "info"
|
|
18
|
+
if LEVELS.index(level) > LEVELS.index(current):
|
|
19
|
+
return
|
|
20
|
+
print(f"{datetime.now(timezone.utc).isoformat()} {level.upper()} {redact(message)}", flush=True)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def error(message: str) -> None:
|
|
24
|
+
"""Log what failed."""
|
|
25
|
+
_write("error", message)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def warn(message: str) -> None:
|
|
29
|
+
"""Log what looks wrong but didn't fail."""
|
|
30
|
+
_write("warn", message)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def info(message: str) -> None:
|
|
34
|
+
"""Log a step worth seeing in a normal run."""
|
|
35
|
+
_write("info", message)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def debug(message: str) -> None:
|
|
39
|
+
"""Log detail for debugging only."""
|
|
40
|
+
_write("debug", message)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# @toolkit: shared helpers kept for stories to reuse; reuse or extend them before writing a new one.
|
|
2
|
+
"""Run-unique values for data a test creates, so repeated and parallel runs never collide with each other's data.
|
|
3
|
+
(Named `random_data`, not `random`, so it never hides Python's own module.)"""
|
|
4
|
+
import secrets
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def unique_suffix(length: int = 6) -> str:
|
|
8
|
+
"""Return a short suffix unique to this call, e.g. `k3f9a2` (lower-case hex).
|
|
9
|
+
|
|
10
|
+
Args:
|
|
11
|
+
length: Number of characters.
|
|
12
|
+
"""
|
|
13
|
+
return secrets.token_hex((length + 1) // 2)[:length]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def unique_email(base: str = "qa@example.test") -> str:
|
|
17
|
+
"""Return a unique test e-mail address on a reserved domain, or on the user's own base address.
|
|
18
|
+
|
|
19
|
+
Args:
|
|
20
|
+
base: An address the user gave, e.g. `qa.team@company.test`.
|
|
21
|
+
|
|
22
|
+
Returns:
|
|
23
|
+
`name+suffix@domain`.
|
|
24
|
+
"""
|
|
25
|
+
name, domain = base.split("@", 1)
|
|
26
|
+
return f"{name}+{unique_suffix()}@{domain}"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def unique_name(prefix: str) -> str:
|
|
30
|
+
"""Return a unique name with a readable prefix, e.g. `Customer k3f9a2`.
|
|
31
|
+
|
|
32
|
+
Args:
|
|
33
|
+
prefix: What the value is.
|
|
34
|
+
"""
|
|
35
|
+
return f"{prefix} {unique_suffix()}"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""Masks secret values before anything is logged or attached: the values of every environment variable whose name
|
|
2
|
+
marks it as a secret (password, token, secret, key, cookie), plus any value passed in."""
|
|
3
|
+
import os
|
|
4
|
+
import re
|
|
5
|
+
from typing import Iterable
|
|
6
|
+
|
|
7
|
+
SECRET_NAME = re.compile(r"(PASSWORD|PASSWD|TOKEN|SECRET|API_KEY|COOKIE|SESSION)", re.IGNORECASE)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def _secret_values() -> list:
|
|
11
|
+
"""Return the current secret values from the environment, longest first (values under 4 characters skipped)."""
|
|
12
|
+
values = [v for n, v in os.environ.items() if SECRET_NAME.search(n) and v and len(v) >= 4]
|
|
13
|
+
return sorted(values, key=len, reverse=True)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def redact(text: str, extra: Iterable[str] = ()) -> str:
|
|
17
|
+
"""Replace every secret value in a text with `***`.
|
|
18
|
+
|
|
19
|
+
Args:
|
|
20
|
+
text: The text to clean.
|
|
21
|
+
extra: More values to mask, e.g. a token read at run time.
|
|
22
|
+
|
|
23
|
+
Returns:
|
|
24
|
+
The text with the secrets masked.
|
|
25
|
+
"""
|
|
26
|
+
out = str(text)
|
|
27
|
+
for value in [*extra, *_secret_values()]:
|
|
28
|
+
if value:
|
|
29
|
+
out = out.replace(value, "***")
|
|
30
|
+
return out
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""Builds a test's id and marks from its description in `resources/desc`, so every result traces back to its case
|
|
2
|
+
id and acceptance criterion, and `-m smoke` / `write` select tests by their description."""
|
|
3
|
+
from dataclasses import dataclass, field
|
|
4
|
+
from typing import List, Optional
|
|
5
|
+
|
|
6
|
+
import pytest
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@dataclass(frozen=True)
|
|
10
|
+
class TestDescription:
|
|
11
|
+
"""One test case: id, criterion, story, behaviour, preconditions, steps, expected result, tags."""
|
|
12
|
+
|
|
13
|
+
__test__ = False # a data class, not a test (pytest would otherwise try to collect it)
|
|
14
|
+
|
|
15
|
+
id: str
|
|
16
|
+
ac: str
|
|
17
|
+
title: str
|
|
18
|
+
preconditions: List[str]
|
|
19
|
+
steps: List[str]
|
|
20
|
+
expected: str
|
|
21
|
+
story: Optional[str] = None
|
|
22
|
+
tags: List[str] = field(default_factory=list)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def title_of(d: TestDescription) -> str:
|
|
26
|
+
"""Return the title a test reports under: case id, story, behaviour, e.g. `TS-0 [EA-10] the user is greeted`.
|
|
27
|
+
|
|
28
|
+
Args:
|
|
29
|
+
d: The description.
|
|
30
|
+
"""
|
|
31
|
+
return f"{d.id}{f' [{d.story}]' if d.story else ''} {d.title}"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def case(d: TestDescription):
|
|
35
|
+
"""Decorate a test with its description: the `ac` mark, its tags as marks (`smoke`, `write`), and the title.
|
|
36
|
+
|
|
37
|
+
Args:
|
|
38
|
+
d: The description.
|
|
39
|
+
|
|
40
|
+
Returns:
|
|
41
|
+
A decorator for the test function.
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
def apply(fn):
|
|
45
|
+
"""Attach the marks and the title to the test function."""
|
|
46
|
+
fn = pytest.mark.ac(d.ac)(fn)
|
|
47
|
+
for tag in d.tags:
|
|
48
|
+
fn = getattr(pytest.mark, tag.lstrip("@"))(fn)
|
|
49
|
+
fn.__doc__ = title_of(d)
|
|
50
|
+
fn.test_description = d # conftest.py adds the id to `-k` keywords and the title to the report
|
|
51
|
+
return fn
|
|
52
|
+
|
|
53
|
+
return apply
|
|
@@ -15,7 +15,7 @@ description: Turns a user story, issue, ticket or free-text requirement into a s
|
|
|
15
15
|
- 401 → `blocked`, NEEDS_AUTHENTICATION; 403 → `blocked`, NEEDS_PERMISSION. Name the credential variable or connection to fix, never its value.
|
|
16
16
|
- 404 or "issue not found / does not exist" → `needs_user`, NEEDS_USER_INPUT (not NEEDS_ENVIRONMENT): ask the user to confirm the key and the site or project it lives in, and quote the connector response.
|
|
17
17
|
2. Write the objective in one sentence: who does what, and what outcome proves it.
|
|
18
|
-
3. Extract acceptance criteria as AC-1…AC-n. Keep the source wording; quote its location.
|
|
18
|
+
3. Extract acceptance criteria as AC-1…AC-n. Keep the source wording; quote its location. Inside one story the short id is enough; across stories (batches, the graph, `test-case-map.md`) the id is `<story>:AC-n`, e.g. `SHOP-12:AC-2`.
|
|
19
19
|
4. Check each AC is testable: observable result, deterministic, one behaviour. Split compound AC; mark untestable ones.
|
|
20
20
|
5. List business rules, inputs, outputs, preconditions, roles and out-of-scope items.
|
|
21
21
|
6. Find ambiguities: missing values, undefined terms, conflicting AC, unclear actors. Mark each **blocking** or **non-blocking**.
|
|
@@ -22,7 +22,7 @@ Adapter rules: holds only what differs from the capability skills; the project's
|
|
|
22
22
|
- **TLS:** never add `relaxedHTTPSValidation()` (S9) to pass a run; a certificate error is NEEDS_ENVIRONMENT. Use it only if the project already uses it for a named test environment, and report it as a security finding.
|
|
23
23
|
|
|
24
24
|
## Initialize (new project, after Gate 4)
|
|
25
|
-
Copy [templates/java-testng](templates/README.md) (one `ApiSpec
|
|
25
|
+
Copy [templates/java-testng](templates/README.md) (the suite architecture: one `ApiSpec` built once, token from `API_TOKEN`, `Authorization` masked; data in `testData.properties`, cases in `desc/`; select with `-Dgroups`), fill every `{{TOKEN}}`, run the health smoke test against the test environment. With JUnit 5 instead of TestNG, swap the runner dependency and annotations (junit5 adapter).
|
|
26
26
|
|
|
27
27
|
## Run
|
|
28
28
|
- The runner adapter's command (`mvn test -Dtest=<Class>`, `-Dgroups=…`; Gradle equivalents). New tests: 3 runs with retries off; all 3 must agree.
|
|
@@ -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 `java-testng/`, 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: Java 17+, Maven, TestNG, REST Assured
|
|
6
|
-
- Tokens: `{{PROJECT_NAME}}`, `{{STORY_KEY}}`, `{{REST_ASSURED_VERSION}}`, `{{TESTNG_VERSION}}`, `{{SUREFIRE_VERSION}}
|
|
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: Java 17+, Maven, TestNG, REST Assured. 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 request specification.
|
|
6
|
+
- Tokens: `{{PROJECT_NAME}}`, `{{STORY_KEY}}`, `{{REST_ASSURED_VERSION}}`, `{{TESTNG_VERSION}}`, `{{SUREFIRE_VERSION}}` (3.5.x: from 3.6.0 Surefire no longer reads `testng.xml`), `{{HEALTH_PATH}}`, `{{HEALTH_STATUS}}`, `{{PRODUCTS_PATH}}`; current versions are looked up at init and recorded.
|
|
7
|
+
- Files (`src/test/java/automation/`): `config/{Env,Flags,Paths}` · `services/{ApiSpec,HealthApi,ProductsApi}` (one spec built once; `Authorization` masked in logs) · `testData/{TestData,ProductBuilder}` with `src/test/resources/testData/testData.properties` (paths, expected statuses) · `desc/ProductsDesc` (cases; `@Case` + `utils/CaseTransformer` give titles and groups) · `fixtures/BaseTest` (`write` tests skipped unless `RUN_WRITE_TESTS=1`, in `IHookable.run`) · `tests/api/` · `tests/unit/` · `utils/` · `testng.xml`. Select with groups (`mvn test -Dgroups=smoke`), not `-Dtest` (it bypasses `testng.xml`).
|
|
8
|
+
- Settings at run time: `API_BASE_URL` (test environment), `API_TOKEN` (optional bearer token), `RUN_WRITE_TESTS`, `LOG_LEVEL`, 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 (rest-assured 6.3.0, TestNG 7.12.0, Surefire 3.5.6, JDK 21) against `evals/fixtures/api-stub/server.mjs`: 3/3 "tests 6, skipped 1" (TS-1 is `write`; before the fix a skip thrown in `@BeforeMethod` also skipped the tests after it); 3/3 "tests 6, skipped 0" with `RUN_WRITE_TESTS=1`; `-Dgroups=smoke` 1 test; create status 201 → 200 fails with `Expected status code <200> but was <201>`; the token appears 0 times in `target/` ([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).
|
|
@@ -18,7 +18,7 @@ on:
|
|
|
18
18
|
- "{{TEST_ENVIRONMENT}}"
|
|
19
19
|
default: "{{TEST_ENVIRONMENT}}"
|
|
20
20
|
filter:
|
|
21
|
-
description: "
|
|
21
|
+
description: "TestNG groups from the test descriptions (e.g. smoke, or a criterion like AC-1); -Dtest is not used: it bypasses testng.xml and its listeners"
|
|
22
22
|
required: false
|
|
23
23
|
default: ""
|
|
24
24
|
repeat:
|
|
@@ -55,8 +55,11 @@ jobs:
|
|
|
55
55
|
mkdir -p reports
|
|
56
56
|
for i in $(seq 1 "$TEST_REPEAT"); do
|
|
57
57
|
echo "::group::run $i of $TEST_REPEAT"
|
|
58
|
-
mvn -B test ${TEST_FILTER:+-
|
|
58
|
+
mvn -B test ${TEST_FILTER:+-Dgroups="$TEST_FILTER"} -Dsurefire.rerunFailingTestsCount=0 || status=1
|
|
59
59
|
mkdir -p "reports/run-$i" && cp -r target/surefire-reports/. "reports/run-$i/" 2>/dev/null || true
|
|
60
|
+
if [ -n "$TEST_FILTER" ] && grep -q ' tests="0"' target/surefire-reports/TEST-TestSuite.xml 2>/dev/null; then
|
|
61
|
+
echo "::error::no test is in the group(s) $TEST_FILTER"; status=1
|
|
62
|
+
fi
|
|
60
63
|
echo "::endgroup::"
|
|
61
64
|
done
|
|
62
65
|
exit $status
|
|
@@ -33,6 +33,13 @@
|
|
|
33
33
|
<groupId>org.apache.maven.plugins</groupId>
|
|
34
34
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
35
35
|
<version>{{SUREFIRE_VERSION}}</version>
|
|
36
|
+
<!-- 3.5.x on purpose: from 3.6.0 Surefire runs TestNG on the JUnit Platform and no longer reads testng.xml
|
|
37
|
+
("Parameter suiteXmlFiles is not supported since 3.6.0", measured 2026-11-12). -->
|
|
38
|
+
<configuration>
|
|
39
|
+
<suiteXmlFiles>
|
|
40
|
+
<suiteXmlFile>testng.xml</suiteXmlFile>
|
|
41
|
+
</suiteXmlFiles>
|
|
42
|
+
</configuration>
|
|
36
43
|
</plugin>
|
|
37
44
|
</plugins>
|
|
38
45
|
</build>
|
|
@@ -1,45 +1,48 @@
|
|
|
1
|
-
package automation.
|
|
1
|
+
package automation.config;
|
|
2
2
|
|
|
3
|
+
import automation.utils.AutomationError;
|
|
4
|
+
import automation.utils.MissingSettingError;
|
|
3
5
|
import java.io.IOException;
|
|
4
6
|
import java.nio.charset.StandardCharsets;
|
|
5
7
|
import java.nio.file.Files;
|
|
6
|
-
import java.nio.file.Path;
|
|
7
8
|
import java.util.HashMap;
|
|
8
9
|
import java.util.Map;
|
|
9
10
|
import java.util.Optional;
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Settings of the suite, read in this one place: the process environment first, then the project's one `.env`
|
|
13
|
-
* (gitignored
|
|
14
|
+
* (gitignored; Java can't change its own environment, so the file is read here, once, when a value is first needed).
|
|
15
|
+
* Loading a class never reads it or fails.
|
|
14
16
|
*/
|
|
15
|
-
public final class
|
|
17
|
+
public final class Env {
|
|
16
18
|
private static Map<String, String> envFile;
|
|
17
19
|
|
|
18
20
|
/** Not instantiable: all settings are static. */
|
|
19
|
-
private
|
|
21
|
+
private Env() {}
|
|
20
22
|
|
|
21
|
-
/**
|
|
22
|
-
* The API's base URL in the test environment.
|
|
23
|
-
*
|
|
24
|
-
* @return `API_BASE_URL`
|
|
25
|
-
* @throws ApiError when it isn't set
|
|
26
|
-
*/
|
|
23
|
+
/** @return the API under test (`API_BASE_URL`, a test environment), without a trailing slash */
|
|
27
24
|
public static String baseUrl() {
|
|
28
|
-
return
|
|
29
|
-
|
|
25
|
+
return required("API_BASE_URL").replaceAll("/+$", "");
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** @return the bearer token (`API_TOKEN`), if the API needs one; never logged */
|
|
29
|
+
public static Optional<String> token() {
|
|
30
|
+
return value("API_TOKEN");
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
/**
|
|
33
|
-
*
|
|
34
|
+
* A required setting.
|
|
34
35
|
*
|
|
35
|
-
* @
|
|
36
|
+
* @param name the variable name
|
|
37
|
+
* @return its value
|
|
38
|
+
* @throws MissingSettingError when it isn't set
|
|
36
39
|
*/
|
|
37
|
-
public static
|
|
38
|
-
return value(
|
|
40
|
+
public static String required(String name) {
|
|
41
|
+
return value(name).orElseThrow(() -> new MissingSettingError(name));
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
/**
|
|
42
|
-
*
|
|
45
|
+
* An optional setting: the process environment first, then the project's `.env`.
|
|
43
46
|
*
|
|
44
47
|
* @param name the variable name
|
|
45
48
|
* @return its value, or empty when unset or blank
|
|
@@ -50,6 +53,17 @@ public final class ApiConfig {
|
|
|
50
53
|
return raw == null || raw.isBlank() ? Optional.empty() : Optional.of(raw.trim());
|
|
51
54
|
}
|
|
52
55
|
|
|
56
|
+
/**
|
|
57
|
+
* Every setting in effect, for `utils/Redact` to find the secret ones by name.
|
|
58
|
+
*
|
|
59
|
+
* @return values by name, from the environment and the `.env`
|
|
60
|
+
*/
|
|
61
|
+
public static Map<String, String> all() {
|
|
62
|
+
Map<String, String> merged = new HashMap<>(envFile());
|
|
63
|
+
merged.putAll(System.getenv());
|
|
64
|
+
return merged;
|
|
65
|
+
}
|
|
66
|
+
|
|
53
67
|
/**
|
|
54
68
|
* The `NAME=value` lines of the project's `.env`, read once; empty when there is no file (CI uses secrets).
|
|
55
69
|
*
|
|
@@ -58,17 +72,16 @@ public final class ApiConfig {
|
|
|
58
72
|
private static synchronized Map<String, String> envFile() {
|
|
59
73
|
if (envFile == null) {
|
|
60
74
|
envFile = new HashMap<>();
|
|
61
|
-
|
|
62
|
-
if (Files.isRegularFile(path)) {
|
|
75
|
+
if (Files.isRegularFile(Paths.ENV_FILE)) {
|
|
63
76
|
try {
|
|
64
|
-
for (String line : Files.readAllLines(
|
|
77
|
+
for (String line : Files.readAllLines(Paths.ENV_FILE, StandardCharsets.UTF_8)) {
|
|
65
78
|
int eq = line.indexOf('=');
|
|
66
79
|
if (eq > 0 && !line.stripLeading().startsWith("#")) {
|
|
67
80
|
envFile.put(line.substring(0, eq).trim(), line.substring(eq + 1).trim());
|
|
68
81
|
}
|
|
69
82
|
}
|
|
70
83
|
} catch (IOException e) {
|
|
71
|
-
throw new
|
|
84
|
+
throw new AutomationError("Read", Paths.ENV_FILE.toString(), e.getMessage());
|
|
72
85
|
}
|
|
73
86
|
}
|
|
74
87
|
}
|
package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/config/Flags.java
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
package automation.config;
|
|
2
|
+
|
|
3
|
+
/** Switches of a run, from the environment with safe defaults. Change behaviour here or in `.env`, never in a test. */
|
|
4
|
+
public final class Flags {
|
|
5
|
+
/** Not instantiable: all switches are static. */
|
|
6
|
+
private Flags() {}
|
|
7
|
+
|
|
8
|
+
/** @return true when tests in the `write` group (they create or change data) should run: `RUN_WRITE_TESTS=1` */
|
|
9
|
+
public static boolean runWriteTests() {
|
|
10
|
+
return Env.value("RUN_WRITE_TESTS").orElse("").equals("1");
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** @return the log level of `utils/Log`: error, warn, info or debug (`LOG_LEVEL`, default info) */
|
|
14
|
+
public static String logLevel() {
|
|
15
|
+
return Env.value("LOG_LEVEL").orElse("info");
|
|
16
|
+
}
|
|
17
|
+
}
|
package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/config/Paths.java
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
package automation.config;
|
|
2
|
+
|
|
3
|
+
import java.nio.file.Path;
|
|
4
|
+
|
|
5
|
+
/** Every file location the suite uses, in one place; nothing else builds a path. Maven runs from the project root. */
|
|
6
|
+
public final class Paths {
|
|
7
|
+
/** The project root. */
|
|
8
|
+
public static final Path ROOT = Path.of("").toAbsolutePath();
|
|
9
|
+
/** The project's one `.env` (gitignored). */
|
|
10
|
+
public static final Path ENV_FILE = ROOT.resolve(".env");
|
|
11
|
+
|
|
12
|
+
/** Not instantiable: only constants. */
|
|
13
|
+
private Paths() {}
|
|
14
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
package automation.desc;
|
|
2
|
+
|
|
3
|
+
import automation.utils.TestDescription;
|
|
4
|
+
import java.util.List;
|
|
5
|
+
import java.util.Map;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Test descriptions of the health check and the products resource: one per behaviour, keyed by case id. Tests point
|
|
9
|
+
* here with `@Case(desc = ProductsDesc.class, id = "TS-0")`. Replace these with the story's approved test cases.
|
|
10
|
+
*/
|
|
11
|
+
public final class ProductsDesc {
|
|
12
|
+
/** The feature's cases, by id. */
|
|
13
|
+
public static final Map<String, TestDescription> CASES = Map.of(
|
|
14
|
+
"TS-0", new TestDescription("TS-0", "AC-0", "{{STORY_KEY}}", "the service answers the health check",
|
|
15
|
+
List.of("API_BASE_URL (and API_TOKEN, if the API needs one) set"), List.of("GET the health endpoint"),
|
|
16
|
+
"The documented status", List.of("smoke")),
|
|
17
|
+
"TS-1", new TestDescription("TS-1", "AC-1", "{{STORY_KEY}}", "a created product can be read back unchanged",
|
|
18
|
+
List.of("No product with this name"),
|
|
19
|
+
List.of("Create a product from the builder", "Read it by the returned id", "Delete it (only if it was created)"),
|
|
20
|
+
"201 on create; the read returns the same name and price", List.of("write")),
|
|
21
|
+
"TS-2", new TestDescription("TS-2", "AC-1", "{{STORY_KEY}}", "an unknown product id answers not found",
|
|
22
|
+
List.of("No product with this id"), List.of("Read a product by an id that doesn't exist"), "404", List.of()));
|
|
23
|
+
|
|
24
|
+
/** Not instantiable: only the cases. */
|
|
25
|
+
private ProductsDesc() {}
|
|
26
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
package automation.fixtures;
|
|
2
|
+
|
|
3
|
+
import automation.config.Flags;
|
|
4
|
+
import java.util.List;
|
|
5
|
+
import org.testng.IHookCallBack;
|
|
6
|
+
import org.testng.IHookable;
|
|
7
|
+
import org.testng.ITestResult;
|
|
8
|
+
import org.testng.SkipException;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* What every API test starts from: tests in the `write` group (they create or change data) are skipped unless
|
|
12
|
+
* `RUN_WRITE_TESTS=1`. The shared request specification (`services/ApiSpec`) is built once, on first use.
|
|
13
|
+
*/
|
|
14
|
+
public abstract class BaseTest implements IHookable {
|
|
15
|
+
/**
|
|
16
|
+
* Runs the test, or skips only this one when it is a `write` test and they aren't allowed (a skip thrown from a
|
|
17
|
+
* configuration method would skip the tests after it too).
|
|
18
|
+
*
|
|
19
|
+
* @param callBack runs the test method
|
|
20
|
+
* @param result the test (its groups include those `@Case` adds from the description)
|
|
21
|
+
*/
|
|
22
|
+
@Override
|
|
23
|
+
public void run(IHookCallBack callBack, ITestResult result) {
|
|
24
|
+
if (List.of(result.getMethod().getGroups()).contains("write") && !Flags.runWriteTests()) {
|
|
25
|
+
throw new SkipException("creates or changes data in the API; set RUN_WRITE_TESTS=1 to run it");
|
|
26
|
+
}
|
|
27
|
+
callBack.runTestMethod(result);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -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
|
}
|