### QA BEST PRACTICES - Always align test cases with the acceptance criteria of the user story. - Use boundary value analysis to catch edge case bugs. - Include negative test cases (e.g., invalid inputs, unauthorized access). - Consider accessibility and responsive testing for UI components. - Verify compliance requirements (GDPR, OWASP Top 10, etc.) when applicable. - Use exploratory testing to discover unexpected behavior in workflows. ### COMMON TEST TYPES - Functional Testing: Verifies core functionality works as expected. - Regression Testing: Ensures existing functionality is unaffected by new changes. - Integration Testing: Verifies interfaces and interactions between modules/services. - Security Testing: Identifies vulnerabilities like XSS, CSRF, authentication flaws. - Performance Testing: Measures system speed, scalability, and reliability under load. - Usability Testing: Validates the ease of use and clarity of workflows. ### TEST CASE EXAMPLES **Scenario: Login System** - Verify user can login with valid credentials. - Verify error is shown for incorrect password. - Check account lockout after 5 failed login attempts. - Test password reset flow with valid and invalid emails. - Ensure password input field is masked. - Attempt login from multiple devices concurrently. **Scenario: Shopping Cart** - Verify product is added to cart and cart total updates. - Check removal of an item updates cart total. - Add same item multiple times and validate quantity logic. - Test cart persistence after page refresh or relogin. - Simulate network delay and ensure cart sync is retained. **Scenario: API-based System** - Validate GET /users returns 200 with correct schema. - Ensure POST /create-user fails without required fields. - Test rate-limiting behavior under rapid API calls. - Check unauthorized access returns 401. ### EDGE CASES - Inputs with special characters (e.g., %, $, <, >, `). - Extremely long strings (e.g., 500+ characters in a name field). - Input empty fields where mandatory. - Date/time edge values: Feb 29, 2038 year bug, etc. - Simulate backend unavailability (503, 504 errors). ### TEST DESIGN TEMPLATES - Given [pre-condition], When [action], Then [expected result]. - Use test data sets with both valid and invalid combinations. - Prioritize based on risk and usage frequency. ### SECURITY COMPLIANCE - Enforce password policies: min length, complexity. - Ensure sensitive fields (password, token) are never logged. - Validate user input on both client and server sides. - CSRF protection for form submissions. - Encrypt data at rest and in transit.