0
0
Testing Fundamentalstesting~8 mins

Error guessing in Testing Fundamentals - Framework Patterns

Choose your learning style9 modes available
Framework Mode - Error guessing
Folder Structure for Error Guessing Test Approach
error-guessing-framework/
├── tests/
│   ├── error_guessing_tests.py
│   └── __init__.py
├── test_data/
│   └── common_error_inputs.json
├── utilities/
│   ├── error_patterns.py
│   └── __init__.py
├── config/
│   └── environment.yaml
├── reports/
│   └── latest_report.html
└── README.md
    
Test Framework Layers for Error Guessing
  • Test Cases Layer: Contains test scripts that use error guessing to input likely error-causing data.
  • Utilities Layer: Holds reusable functions and common error input patterns to help guess errors effectively.
  • Test Data Layer: Stores data files with known error inputs or boundary values to try during testing.
  • Configuration Layer: Manages environment settings like test URLs, credentials, and modes.
  • Reporting Layer: Collects and formats test results for easy review.
Configuration Patterns

Use a YAML or JSON file to store environment details and test parameters.

# environment.yaml
base_url: "https://testapp.example.com"
browser: "chrome"
credentials:
  username: "testuser"
  password: "password123"
error_patterns_file: "test_data/common_error_inputs.json"
    

This lets you easily change environments or error input sets without changing test code.

Test Reporting and CI/CD Integration
  • Generate HTML or XML reports summarizing which error guesses caused failures.
  • Integrate with CI tools (like Jenkins or GitHub Actions) to run error guessing tests automatically on code changes.
  • Use clear logs to show which error inputs were tested and their results.
Best Practices for Error Guessing Framework
  1. Maintain a library of common error inputs: Keep updating your error patterns based on past bugs and domain knowledge.
  2. Combine error guessing with other techniques: Use it alongside boundary value analysis and equivalence partitioning for better coverage.
  3. Keep tests simple and focused: Each test should try a specific error input and check for graceful failure or proper error messages.
  4. Automate error input generation: Use utilities to generate variations of error inputs to save time and reduce manual effort.
  5. Log detailed results: Capture what input caused failure and why, to help developers fix issues quickly.
Self Check Question

Where in this folder structure would you add a new set of error input patterns for a recently discovered bug?

Key Result
Organize error guessing tests with clear layers for test cases, error input data, utilities, configuration, and reporting to efficiently find software errors.