PromptBase
Upgrade
Close icon
General
Home
Marketplace
Create
Hire
Login
Chat
Sell
Explore

Prompt Details

Model
(claude-5-5-sonnet)
Token size
4,333
Example input
[APPLICATION_AND_SYSTEM_CONTEXT]: E-commerce website selling products online. [REQUIREMENTS_AND_CRITICAL_WORKFLOWS]: Login, search products, add to cart, checkout, make payments, and track orders. [ARCHITECTURE_APIS_AND_DEPENDENCIES]: APIs & Dependencies: Frontend, backend APIs, database, and third-party payment gateway. [QUALITY_RISKS_AND_FAILURE_HISTORY]: Possible duplicate payments, incorrect order totals, failed checkout, and unauthorized access. These are potential risks, not confirmed historical defects [QUALITY_OBJECTIVES_AND_RELEASE_CRITERIA]: Prevent critical checkout failures, protect customer data, verify payment and order consistency, and block releases when critical tests fail.
Example output
## πŸ”Ž PHASE 1 β€” Testing Context Reconstruction Application purpose: Allow customers to purchase products online, pay securely, and track orders. Primary users: - Customers who browse and purchase products. - Administrators or operations staff who manage orders. - Engineering and QA teams who maintain the application. System boundaries: - Frontend: Product browsing, cart, login, checkout, and order tracking. - Backend APIs: Authentication, product data, cart calculations, orders, and payment processing. - Database: Customers, inventory, orders, and payment-related records. - External dependency: Third-party payment gateway. - Delivery infrastructure: Staging environment and a future or existing CI/CD pipeline, with actual implementation still unconfirmed. Critical workflows: 1. Customer logs in. 2. Customer searches for a product. 3. Customer adds a product to the cart. 4. System calculates the order total. 5. Customer completes checkout. 6. Payment is authorized or declined. 7. The system records the order and payment state consistently. 8. Customer tracks the order. Most consequential potential failures: - Customer is charged twice for one purchase. - Payment succeeds but the order is missing. - An order is confirmed despite a failed payment. - The order total differs from the amount charged. - An unauthorized user accesses another customer's order. - Checkout becomes unavailable during a release. Evidence classification: - Confirmed input: The supplied application description, workflows, dependencies, and constraints. - Potential risks: Payment duplication, incorrect totals, failed checkout, and unauthorized access. - Unknown: Actual architecture, defect history, traffic levels, existing tests, and measured failure rates. - Proposed decisions: Risk priorities, automated test selection, and candidate release gates. Phase 1 verdict: The strategy must prioritize payment correctness, order consistency, access control, and reliable checkout before less critical features. ## 🧩 PHASE 2 β€” Requirement-to-Test Traceability The following are proposed testable requirements derived from the supplied workflows. They are not represented as formally approved product requirements. | ID | Testable condition | Main risk | Test level | Expected evidence | | ------ | ----------------------------------------------------------- | ----------------------------- | ----------------------- | ---------------------------------------------------------- | | REQ-01 | Valid and invalid login attempts behave correctly | Unauthorized access | API / component | Authentication response and session state | | REQ-02 | Product search returns matching products | Incorrect product discovery | Component / API | Results match the query | | REQ-03 | Cart additions and quantity changes are reflected correctly | Incorrect cart contents | Component / integration | Cart records and quantities agree | | REQ-04 | Order totals use the applicable pricing rules | Incorrect charge | Unit / integration | Calculated total matches expected amount | | REQ-05 | Successful payment produces a consistent order state | Lost or inconsistent order | Integration / E2E | Payment and order records agree | | REQ-06 | Declined payment does not create a falsely paid order | Incorrect financial state | Integration | Order remains unpaid or follows the approved failure state | | REQ-07 | Repeated payment requests do not create duplicate charges | Duplicate transaction | API / integration | One logical transaction produces at most one charge | | REQ-08 | Customers cannot access other customers' orders | Data exposure | Security / API | Unauthorized request is rejected | | REQ-09 | Customers can retrieve their own order status | Missing or incorrect tracking | API / E2E | Returned status matches the stored order state | Example traceability chain: - Requirement: REQ-07. - Risk: Duplicate payment caused by retries or repeated clicks. - Scenario: Submit the same logical payment request twice using the same supported idempotency key. - Test level: API and payment integration. - Expected result: No duplicate charge; the response and order state follow the documented payment contract. - Quality gate: Block release if a reproducible duplicate-charge defect is detected. Requirements needing clarification: - How long does a login session remain valid? - Which currency, tax, discount, shipping, and rounding rules determine the final price? - How are payment timeouts and delayed gateway callbacks handled? - What is the approved state when payment succeeds but order persistence fails? - What response should an unauthorized order request return? - What performance and availability targets have stakeholders approved? Phase 2 verdict: Traceability is useful and actionable, but formal acceptance criteria and payment-state definitions must be confirmed before implementation. ## ⚠️ PHASE 3 β€” Risk-Based Test Prioritization The following is a proposed qualitative prioritization, not a measured probability model. | Risk | Impact | Priority | First validation method | | --------------------------- | --------------------------------- | -------- | ---------------------------------------------- | | Duplicate payment | Critical | P0 | Payment API and idempotency tests | | Payment/order inconsistency | Critical | P0 | Integration and reconciliation tests | | Incorrect order total | High | P0 | Calculation unit tests and payment integration | | Unauthorized order access | Critical | P0 | Authorization and negative API tests | | Checkout failure | High | P0 | Critical-path integration and E2E tests | | Search result errors | Medium | P1 | Component and API tests | | Incorrect tracking status | Medium | P1 | Order-state integration tests | | Minor visual defects | Lower, unless they block purchase | P2 | Targeted UI and accessibility checks | Risk scoring approach: - Impact: Assess financial, security, operational, and user consequences. - Likelihood: Use actual defect history and operational evidence when available. - Detectability: Identify whether a failure would be visible through automated checks, monitoring, or reconciliation. - Recovery difficulty: Assess whether the error can be safely reversed. Recommended testing order: 1. Payment idempotency and transaction correctness. 2. Order/payment state consistency. 3. Authorization and customer data isolation. 4. Order-total calculation. 5. Checkout success and failure handling. 6. Search and tracking regression coverage. Phase 3 verdict: Prioritize the consequences of failure rather than trying to maximize the number of automated tests. ## πŸ—οΈ PHASE 4 β€” Test Pyramid and Test-Level Architecture Unit tests Fast feedback Validate isolated business rules, including cart totals, discounts, tax calculations, and payment-state transitions. - Run locally and on pull requests. - Mock external services where appropriate. - Failure diagnosis should identify the individual rule or function. Component tests Validate individual modules such as cart management, authentication handling, and checkout validation. - Run on pull requests and main-branch builds. - Use controlled inputs and isolated state. Integration and contract tests Validate database persistence, API boundaries, payment gateway interactions, and order-state transitions. - Run on pull requests where practical and in deeper CI validation. - Use sandbox services or controlled test doubles. End-to-end tests Validate a small set of complete customer journeys from login through checkout and order tracking. - Run critical smoke tests before release and after deployment. - Keep the suite focused to limit execution time and maintenance. Specialized test layers: - Security: Authorization, session handling, and input validation. - Performance: Checkout latency, throughput, and concurrent purchases. - Accessibility: Keyboard navigation, labels, focus management, and error messages. - Reliability: Timeouts, retries, delayed callbacks, and recovery from partial failures. - Database: Transaction integrity, constraints, and persistence consistency. Why this balance fits: Payment calculations are easier to diagnose at the unit level, while gateway callbacks and database consistency require integration tests. A small number of E2E tests verifies that the layers work together. Phase 4 verdict: Use a risk-driven test pyramid. Do not prescribe fixed percentages until the architecture, execution costs, and coverage gaps are known. ## 🎯 PHASE 5 β€” Automation Candidate and Coverage Design | Scenario | Priority | Classification | Reason | | --------------------------------- | -------- | -------------------------------- | ------------------------------------------- | | Order-total calculation | P0 | Automate immediately | Deterministic and financially important | | Payment idempotency | P0 | Automate immediately | Protects against duplicate charges | | Payment success/failure state | P0 | Automate immediately | Prevents inconsistent orders | | Customer order authorization | P0 | Automate immediately | Protects sensitive data | | Complete checkout journey | P0 | Automate after prerequisites | Requires stable staging and payment sandbox | | Product search | P1 | Automate immediately | Repeatable regression scenario | | Order tracking | P1 | Automate immediately | Validates order-state visibility | | Exploratory checkout usability | P1 | Keep manual alongside automation | Human judgment is valuable | | Visual polish of low-impact pages | P2 | Defer or selectively automate | Lower initial risk reduction | Example automation specification: Payment retry - Scenario: A payment request is repeated because the client retries after a timeout. - Risk addressed: Multiple charges for one logical purchase. - Test level: API and integration. - Preconditions: A documented idempotency contract and a payment sandbox that supports the required scenario. - Test data: Synthetic customer, test order, and controlled payment response. - Expected result: No duplicate charge; order and payment state remain consistent. - Automation rationale: Reproducible, financially critical, and suitable for regression testing. - Dependencies: Backend payment implementation, gateway test environment, and transaction observability. - Maintenance: Avoid hard-coded timing assumptions and ensure transaction records can be inspected. Phase 5 verdict: Automate stable, repeatable, high-impact business rules first. Keep exploratory testing for usability and unknown failure modes. ## πŸ”— PHASE 6 β€” API, Integration and Contract Test Strategy Payment API coverage - Valid payment request. - Invalid amount and malformed request. - Missing or invalid authentication. - Unauthorized payment operation. - Repeated request and idempotency behavior. - Gateway timeout. - Gateway decline. - Delayed or duplicated callback. - Gateway success followed by local persistence failure. - Rate-limit and retry behavior, according to the documented contract. Order API coverage - Create an order with valid cart data. - Reject invalid product quantities. - Validate server-side pricing rather than trusting client-supplied totals. - Retrieve an order belonging to the authenticated customer. - Reject access to another customer's order. - Validate allowed order-state transitions. Integration strategy - Mock or virtualize the gateway for deterministic timeout and failure tests. - Use the payment sandbox for realistic contract and integration checks. - Test database transaction boundaries and recovery behavior. - Verify that event or callback processing is safe when repeated, if the system uses asynchronous events. Example contract check: - Given: A payment provider response matches the documented success schema. - When: The application processes the response. - Then: It follows the approved success-handling behavior and persists the expected transaction state. - Negative check: An invalid or incompatible response must not silently be treated as a successful payment. Unknowns: Actual API endpoints, authentication mechanism, provider-specific webhook rules, and supported idempotency behavior have not been supplied. Phase 6 verdict: Test external boundaries explicitly and avoid inventing undocumented API behavior. ## πŸ—ƒοΈ PHASE 7 β€” Test Data and Environment Architecture Recommended test environments - Local development: Fast unit and component tests. - CI environment: Isolated integration tests with controlled dependencies. - Staging: Representative checkout and release-validation workflows. - Payment sandbox: Simulated gateway transactions using provider-approved test credentials. Test data design - Customer A and Customer B for access-control tests. - Products with different prices and stock states. - Orders with unpaid, paid, failed, and other approved lifecycle states. - Valid and invalid quantities. - Payment responses for success, decline, timeout, and delayed completion. Data lifecycle 1. Create synthetic test data. 2. Assign unique identifiers to each test run. 3. Execute the test against isolated records. 4. Collect transaction and application evidence. 5. Clean up or reset test data safely. 6. Verify that parallel tests do not interfere with one another. Security controls - Never embed production secrets in test code or reports. - Use authorized, synthetic customer data. - Keep sandbox credentials in the approved secret-management system. - Redact sensitive payment and customer information from logs. Phase 7 verdict: Reliable automation depends on deterministic, isolated, repeatable test data and predictable environments. ## βš™οΈ PHASE 8 β€” CI/CD Test Execution Architecture | Pipeline stage | Tests | Proposed release behavior | | ----------------------- | ---------------------------------------------------------------- | --------------------------------------------------------------------------------- | | Local development | Unit and selected component tests | Fast developer feedback | | Pull request | Unit, component, contract, and selected integration tests | Block merge on required critical failures | | Main branch | Expanded integration and regression suites | Block promotion when required gates fail | | Nightly | Broader regression, security, and selected performance tests | Investigate failures and assign ownership | | Pre-release | Critical E2E, payment, authorization, and release-specific tests | Block release on unresolved critical failures | | Deployment verification | Smoke tests and essential health checks | Stop promotion or trigger the approved rollback procedure if critical checks fail | Pipeline design decisions - Run fast, isolated tests before slower E2E tests. - Publish test reports, logs, and relevant traces. - Separate product defects from environment and test-infrastructure failures. - Do not rerun a failed test silently and treat a later pass as proof that the first failure was harmless. - Define an owner and recovery procedure for blocked releases. Proposed release gate: All required P0 tests pass, no unresolved release-blocking security or payment-integrity defect remains, and the build is deployed to the intended environment. This is a candidate policy and needs stakeholder approval. Phase 8 verdict: The pipeline should produce rapid feedback while reserving expensive, broad tests for appropriate stages. ## 🧯 PHASE 9 β€” Flaky Test Prevention and Reliability Potential failure patterns | Symptom | Possible cause | Diagnostic evidence | Corrective action | | ------------------------------------ | -------------------------------------- | ------------------------------------- | --------------------------------------------------------------- | | Checkout test passes intermittently | Timing or asynchronous state | Request traces and timestamps | Wait for a defined business condition | | Duplicate order in parallel runs | Shared test data or unsafe concurrency | Order IDs and request logs | Isolate records and test concurrency explicitly | | Payment callback test fails randomly | Sandbox instability or callback delay | Gateway and application logs | Use controlled callbacks for deterministic tests | | Tests fail depending on order | Shared mutable state | Results from isolated reruns | Remove inter-test dependencies | | Database cleanup fails | Incomplete teardown | Database state before and after tests | Improve cleanup and use isolated transactions where appropriate | Reliability controls - Record failure classification and ownership. - Retry only when the retry policy is justified and the original failure remains visible. - Quarantine unstable tests with a named owner and remediation target. - Do not allow quarantined P0 tests to create an unacknowledged release blind spot. - Require evidence of stable repeated runs before removing a test from quarantine. Suggested metric: Flaky test rate = tests classified as flaky divided by tests executed in the measurement period. Define whether the calculation uses unique tests or individual executions before tracking it. Phase 9 verdict: Stabilize the underlying cause of unreliable tests rather than hiding failures with repeated execution. ## πŸ” PHASE 10 β€” Security, Negative and Edge-Case Testing High-priority scenarios - Customer A attempts to access Customer B's order. - An unauthenticated request attempts to access a protected checkout or order endpoint. - A customer attempts an operation outside their permissions. - An expired session is used for a protected operation. - A request contains invalid quantities, malformed identifiers, or unexpected input types. - The client submits a manipulated order total. - The payment endpoint receives repeated requests. - Sensitive customer or payment information appears in error responses or logs. - Concurrent requests attempt to update the same order. Example test: Cross-customer order access - Preconditions: Two synthetic customer accounts own separate orders. - Action: Authenticate as Customer A and request Customer B's order. - Expected behavior: The request is rejected according to the approved authorization policy, and Customer B's data is not disclosed. - Evidence: Request/response record, authorization logs, and confirmation that no unauthorized data was returned. - Failure criteria: Customer A receives Customer B's protected order details. Security test boundaries - Test only systems and environments for which authorization has been granted. - Use non-production accounts and approved test data. - Apply appropriate limits to resource-exhaustion tests. - Treat automated security checks as evidence of tested controls, not proof that the application is completely secure. Phase 10 verdict: Authorization, payment manipulation, and sensitive-data exposure deserve early coverage because their potential consequences are significant. ## πŸ“ˆ PHASE 11 β€” Performance, Reliability and Non-Functional Testing No approved performance thresholds or production traffic figures were supplied. The targets below are candidates for discussion, not established service-level objectives. | Dimension | Test approach | Candidate acceptance criteria | | ------------------------- | ---------------------------------------------- | ---------------------------------------------------- | | Response time | Measure API latency under representative load | Stakeholder-approved p95/p99 limits | | Throughput | Run controlled concurrent checkout requests | Approved throughput without unacceptable errors | | Concurrency | Submit simultaneous purchases or updates | No invalid order states or duplicate logical charges | | Resource usage | Monitor CPU, memory, and database resources | No unacceptable resource saturation | | Recovery | Simulate controlled dependency failures | Recovery follows the documented operational policy | | Availability | Validate health checks and failure handling | Approved availability target | | Accessibility | Keyboard and automated accessibility checks | Agreed accessibility standard and severity policy | | Compatibility | Test supported browsers and devices | Critical journeys work on the supported matrix | | Data integrity under load | Reconcile orders and payments after a load run | No unexplained discrepancies | Proposed performance test sequence 1. Establish a baseline in a controlled environment. 2. Generate representative browsing and checkout traffic. 3. Measure latency, throughput, error rates, and resource usage. 4. Inspect the impact of payment dependency delays. 5. Reconcile the resulting order and payment records. 6. Compare results against approved thresholds. Phase 11 verdict: Performance testing must reflect real workload assumptions, and any thresholds must be agreed upon before they become release gates. ## πŸ§ͺ PHASE 12 β€” Test Implementation and Framework Design The technology stack is unknown, so a specific framework cannot responsibly be selected yet. Recommended architecture - Test organization: Separate unit, component, API, integration, E2E, security, and performance suites. - Naming conventions: Use names that describe the business behavior and expected result. - Fixtures: Create reusable customer, product, cart, order, and payment fixtures. - Data factories: Generate unique synthetic records for each test. - Assertions: Check observable business outcomes, not merely HTTP status codes. - Configuration: Keep environment settings separate from test logic. - Secrets: Inject credentials securely at runtime. - Reporting: Store structured test results and useful failure diagnostics. - Parallel execution: Use isolated test records and control shared resources. - Ownership: Assign responsibility for test maintenance to the relevant engineering or QA role. Example test naming convention `payment_retry_does_not_create_duplicate_charge` Framework selection criteria - Compatibility with the existing programming language and application architecture. - Support for API, integration, and browser testing as needed. - Reliable reporting, parallel execution, and CI integration. - Ease of debugging and team familiarity. - Maintenance effort and licensing or infrastructure cost. Phase 12 verdict: Select the framework after confirming the actual stack. Avoid introducing a large testing platform before establishing the highest-value coverage. ## πŸ“Š PHASE 13 β€” Coverage, Metrics and Quality Gates | Metric | Formula | Purpose | | ---------------------------------- | --------------------------------------------------------------------------------------------------------- | ---------------------------------------- | | Requirement coverage | Requirements with linked tests / testable requirements Γ— 100 | Identify untested requirements | | Critical workflow coverage | Critical workflows with passing automated validation / identified critical workflows Γ— 100 | Measure protection of essential journeys | | Flaky test rate | Flaky tests / tests executed Γ— 100, using a defined counting method | Monitor test reliability | | Defect escape rate | Production defects attributable to a release / total attributable defects across the defined period Γ— 100 | Understand missed defects | | Test execution time | Elapsed time for the defined suite | Monitor feedback speed | | Mean time to diagnose | Total diagnosis time / failures diagnosed | Improve failure investigation | | Regression detection effectiveness | Relevant regressions detected before release / all identified relevant regressions Γ— 100 | Assess regression protection | Measurement rules - Define the source of truth and measurement window for every metric. - Distinguish missing coverage from tests that exist but fail. - Avoid interpreting code coverage as proof of business correctness. - Review metric trends alongside defect severity and operational outcomes. - Do not establish arbitrary targets without baseline data and stakeholder agreement. Proposed critical quality gates - All required P0 tests pass. - No unresolved release-blocking payment-integrity or authorization defect remains. - Critical order and payment states are consistent in the tested scenarios. - No unexplained failure is dismissed as flaky. - Required reports and test evidence are available. - Any approved exception has a named owner, documented risk acceptance, and expiration or review condition. Phase 13 verdict: Use a small set of interpretable metrics and explicit release gates rather than a single coverage percentage. ## πŸ”„ PHASE 14 β€” Failure Triage and Continuous Improvement Failure classification workflow 1. Capture the failed test, build identifier, environment, timestamps, logs, and relevant traces. 2. Classify the failure as a product defect, test defect, environment issue, dependency issue, data problem, flaky test, configuration problem, or unknown. 3. Assign the appropriate engineering or QA owner. 4. Reproduce the failure in a controlled environment. 5. Identify the root cause and implement the correction. 6. Add or improve a regression test where appropriate. 7. Verify the fix and update the testing strategy. Example triage case - Failure: Payment sandbox reports success, but the application has no corresponding paid order. - Initial classification: Unknown until evidence identifies the cause. - Evidence to collect: Gateway response, callback history, order database state, transaction identifiers, and application logs. - Potential causes: Callback processing failure, persistence error, or incorrect transaction-state handling. - Corrective strategy: Fix the confirmed root cause and add an integration regression test. - Release decision: Block promotion if the scenario reveals an unresolved critical payment-integrity defect. Continuous improvement loop Failure β†’ Classification β†’ Diagnosis β†’ Remediation β†’ Regression Test β†’ Strategy Update. Phase 14 verdict: Every consequential failure should have a traceable diagnosis and an appropriate follow-up action. ## πŸ—ΊοΈ PHASE 15 β€” Implementation Roadmap and Test Maturity | Stage | Objective | Priority | Completion evidence | | ---------------------------- | ------------------------------------------------------------------------ | -------- | ------------------------------------------------- | | A. Foundation | Confirm workflows, requirements, risks, stack, and existing coverage | P0 | Approved risk register and baseline | | B. High-risk coverage | Implement order-total, payment, and authorization tests | P0 | Critical scenarios pass in controlled testing | | C. CI/CD integration | Run required tests automatically and publish reports | P0 | Required gates work on representative builds | | D. Reliability and expansion | Improve data isolation, diagnostics, regression, and flaky-test handling | P1 | Repeatable runs and assigned failure ownership | | E. Continuous optimization | Refine coverage using defects, changes, and execution metrics | P1 | Regularly reviewed metrics and updated priorities | Stage A β€” Foundation - Owner: QA lead or quality engineering lead. - Dependencies: Requirements, application access, and engineering input. - Effort: To be estimated after stack and repository discovery. - Acceptance criteria: Critical workflows and proposed release gates are documented and reviewed. Stage B β€” High-risk coverage - Owner: QA automation engineer with payment/backend engineering support. - Dependencies: Stable test data, testable APIs, and gateway sandbox access. - Acceptance criteria: Automated tests cover key payment outcomes, duplicate-request handling, order totals, and cross-customer authorization. Stage C β€” CI/CD integration - Owner: DevOps or platform engineering with QA. - Dependencies: Test execution environment and report publishing. - Acceptance criteria: Required checks run automatically and critical failures block the agreed promotion stage. Stage D β€” Reliability and expansion - Owner: Quality engineering team. - Dependencies: Initial automated coverage and failure data. - Acceptance criteria: Flaky failures are classified, critical tests are stable, and ownership is defined. Stage E β€” Continuous optimization - Owner: Quality engineering lead and engineering leadership. - Dependencies: Baseline metrics and recurring release evidence. - Acceptance criteria: Risk priorities and test selection are reviewed using observed defects and measured execution results. No arbitrary deadlines or staffing commitments are imposed because team capacity and delivery timelines are unknown. Phase 15 verdict: Build the foundation first, protect the highest-risk workflows next, and expand only when the evidence justifies the investment. ## πŸ† PHASE 16 β€” Final Automated Test Strategy Blueprint ### 1. Executive Summary - Objective: Build a maintainable automated testing system that reduces checkout, payment, order-integrity, and security risks. - Primary approach: Risk-based automation supported by unit, integration, contract, E2E, security, and targeted non-functional tests. - First priority: Payment correctness and consistency between payment transactions and orders. - Delivery approach: Integrate fast tests into pull requests and run deeper validation before release. - Current limitation: The strategy is based on a sample scenario, not a verified application architecture or executed test suite. ### 2. Application and Quality Context - Application: E-commerce website. - Core dependencies: Frontend, backend APIs, database, and third-party payment gateway. - Main quality objectives: Correct payments, accurate order totals, customer-data protection, and reliable checkout. - Environment: Staging and payment sandbox, as specified in the sample inputs. - Unresolved information: Programming language, framework, API specifications, deployment architecture, existing test coverage, and approved performance objectives. ### 3. Requirement-to-Test Traceability Matrix | Requirement | Test coverage | Priority | Release gate | | --------------------------- | ------------------------------------------ | -------- | ----------------------------------------------- | | REQ-01: Login | Valid, invalid, and unauthorized access | P0 | Required authentication tests pass | | REQ-02: Search | Matching and invalid search inputs | P1 | Required search regression tests pass | | REQ-03: Cart | Quantity and cart-state consistency | P1 | Required cart tests pass | | REQ-04: Order totals | Pricing, tax, discount, and rounding rules | P0 | Approved calculation tests pass | | REQ-05: Payment success | Payment and order-state consistency | P0 | Required integration tests pass | | REQ-06: Payment failure | Failed or declined payments | P0 | No false paid-order state in tested scenarios | | REQ-07: Duplicate requests | Idempotency and retries | P0 | No duplicate logical charge in tested scenarios | | REQ-08: Order authorization | Cross-customer access prevention | P0 | Required authorization tests pass | | REQ-09: Order tracking | Correct order-state visibility | P1 | Required tracking tests pass | ### 4. Risk-Based Testing Priorities - P0: Payment correctness, duplicate-charge prevention, order/payment consistency, authorization, and checkout. - P1: Cart integrity, search behavior, order tracking, and broader regression coverage. - P2: Lower-impact visual refinements and other enhancements, unless they affect critical workflows. These are proposed priorities. Final risk ratings should be validated with engineering, product, security, and business stakeholders. ### 5. Test Pyramid and Test-Level Architecture - Unit tests for calculations and business rules. - Component tests for isolated application modules. - Integration tests for database and service interactions. - Contract tests for API and payment-provider compatibility. - Selective E2E tests for complete purchase journeys. - Specialized security, performance, accessibility, and reliability tests according to risk. Decision: Use the least expensive test level that provides sufficient evidence, and reserve E2E tests for behaviors that require cross-system validation. ### 6. Automation Candidate Matrix - Automate immediately: Order calculations, payment idempotency, payment-state transitions, and authorization. - Automate after prerequisites: Full checkout journeys requiring stable staging and payment sandbox support. - Keep manual and exploratory testing: Unanticipated usability issues and new behaviors that are not yet stable. - Defer: Low-impact scenarios that offer little additional risk reduction. ### 7. API, Integration and Contract Test Plan - Validate authentication, authorization, request validation, and error handling. - Verify payment success, decline, timeout, retries, and duplicate requests. - Check order persistence and consistency after payment events. - Validate documented API schemas and compatibility. - Use controlled test doubles for deterministic failures and sandbox integration tests for realistic dependency behavior. ### 8. Test Data and Environment Architecture - Use synthetic customer accounts and unique test records. - Maintain isolated cart, order, and payment fixtures. - Separate local, CI, staging, and sandbox configurations. - Reset test data predictably and prevent parallel test interference. - Store secrets securely and redact sensitive information from test evidence. ### 9. CI/CD Execution Strategy - Local development: Fast unit and component checks. - Pull requests: Required unit, contract, and selected integration checks. - Main branch: Expanded integration and regression suites. - Nightly: Broader regression and selected non-functional tests. - Pre-release: Critical payment, security, and E2E validation. - Post-deployment: Smoke tests and health checks. Decision: Block the agreed promotion stage when a required critical quality gate fails. ### 10. Flaky Test Prevention and Reliability Plan - Use explicit business-state conditions rather than arbitrary sleeps. - Isolate test data and remove execution-order dependencies. - Capture logs, traces, and failure artifacts. - Track flaky failures and assign owners. - Never allow retries or quarantine to conceal unresolved critical defects. ### 11. Security, Negative and Edge-Case Testing - Test unauthorized access and expired sessions. - Validate manipulated totals and malformed requests. - Check repeated payment requests and concurrent order updates. - Inspect error responses and logs for sensitive-data exposure. - Execute defensive tests only in authorized environments. ### 12. Performance and Non-Functional Test Plan - Measure latency, throughput, concurrency, and resource consumption. - Test dependency delays and recovery behavior. - Validate data integrity under load. - Test accessibility and supported browser compatibility. - Obtain stakeholder approval for measurable performance and availability thresholds before making them release gates. ### 13. Test Framework and Implementation Architecture - Select frameworks only after confirming the application stack. - Organize suites by test level and business capability. - Use reusable fixtures, data factories, assertions, and reporting. - Make tests independent, readable, and diagnosable. - Capture execution evidence and assign maintenance ownership. ### 14. Metrics and Quality Gates Track: - Requirement and critical-workflow coverage. - Flaky-test rate. - Defect escape rate. - Execution time and feedback latency. - Failure diagnosis time. - Regression detection effectiveness. Release gate: Required P0 tests pass, critical payment and authorization risks have no unresolved release-blocking defects, and the necessary test evidence is available. Approved exceptions must be documented. ### 15. Failure Triage and Implementation Roadmap - Foundation: Confirm requirements, architecture, risks, and baseline metrics. - High-risk coverage: Automate payment, order, and authorization checks. - CI/CD integration: Enforce the agreed quality gates. - Reliability: Improve isolation, diagnostics, and flaky-test controls. - Continuous optimization: Refine the strategy using actual defect and execution data. Each stage requires an owner, dependencies, and measurable completion evidence. ### 16. Final Test Strategy Decision - Highest-risk workflows: Payment processing, order creation, checkout, and customer authorization. - Most valuable tests to automate first: Payment idempotency, payment/order consistency, order-total calculations, and access-control tests. - Required testing layers: Unit, component, integration, contract, selective E2E, security, and applicable non-functional testing. - Recommended execution sequence: Fast unit tests β†’ component tests β†’ contract and integration tests β†’ critical E2E tests β†’ specialized validation. - Quality gates: Required P0 tests pass, critical security and payment-integrity defects are resolved, and evidence is available. - Major risks: Payment duplication, inconsistent transaction state, unauthorized data access, unstable dependencies, and unreliable test data. - Missing information: Actual stack, API contracts, existing coverage, defect history, approved service objectives, and delivery capacity. - First implementation milestone: Establish a repeatable automated payment-and-order integrity test suite in a controlled environment. ### 🎯 TEST STRATEGY VERDICT - Automate First: Payment and order-integrity integration tests, supported by unit tests for pricing and state-transition rules. - Protect First: The purchase workflow from payment initiation through final order-state persistence. Verify successful, failed, repeated, and delayed payment outcomes. - Defer: Broad, expensive E2E coverage and extensive performance testing until the critical paths, baseline metrics, and acceptance thresholds are established. - Release Gate: Require passing critical tests, no unresolved release-blocking payment or authorization defects, and documented validation evidence before promotion. ## 🧾 Sample Test Conclusion ## Skill output assessment Qualitative review of the generated strategy, not a benchmark against an independently executed test suite. Input handling All seven short inputs were used to establish the testing context. Phase coverage All 16 phases were addressed, including traceability, risk prioritization, automation, CI/CD, metrics, and the final verdict. Quality safeguards Unknowns, potential risks, and proposed acceptance criteria were distinguished from confirmed facts. Implementation usefulness The output provides a prioritized, actionable starting point for a QA engineering team. Final assessment: The skill produces a structured and useful strategy for this sample scenario. However, the test does not yet prove how consistently it performs across different application architectures, incomplete inputs, complex payment workflows, or actual engineering repositories. Recommended next validation: Run the skill on a second scenario with a different architecture and incomplete requirements. Check whether it correctly identifies missing information without inventing APIs, test results, or acceptance criteria.
Claude

Automated Test Strategy Architect

Add to Cart
Instant accessInstant access
Usage rightsCommercial use
Money-back guaranteeMoney‑back
By purchasing this prompt, you agree to our terms of service
CLAUDE-5-5-SONNET
Tested icon
Guide icon
4 examples icon
Free credits icon
Automated Test Strategy Architect creates a structured, risk-based automated testing blueprint tailored to your application, technology stack, architecture, and delivery workflow. 🧩 Design the test pyramid: Allocate coverage across unit, integration, E2E, regression, and performance tests. 🎯 Prioritize critical risks: Identify high-impact workflows, failure scenarios, and coverage gaps. πŸ› οΈ Choose testing tools: Evaluate frameworks and tools against your stack and constraints. Stop treating te
...more
Added 21 hours ago
Report
Browse Marketplace