@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
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
namespace Automation.Config;
|
|
2
|
+
|
|
3
|
+
/// <summary>Every file location the suite uses, in one place; nothing else builds a path.</summary>
|
|
4
|
+
public static class Paths
|
|
5
|
+
{
|
|
6
|
+
/// <summary>The project folder (the one with the .csproj): `dotnet test` runs from bin/, so it is found upwards.</summary>
|
|
7
|
+
public static readonly string Root = FindRoot();
|
|
8
|
+
|
|
9
|
+
/// <summary>The project's one `.env` (gitignored).</summary>
|
|
10
|
+
public static readonly string EnvFile = Path.Combine(Root, ".env");
|
|
11
|
+
|
|
12
|
+
/// <summary>Walks up from the test binaries to the folder that holds the project file.</summary>
|
|
13
|
+
/// <returns>That folder, or the binaries' folder when none is found.</returns>
|
|
14
|
+
private static string FindRoot()
|
|
15
|
+
{
|
|
16
|
+
for (var dir = new DirectoryInfo(AppContext.BaseDirectory); dir is not null; dir = dir.Parent)
|
|
17
|
+
{
|
|
18
|
+
if (dir.GetFiles("*.csproj").Length > 0) return dir.FullName;
|
|
19
|
+
}
|
|
20
|
+
return AppContext.BaseDirectory;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
using Automation.Config;
|
|
2
|
+
using NUnit.Framework;
|
|
3
|
+
|
|
4
|
+
namespace Automation.Fixtures;
|
|
5
|
+
|
|
6
|
+
/// <summary>
|
|
7
|
+
/// What every API test starts from: tests in the `write` category (they create or change data) are ignored unless
|
|
8
|
+
/// <c>RUN_WRITE_TESTS=1</c>. The shared client (`Services/ApiClient`) is built once, on first use.
|
|
9
|
+
/// </summary>
|
|
10
|
+
public abstract class BaseTest
|
|
11
|
+
{
|
|
12
|
+
/// <summary>Ignores `write` tests unless allowed.</summary>
|
|
13
|
+
[SetUp]
|
|
14
|
+
public void StartTest()
|
|
15
|
+
{
|
|
16
|
+
var categories = TestContext.CurrentContext.Test.Properties["Category"].Select(c => c.ToString());
|
|
17
|
+
if (categories.Contains("write") && !Flags.RunWriteTests())
|
|
18
|
+
{
|
|
19
|
+
Assert.Ignore("creates or changes data in the API; set RUN_WRITE_TESTS=1 to run it");
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
using Automation.Utils;
|
|
2
|
+
|
|
3
|
+
namespace Automation.Resources.Desc;
|
|
4
|
+
|
|
5
|
+
/// <summary>
|
|
6
|
+
/// Test descriptions of the health check and the products resource: one per behaviour, keyed by case id. Tests point
|
|
7
|
+
/// here with <c>[Case(typeof(ProductsDesc), "TS-0")]</c>. Replace these with the story's approved test cases.
|
|
8
|
+
/// </summary>
|
|
9
|
+
public static class ProductsDesc
|
|
10
|
+
{
|
|
11
|
+
/// <summary>The feature's cases, by id.</summary>
|
|
12
|
+
public static readonly IReadOnlyDictionary<string, TestDescription> Cases = new Dictionary<string, TestDescription>
|
|
13
|
+
{
|
|
14
|
+
["TS-0"] = new("TS-0", "AC-0", "{{STORY_KEY}}", "the service answers the health check",
|
|
15
|
+
["API_BASE_URL (and API_TOKEN, if the API needs one) set"], ["GET the health endpoint"], "The documented status", ["smoke"]),
|
|
16
|
+
["TS-1"] = new("TS-1", "AC-1", "{{STORY_KEY}}", "a created product can be read back unchanged", ["No product with this name"],
|
|
17
|
+
["Create a product from the builder", "Read it by the returned id", "Delete it (only if it was created)"],
|
|
18
|
+
"201 on create; the read returns the same name and price", ["write"]),
|
|
19
|
+
["TS-2"] = new("TS-2", "AC-1", "{{STORY_KEY}}", "an unknown product id answers not found", ["No product with this id"],
|
|
20
|
+
["Read a product by an id that doesn't exist"], "404", []),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
using System.Text.Json;
|
|
2
|
+
using System.Text.Json.Serialization;
|
|
3
|
+
using Automation.Utils;
|
|
4
|
+
|
|
5
|
+
namespace Automation.Resources.TestData;
|
|
6
|
+
|
|
7
|
+
/// <summary>
|
|
8
|
+
/// The suite's test data: values from `testData.json` (paths, expected statuses and values) and builders for data a
|
|
9
|
+
/// test creates (run-unique). Tests and pages read data only through here.
|
|
10
|
+
/// </summary>
|
|
11
|
+
public static class TestData
|
|
12
|
+
{
|
|
13
|
+
private static readonly Lazy<JsonElement> Values = new(Load);
|
|
14
|
+
|
|
15
|
+
/// <summary>Reads `testData.json` (copied next to the test binaries by the project file).</summary>
|
|
16
|
+
/// <returns>The document's root.</returns>
|
|
17
|
+
private static JsonElement Load()
|
|
18
|
+
{
|
|
19
|
+
var path = Path.Combine(AppContext.BaseDirectory, "Resources", "TestData", "testData.json");
|
|
20
|
+
if (!File.Exists(path)) throw new AutomationError("Read", path, "missing (is it copied to the output?)");
|
|
21
|
+
return JsonDocument.Parse(File.ReadAllText(path)).RootElement.Clone();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/// <summary>A value from the data file by its dotted path.</summary>
|
|
25
|
+
/// <param name="key">e.g. `signIn.greeting`.</param>
|
|
26
|
+
/// <returns>Its text.</returns>
|
|
27
|
+
/// <exception cref="AutomationError">When the key is missing.</exception>
|
|
28
|
+
public static string Value(string key)
|
|
29
|
+
{
|
|
30
|
+
var node = Values.Value;
|
|
31
|
+
foreach (var part in key.Split('.'))
|
|
32
|
+
{
|
|
33
|
+
if (node.ValueKind != JsonValueKind.Object || !node.TryGetProperty(part, out node))
|
|
34
|
+
throw new AutomationError("Read test data", key, "missing in testData.json");
|
|
35
|
+
}
|
|
36
|
+
return node.ToString();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/// <summary>A page's path, relative to <c>BASE_URL</c>.</summary>
|
|
40
|
+
/// <param name="page">e.g. `login`.</param>
|
|
41
|
+
/// <returns>`routes.<page>`.</returns>
|
|
42
|
+
public static string Route(string page) => Value($"routes.{page}");
|
|
43
|
+
|
|
44
|
+
/// <summary>A whole number from the data file, e.g. an expected status.</summary>
|
|
45
|
+
/// <param name="key">e.g. `products.createdStatus`.</param>
|
|
46
|
+
/// <returns>Its value.</returns>
|
|
47
|
+
public static int Number(string key) => int.Parse(Value(key));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/// <summary>A product's fields, as the API takes and returns them.</summary>
|
|
51
|
+
/// <param name="Name">The product's name.</param>
|
|
52
|
+
/// <param name="Price">Its price.</param>
|
|
53
|
+
public sealed record Product([property: JsonPropertyName("name")] string Name, [property: JsonPropertyName("price")] decimal Price);
|
|
54
|
+
|
|
55
|
+
/// <summary>Builds valid synthetic products: a new name per call, so tests never share or collide on records.</summary>
|
|
56
|
+
public static class ProductBuilder
|
|
57
|
+
{
|
|
58
|
+
/// <summary>A valid product with a run-unique name; a test changes only the field it is about (`with { Price = 0 }`).</summary>
|
|
59
|
+
/// <returns>The product.</returns>
|
|
60
|
+
public static Product NewProduct() => new(RandomData.UniqueName("Test product"), 9.99m);
|
|
61
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "The suite's test data, in one place (read by TestData.cs). Values you give replace the defaults here; expected values come from the requirement or the API's documentation. Secrets are never here: they stay in .env by name.",
|
|
3
|
+
"routes": {
|
|
4
|
+
"health": "{{HEALTH_PATH}}",
|
|
5
|
+
"products": "{{PRODUCTS_PATH}}"
|
|
6
|
+
},
|
|
7
|
+
"health": { "status": {{HEALTH_STATUS}} },
|
|
8
|
+
"products": { "createdStatus": 201, "notFoundStatus": 404, "unknownId": "does-not-exist" }
|
|
9
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// @toolkit: shared helpers kept for stories to reuse; reuse or extend them before writing a new one.
|
|
2
|
+
using System.Net.Http.Headers;
|
|
3
|
+
using Automation.Config;
|
|
4
|
+
using Automation.Utils;
|
|
5
|
+
|
|
6
|
+
namespace Automation.Services;
|
|
7
|
+
|
|
8
|
+
/// <summary>
|
|
9
|
+
/// One HttpClient for the whole run (a new client per test exhausts sockets): base address and token set once, from
|
|
10
|
+
/// `Config/Env`; failure messages never include headers, which carry the token.
|
|
11
|
+
/// </summary>
|
|
12
|
+
public static class ApiClient
|
|
13
|
+
{
|
|
14
|
+
private static readonly Lazy<HttpClient> Shared = new(Create);
|
|
15
|
+
|
|
16
|
+
/// <summary>Sends a request and logs it (without headers).</summary>
|
|
17
|
+
/// <param name="method">HTTP method.</param>
|
|
18
|
+
/// <param name="path">Path relative to <c>API_BASE_URL</c>, from the test data; a leading slash is removed so a base path is kept.</param>
|
|
19
|
+
/// <param name="content">The request body, or null.</param>
|
|
20
|
+
/// <returns>The response, for the test to assert on.</returns>
|
|
21
|
+
public static async Task<HttpResponseMessage> SendAsync(HttpMethod method, string path, HttpContent? content = null)
|
|
22
|
+
{
|
|
23
|
+
using var request = new HttpRequestMessage(method, path.TrimStart('/')) { Content = content };
|
|
24
|
+
var response = await Shared.Value.SendAsync(request);
|
|
25
|
+
Log.Debug($"{method} {path} -> {(int)response.StatusCode}");
|
|
26
|
+
return response;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/// <summary>A failure message without headers (they can carry the token): method, path, status and a short body.</summary>
|
|
30
|
+
/// <param name="response">The response to describe.</param>
|
|
31
|
+
/// <returns>"Call METHOD /path: HTTP n: body".</returns>
|
|
32
|
+
public static async Task<string> DescribeAsync(HttpResponseMessage response)
|
|
33
|
+
{
|
|
34
|
+
var body = await response.Content.ReadAsStringAsync();
|
|
35
|
+
var request = response.RequestMessage;
|
|
36
|
+
return $"Call {request?.Method} {request?.RequestUri?.AbsolutePath}: HTTP {(int)response.StatusCode}: {body[..Math.Min(body.Length, 300)]}";
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/// <summary>Builds the shared client: base address, JSON accept, timeout and, when set, the bearer token.</summary>
|
|
40
|
+
/// <returns>The client.</returns>
|
|
41
|
+
private static HttpClient Create()
|
|
42
|
+
{
|
|
43
|
+
var client = new HttpClient { BaseAddress = new Uri(Env.BaseUrl() + "/"), Timeout = Flags.Timeout() };
|
|
44
|
+
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
|
|
45
|
+
if (Env.Token() is { } token) client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
|
|
46
|
+
return client;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
using Automation.Resources.TestData;
|
|
2
|
+
|
|
3
|
+
namespace Automation.Services;
|
|
4
|
+
|
|
5
|
+
/// <summary>Client for the health endpoint; tests assert on what it returns.</summary>
|
|
6
|
+
public static class HealthApi
|
|
7
|
+
{
|
|
8
|
+
/// <summary>Calls the health endpoint.</summary>
|
|
9
|
+
/// <returns>The response.</returns>
|
|
10
|
+
public static Task<HttpResponseMessage> GetAsync() => ApiClient.SendAsync(HttpMethod.Get, TestData.Route("health"));
|
|
11
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
using System.Net.Http.Json;
|
|
2
|
-
using Automation.
|
|
2
|
+
using Automation.Resources.TestData;
|
|
3
3
|
|
|
4
|
-
namespace Automation.
|
|
4
|
+
namespace Automation.Services;
|
|
5
5
|
|
|
6
6
|
/// <summary>
|
|
7
7
|
/// Calls for one resource, products: each method is one request; tests assert on what comes back.
|
|
@@ -9,19 +9,22 @@ namespace Automation.Api;
|
|
|
9
9
|
/// </summary>
|
|
10
10
|
public static class ProductsApi
|
|
11
11
|
{
|
|
12
|
+
/// <summary>The resource's path, from the test data.</summary>
|
|
13
|
+
private static string ResourcePath => TestData.Route("products");
|
|
14
|
+
|
|
12
15
|
/// <summary>Creates a product.</summary>
|
|
13
16
|
/// <param name="product">The product's fields, from the builder.</param>
|
|
14
17
|
/// <returns>The response (201 with the new product).</returns>
|
|
15
18
|
public static Task<HttpResponseMessage> CreateAsync(Product product) =>
|
|
16
|
-
ApiClient.
|
|
19
|
+
ApiClient.SendAsync(HttpMethod.Post, ResourcePath, JsonContent.Create(product));
|
|
17
20
|
|
|
18
21
|
/// <summary>Reads one product.</summary>
|
|
19
22
|
/// <param name="id">The product's id.</param>
|
|
20
23
|
/// <returns>The response.</returns>
|
|
21
|
-
public static Task<HttpResponseMessage> GetAsync(string id) => ApiClient.
|
|
24
|
+
public static Task<HttpResponseMessage> GetAsync(string id) => ApiClient.SendAsync(HttpMethod.Get, $"{ResourcePath}/{id}");
|
|
22
25
|
|
|
23
26
|
/// <summary>Deletes one product (cleanup).</summary>
|
|
24
27
|
/// <param name="id">The product's id.</param>
|
|
25
28
|
/// <returns>The response.</returns>
|
|
26
|
-
public static Task<HttpResponseMessage> DeleteAsync(string id) => ApiClient.
|
|
29
|
+
public static Task<HttpResponseMessage> DeleteAsync(string id) => ApiClient.SendAsync(HttpMethod.Delete, $"{ResourcePath}/{id}");
|
|
27
30
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
using System.Net.Http.Json;
|
|
2
|
+
using System.Text.Json.Serialization;
|
|
3
|
+
using Automation.Fixtures;
|
|
4
|
+
using Automation.Resources.Desc;
|
|
5
|
+
using Automation.Resources.TestData;
|
|
6
|
+
using Automation.Services;
|
|
7
|
+
using Automation.Utils;
|
|
8
|
+
using NUnit.Framework;
|
|
9
|
+
|
|
10
|
+
namespace Automation.Tests.Api;
|
|
11
|
+
|
|
12
|
+
/// <summary>Health check and products: each test takes its title and categories from `Resources/Desc/ProductsDesc`.</summary>
|
|
13
|
+
public class ProductsTests : BaseTest
|
|
14
|
+
{
|
|
15
|
+
/// <summary>The fields of a product the API returns, including its id.</summary>
|
|
16
|
+
/// <param name="Id">The product's id.</param>
|
|
17
|
+
/// <param name="Name">Its name.</param>
|
|
18
|
+
/// <param name="Price">Its price.</param>
|
|
19
|
+
private sealed record StoredProduct([property: JsonPropertyName("id")] string Id, [property: JsonPropertyName("name")] string Name, [property: JsonPropertyName("price")] decimal Price);
|
|
20
|
+
|
|
21
|
+
/// <summary>TS-0 (title and categories from the description).</summary>
|
|
22
|
+
/// <returns>The test's task.</returns>
|
|
23
|
+
[Test, Case(typeof(ProductsDesc), "TS-0")]
|
|
24
|
+
public async Task ServiceAnswersHealthCheck()
|
|
25
|
+
{
|
|
26
|
+
using var response = await HealthApi.GetAsync();
|
|
27
|
+
Assert.That((int)response.StatusCode, Is.EqualTo(TestData.Number("health.status")), await ApiClient.DescribeAsync(response));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/// <summary>TS-1 (title and categories from the description).</summary>
|
|
31
|
+
/// <returns>The test's task.</returns>
|
|
32
|
+
[Test, Case(typeof(ProductsDesc), "TS-1")]
|
|
33
|
+
public async Task CreatedProductCanBeReadBack()
|
|
34
|
+
{
|
|
35
|
+
var product = ProductBuilder.NewProduct();
|
|
36
|
+
using var created = await ProductsApi.CreateAsync(product);
|
|
37
|
+
Assert.That((int)created.StatusCode, Is.EqualTo(TestData.Number("products.createdStatus")), await ApiClient.DescribeAsync(created));
|
|
38
|
+
var id = (await created.Content.ReadFromJsonAsync<StoredProduct>())!.Id;
|
|
39
|
+
try
|
|
40
|
+
{
|
|
41
|
+
using var read = await ProductsApi.GetAsync(id);
|
|
42
|
+
Assert.That((int)read.StatusCode, Is.EqualTo(200), await ApiClient.DescribeAsync(read));
|
|
43
|
+
var stored = await read.Content.ReadFromJsonAsync<StoredProduct>();
|
|
44
|
+
Assert.That(new Product(stored!.Name, stored.Price), Is.EqualTo(product));
|
|
45
|
+
}
|
|
46
|
+
finally
|
|
47
|
+
{
|
|
48
|
+
// Teardown runs only when the create above succeeded.
|
|
49
|
+
using var _ = await ProductsApi.DeleteAsync(id);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/// <summary>TS-2 (title and categories from the description).</summary>
|
|
54
|
+
/// <returns>The test's task.</returns>
|
|
55
|
+
[Test, Case(typeof(ProductsDesc), "TS-2")]
|
|
56
|
+
public async Task UnknownProductAnswersNotFound()
|
|
57
|
+
{
|
|
58
|
+
using var response = await ProductsApi.GetAsync(TestData.Value("products.unknownId"));
|
|
59
|
+
Assert.That((int)response.StatusCode, Is.EqualTo(TestData.Number("products.notFoundStatus")), await ApiClient.DescribeAsync(response));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
using System.Text.RegularExpressions;
|
|
2
|
+
using Automation.Utils;
|
|
3
|
+
using NUnit.Framework;
|
|
4
|
+
|
|
5
|
+
namespace Automation.Tests.Unit;
|
|
6
|
+
|
|
7
|
+
/// <summary>Unit tests of the suite's own helpers: no browser and no app, so they run in seconds (`--filter TestCategory=unit`).</summary>
|
|
8
|
+
[Category("unit")]
|
|
9
|
+
public class UtilsTests
|
|
10
|
+
{
|
|
11
|
+
/// <summary>UniqueSuffix gives a different value each call.</summary>
|
|
12
|
+
[Test]
|
|
13
|
+
public void UniqueSuffixDiffersEachCall() =>
|
|
14
|
+
Assert.That(Enumerable.Range(0, 50).Select(_ => RandomData.UniqueSuffix()).Distinct().Count(), Is.EqualTo(50));
|
|
15
|
+
|
|
16
|
+
/// <summary>UniqueEmail keeps the base address and adds a tag.</summary>
|
|
17
|
+
[Test]
|
|
18
|
+
public void UniqueEmailKeepsBaseAndAddsTag() =>
|
|
19
|
+
Assert.That(Regex.IsMatch(RandomData.UniqueEmail("qa.team@company.test"), @"^qa\.team\+[0-9a-f]{6}@company\.test$"), Is.True);
|
|
20
|
+
|
|
21
|
+
/// <summary>Redact masks the values of secret environment variables.</summary>
|
|
22
|
+
[Test]
|
|
23
|
+
public void RedactMasksSecretEnvironmentValues()
|
|
24
|
+
{
|
|
25
|
+
Environment.SetEnvironmentVariable("UNIT_TEST_PASSWORD", "pa55-word-xyz");
|
|
26
|
+
try
|
|
27
|
+
{
|
|
28
|
+
Assert.That(Redact.Mask("login with pa55-word-xyz failed"), Is.EqualTo("login with *** failed"));
|
|
29
|
+
}
|
|
30
|
+
finally
|
|
31
|
+
{
|
|
32
|
+
Environment.SetEnvironmentVariable("UNIT_TEST_PASSWORD", null);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/// <summary>AddDays and IsoDate compute dates from a fixed day.</summary>
|
|
37
|
+
[Test]
|
|
38
|
+
public void AddDaysAndIsoDateFromAFixedDay() =>
|
|
39
|
+
Assert.That(Dates.IsoDate(Dates.AddDays(1, new DateOnly(2026, 1, 31))), Is.EqualTo("2026-02-01"));
|
|
40
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
namespace Automation.Utils;
|
|
2
|
+
|
|
3
|
+
/// <summary>
|
|
4
|
+
/// The one error type the suite raises, so every failure reads the same way: what was being done, where (URL or
|
|
5
|
+
/// element), and what came back (status or state).
|
|
6
|
+
/// </summary>
|
|
7
|
+
/// <param name="action">What the suite was doing, e.g. "Open" or "Wait for".</param>
|
|
8
|
+
/// <param name="where">The URL or element it was acting on.</param>
|
|
9
|
+
/// <param name="detail">What came back: an HTTP status, or the state that was never reached.</param>
|
|
10
|
+
public class AutomationError(string action, string where, string detail) : Exception($"{action} {where}: {detail}");
|
|
11
|
+
|
|
12
|
+
/// <summary>A setting the run needs is missing from the environment and the project's `.env`.</summary>
|
|
13
|
+
/// <param name="name">The environment variable that has no value.</param>
|
|
14
|
+
public class MissingSettingError(string name)
|
|
15
|
+
: AutomationError("Read setting", name, "not set (add it to the project .env or the CI secrets; never to code)");
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// @toolkit: shared helpers kept for stories to reuse; reuse or extend them before writing a new one.
|
|
2
|
+
namespace Automation.Utils;
|
|
3
|
+
|
|
4
|
+
/// <summary>Dates as tests need them: computed from today, so data stays valid on any day the suite runs.</summary>
|
|
5
|
+
public static class Dates
|
|
6
|
+
{
|
|
7
|
+
/// <summary>A date a number of days from a start date (default today, UTC); negative for the past.</summary>
|
|
8
|
+
/// <param name="days">Days to add.</param>
|
|
9
|
+
/// <param name="start">The start date.</param>
|
|
10
|
+
/// <returns>The new date.</returns>
|
|
11
|
+
public static DateOnly AddDays(int days, DateOnly? start = null) =>
|
|
12
|
+
(start ?? DateOnly.FromDateTime(DateTime.UtcNow)).AddDays(days);
|
|
13
|
+
|
|
14
|
+
/// <summary>A date as `YYYY-MM-DD`, the format most date inputs and APIs accept.</summary>
|
|
15
|
+
/// <param name="date">The date.</param>
|
|
16
|
+
/// <returns>The ISO date.</returns>
|
|
17
|
+
public static string IsoDate(DateOnly date) => date.ToString("yyyy-MM-dd");
|
|
18
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// @toolkit: shared helpers kept for stories to reuse; reuse or extend them before writing a new one.
|
|
2
|
+
using Automation.Config;
|
|
3
|
+
using NUnit.Framework;
|
|
4
|
+
|
|
5
|
+
namespace Automation.Utils;
|
|
6
|
+
|
|
7
|
+
/// <summary>The suite's logger: use it instead of Console, so every line is levelled (<c>LOG_LEVEL</c>) and secrets are masked.</summary>
|
|
8
|
+
public static class Log
|
|
9
|
+
{
|
|
10
|
+
private static readonly string[] Levels = ["error", "warn", "info", "debug"];
|
|
11
|
+
|
|
12
|
+
/// <summary>Writes one log line when its level is enabled.</summary>
|
|
13
|
+
/// <param name="level">One of error, warn, info, debug.</param>
|
|
14
|
+
/// <param name="message">The message.</param>
|
|
15
|
+
private static void Write(string level, string message)
|
|
16
|
+
{
|
|
17
|
+
var current = Array.IndexOf(Levels, Flags.LogLevel());
|
|
18
|
+
if (Array.IndexOf(Levels, level) > (current < 0 ? 2 : current)) return;
|
|
19
|
+
TestContext.Progress.WriteLine($"{DateTime.UtcNow:O} {level.ToUpperInvariant()} {Redact.Mask(message)}");
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/// <summary>Logs what failed.</summary>
|
|
23
|
+
/// <param name="message">The message.</param>
|
|
24
|
+
public static void Error(string message) => Write("error", message);
|
|
25
|
+
|
|
26
|
+
/// <summary>Logs what looks wrong but didn't fail.</summary>
|
|
27
|
+
/// <param name="message">The message.</param>
|
|
28
|
+
public static void Warn(string message) => Write("warn", message);
|
|
29
|
+
|
|
30
|
+
/// <summary>Logs a step worth seeing in a normal run.</summary>
|
|
31
|
+
/// <param name="message">The message.</param>
|
|
32
|
+
public static void Info(string message) => Write("info", message);
|
|
33
|
+
|
|
34
|
+
/// <summary>Logs detail for debugging only.</summary>
|
|
35
|
+
/// <param name="message">The message.</param>
|
|
36
|
+
public static void Debug(string message) => Write("debug", message);
|
|
37
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// @toolkit: shared helpers kept for stories to reuse; reuse or extend them before writing a new one.
|
|
2
|
+
using System.Security.Cryptography;
|
|
3
|
+
|
|
4
|
+
namespace Automation.Utils;
|
|
5
|
+
|
|
6
|
+
/// <summary>Run-unique values for data a test creates, so repeated and parallel runs never collide with each other's data.</summary>
|
|
7
|
+
public static class RandomData
|
|
8
|
+
{
|
|
9
|
+
/// <summary>A short suffix unique to this call, e.g. `k3f9a2`.</summary>
|
|
10
|
+
/// <returns>6 lower-case hex characters.</returns>
|
|
11
|
+
public static string UniqueSuffix() => Convert.ToHexString(RandomNumberGenerator.GetBytes(3)).ToLowerInvariant();
|
|
12
|
+
|
|
13
|
+
/// <summary>A unique test e-mail address on the user's base address.</summary>
|
|
14
|
+
/// <param name="baseAddress">An address the user gave, e.g. `qa.team@company.test`.</param>
|
|
15
|
+
/// <returns>`name+suffix@domain`.</returns>
|
|
16
|
+
public static string UniqueEmail(string baseAddress)
|
|
17
|
+
{
|
|
18
|
+
var at = baseAddress.IndexOf('@');
|
|
19
|
+
return $"{baseAddress[..at]}+{UniqueSuffix()}{baseAddress[at..]}";
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/// <summary>A unique name with a readable prefix, e.g. `Customer k3f9a2`.</summary>
|
|
23
|
+
/// <param name="prefix">What the value is.</param>
|
|
24
|
+
/// <returns>The prefix and a run-unique suffix.</returns>
|
|
25
|
+
public static string UniqueName(string prefix) => $"{prefix} {UniqueSuffix()}";
|
|
26
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
using System.Text.RegularExpressions;
|
|
2
|
+
using Automation.Config;
|
|
3
|
+
|
|
4
|
+
namespace Automation.Utils;
|
|
5
|
+
|
|
6
|
+
/// <summary>Masks secret values before anything is logged: the values of every setting whose name marks it as a secret.</summary>
|
|
7
|
+
public static class Redact
|
|
8
|
+
{
|
|
9
|
+
/// <summary>Names that mark a setting as a secret.</summary>
|
|
10
|
+
public static readonly Regex SecretName = new("(PASSWORD|PASSWD|TOKEN|SECRET|API_KEY|COOKIE|SESSION)", RegexOptions.IgnoreCase);
|
|
11
|
+
|
|
12
|
+
/// <summary>Replaces every secret value in a text with `***`.</summary>
|
|
13
|
+
/// <param name="text">The text to clean.</param>
|
|
14
|
+
/// <param name="extra">More values to mask, e.g. a token read at run time.</param>
|
|
15
|
+
/// <returns>The text with the secrets masked.</returns>
|
|
16
|
+
public static string Mask(string text, params string[] extra)
|
|
17
|
+
{
|
|
18
|
+
var values = extra.Concat(Env.All().Where(e => SecretName.IsMatch(e.Key) && e.Value.Length >= 4).Select(e => e.Value))
|
|
19
|
+
.OrderByDescending(v => v.Length);
|
|
20
|
+
return values.Aggregate(text, (current, value) => current.Replace(value, "***"));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
using NUnit.Framework;
|
|
2
|
+
using NUnit.Framework.Interfaces;
|
|
3
|
+
using NUnit.Framework.Internal;
|
|
4
|
+
|
|
5
|
+
namespace Automation.Utils;
|
|
6
|
+
|
|
7
|
+
/// <summary>
|
|
8
|
+
/// One test case, as written in a description class in `Resources/Desc`: id, criterion, story, behaviour,
|
|
9
|
+
/// preconditions, steps, expected result and tags (`smoke`, `write`). Tests point to it with
|
|
10
|
+
/// <see cref="CaseAttribute"/>; the title and the NUnit categories come from here.
|
|
11
|
+
/// </summary>
|
|
12
|
+
/// <param name="Id">Case id, e.g. `TS-0`.</param>
|
|
13
|
+
/// <param name="Ac">The acceptance criterion it covers, e.g. `AC-1`.</param>
|
|
14
|
+
/// <param name="Story">The story or issue key.</param>
|
|
15
|
+
/// <param name="Title">The behaviour, in the requirement's words.</param>
|
|
16
|
+
/// <param name="Preconditions">What must be true before the steps.</param>
|
|
17
|
+
/// <param name="Steps">What the test does.</param>
|
|
18
|
+
/// <param name="Expected">The result the test asserts.</param>
|
|
19
|
+
/// <param name="Tags">Categories: `smoke` (quick check), `write` (creates or changes data).</param>
|
|
20
|
+
public sealed record TestDescription(string Id, string Ac, string Story, string Title, string[] Preconditions,
|
|
21
|
+
string[] Steps, string Expected, string[] Tags)
|
|
22
|
+
{
|
|
23
|
+
/// <summary>The title a test reports under: case id, story, behaviour.</summary>
|
|
24
|
+
/// <returns>e.g. `TS-0 [EA-10] the test account signs in and is greeted`.</returns>
|
|
25
|
+
public string FullTitle() => $"{Id}{(string.IsNullOrWhiteSpace(Story) ? "" : $" [{Story}]")} {Title}";
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/// <summary>
|
|
29
|
+
/// Points a test to its description, e.g. <c>[Case(typeof(SignInDesc), "TS-0")]</c>, and gives the test its
|
|
30
|
+
/// description and categories from it (so <c>dotnet test --filter TestCategory=smoke</c> selects by the description).
|
|
31
|
+
/// </summary>
|
|
32
|
+
/// <param name="desc">The class in `Resources/Desc` that holds the case (a public static <c>Cases</c> dictionary).</param>
|
|
33
|
+
/// <param name="id">The case id.</param>
|
|
34
|
+
[AttributeUsage(AttributeTargets.Method)]
|
|
35
|
+
public sealed class CaseAttribute(Type desc, string id) : NUnitAttribute, IApplyToTest
|
|
36
|
+
{
|
|
37
|
+
/// <summary>Looks the case up in its description class.</summary>
|
|
38
|
+
/// <returns>The description.</returns>
|
|
39
|
+
/// <exception cref="AutomationError">When the class or the case is missing.</exception>
|
|
40
|
+
public TestDescription Describe()
|
|
41
|
+
{
|
|
42
|
+
var cases = desc.GetField("Cases")?.GetValue(null) as IReadOnlyDictionary<string, TestDescription>
|
|
43
|
+
?? throw new AutomationError("Read", desc.Name, "no public static Cases dictionary");
|
|
44
|
+
return cases.TryGetValue(id, out var d) ? d : throw new AutomationError("Find case", desc.Name, $"{id} is not described");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/// <summary>Sets the test's description and adds its tags and criterion as categories.</summary>
|
|
48
|
+
/// <param name="test">The NUnit test being built.</param>
|
|
49
|
+
public void ApplyToTest(NUnit.Framework.Internal.Test test)
|
|
50
|
+
{
|
|
51
|
+
var d = Describe();
|
|
52
|
+
test.Properties.Set(PropertyNames.Description, d.FullTitle());
|
|
53
|
+
foreach (var tag in d.Tags.Append(d.Ac)) test.Properties.Add(PropertyNames.Category, tag);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -6,4 +6,4 @@ Official documentation this adapter follows. Recorded 2026-10-15.
|
|
|
6
6
|
- https://playwright.dev/docs/test-cli (`--list`)
|
|
7
7
|
- https://www.selenium.dev/documentation/webdriver/waits/
|
|
8
8
|
|
|
9
|
-
Checked by running here: `npx playwright test --list` (
|
|
9
|
+
Checked by running here (2026-11-12): `npx playwright test --list` ("Total: 11 tests in 5 files": setup, teardown, 4 unit, TS-0 in smoke and regression, TS-1, TS-2, the API test) and `node --check` on every `.js` file (exit 0) on the Playwright JavaScript template, filled.
|
|
@@ -23,7 +23,7 @@ Adapter rules: holds only what differs from the capability skills; the project's
|
|
|
23
23
|
- **Data:** create shared test data once in `setup()` and delete it in `teardown()` [S7]; per-iteration data is run-unique (`${__VU}-${__ITER}-${Date.now()}`); never load real people's data.
|
|
24
24
|
- **Groups and tags** name each step after the case id (`group('TS-1 list products', …)`, `tags: { case: 'TS-1' }`) so the summary traces to the design.
|
|
25
25
|
- **Think time:** under the load profile each iteration ends with `sleep(THINK_SECONDS)` (default 1), so the request rate is about users ÷ think time; without it, 5 users made about 1,370 requests a second (M8).
|
|
26
|
-
- New project: [templates/project](templates/README.md) (config from the environment then `.env`, a client per resource
|
|
26
|
+
- New project: [templates/project](templates/README.md) (the suite architecture: `src/config/env.js` from the environment then `.env`, a client per resource in `src/services/`, data and builders in `resources/testData/testData.js`, cases in `resources/desc/`, `tests/load/products.js` with both profiles).
|
|
27
27
|
|
|
28
28
|
## Run
|
|
29
29
|
- Verification (covered by the build request, like any new test): `k6 run --quiet -e BASE_URL=<test env> -e API_TOKEN=$API_TOKEN load/<script>.js` with the smoke profile, 3 times; all three exit 0 [S4, M1].
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
Used when a build starts a new load-test project in `sut/<app>/` (the user picked k6 on the setup card, or Gate 4 chose it for a requirement with a load or latency expectation). Copy `project/`, 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 smoke profile before writing story cases.
|
|
4
4
|
|
|
5
5
|
- Stack: the k6 binary (installing it is H10: the official installers or the `grafana/k6` container image); scripts in JavaScript.
|
|
6
|
-
- Layers: `
|
|
7
|
-
- Tokens: `{{HEALTH_PATH}}`, `{{PRODUCTS_PATH}}` (the app's own paths; rename the resource to the app's), `{{P95_MS}}`, `{{ERROR_RATE}}` (from the requirement, or proposed and confirmed in the H6 question), `{{LOAD_VUS}}`, `{{LOAD_DURATION}}` (the approved load profile).
|
|
6
|
+
- Layers (the suite architecture, [patterns.md](../../automation-implementation/references/patterns.md)): `src/config/env.js` (environment first, then `.env`; a missing setting fails naming it, exit 107) · `src/services/products-api.js` (one client per resource; bearer token; each request tagged with its case id; `expectedStatuses` for a case that expects an error status) · `resources/testData/testData.js` (paths, expected values, thresholds, `newProduct()` with run-unique names) · `resources/desc/products.desc.js` (cases: id, AC, title, expected; group and check names come from them) · `tests/load/products.js` (profiles `smoke` and `load`, every check bound to a threshold).
|
|
7
|
+
- Tokens: `{{HEALTH_PATH}}`, `{{PRODUCTS_PATH}}` (the app's own paths; rename the resource to the app's), `{{P95_MS}}`, `{{ERROR_RATE}}` (in `testData.js`) (from the requirement, or proposed and confirmed in the H6 question), `{{LOAD_VUS}}`, `{{LOAD_DURATION}}` (the approved load profile).
|
|
8
8
|
- Settings at run time: `API_BASE_URL` (test environment), `API_TOKEN`, `PROFILE` (`smoke` default, `load` only after H6), `THINK_SECONDS` (default 1; the request rate is about users ÷ think time).
|
|
9
|
-
- Run: `k6 run load/products.js` (smoke) · `k6 run -e PROFILE=load --summary-export reports/k6-summary.json load/products.js` (load, after H6). Exit 0 all thresholds passed; 99 a threshold failed; 107 a script or setting error.
|
|
9
|
+
- Run: `k6 run tests/load/products.js` (smoke) · `k6 run -e PROFILE=load --summary-export reports/k6-summary.json tests/load/products.js` (load, after H6). Exit 0 all thresholds passed; 99 a threshold failed; 107 a script or setting error.
|
|
10
10
|
- CI: no workflow template yet (no CI service to run it here); add a job that installs k6 and runs the smoke profile when Gate 4 approves it.
|
|
11
11
|
|
|
12
12
|
Run here 2026-11-06 (k6 v1.8.2) against `evals/fixtures/api-stub/server.mjs`: smoke 3/3 runs exit 0, 4 of 4 checks, the expected 404 not counted as an error; fail check (create 201 → 200) exit 99 on `TS-1 create 201 with an id`; wrong token exit 99 with the token 0 times in the output; settings from `.env` only (quoted value) exit 0; no settings exit 107 naming `API_BASE_URL`; load profile (5 users, 5 s hold, 1 s think time) exit 0, 524 of 524 checks at about 3 iterations a second (without think time the same 5 users made about 1,370 a second, the reason `THINK_SECONDS` exists). Evidence: [run record](../../../../evals/workflows/runs/2026-11-06-k6-pact.md).
|
|
13
|
+
|
|
14
|
+
Re-run 2026-11-12 in the new layout (k6 v1.8.2, same stub): smoke 3/3 exit 0, 4 of 4 checks; create 201 → 200 exit 99 on `TS-1 create 201 with an id`; a wrong token exit 99 with the token 0 times in the output ([run record](../../../../evals/workflows/runs/2026-11-12-suite-architecture.md)).
|
package/.claude/skills/k6/templates/project/{data/cases.js → resources/desc/products.desc.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Test descriptions of the products API under load: one per behaviour, keyed by case id. Group names and check names are built from them, so the summary
|
|
3
3
|
* traces back by id. Replace these with the story's cases (test-design step 3).
|
|
4
4
|
*/
|
|
5
5
|
export const cases = {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The suite's test data, in one place: the API's paths, the expected values and thresholds from the requirement (or
|
|
3
|
+
* proposed and confirmed in the H6 question), and builders that make valid records with run-unique values. Values you
|
|
4
|
+
* give replace the defaults here. Secrets are never here: they stay in `.env` by name.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/** Paths of the API's resources, relative to API_BASE_URL. */
|
|
8
|
+
export const ROUTES = {
|
|
9
|
+
health: '{{HEALTH_PATH}}',
|
|
10
|
+
products: '{{PRODUCTS_PATH}}',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/** Expected values per case. */
|
|
14
|
+
export const DATA = {
|
|
15
|
+
health: { status: 200, body: 'ok' },
|
|
16
|
+
products: { createdStatus: 201, unknownId: '999999', notFoundStatus: 404 },
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** The thresholds the run is judged on (P95_MS and ERROR_RATE in the environment override them for one run). */
|
|
20
|
+
export const THRESHOLDS = {
|
|
21
|
+
p95Ms: {{P95_MS}},
|
|
22
|
+
errorRate: {{ERROR_RATE}},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Builds a valid product with a run-unique name; a test changes only the field it is about.
|
|
27
|
+
* @param {object} [overrides] Fields to change.
|
|
28
|
+
* @returns {object} The product: `name` (string) and `price` (number).
|
|
29
|
+
*/
|
|
30
|
+
export function newProduct(overrides = {}) {
|
|
31
|
+
return { name: `load-${__VU}-${__ITER}-${Date.now()}`, price: 9.5, ...overrides };
|
|
32
|
+
}
|