0
0
Testing Fundamentalstesting~8 mins

Testing vs debugging distinction in Testing Fundamentals - Framework Approaches Compared

Choose your learning style9 modes available
Framework Mode - Testing vs debugging distinction
Folder Structure of a Typical Testing Project
  testing-project/
  ├── tests/               # Automated test scripts
  │   ├── unit/            # Unit tests
  │   ├── integration/     # Integration tests
  │   └── e2e/             # End-to-end tests
  ├── src/                 # Application source code
  ├── debug/               # Debugging scripts and logs
  │   ├── logs/            # Logs collected during debugging
  │   └── scripts/         # Helper scripts for debugging
  ├── reports/             # Test execution reports
  ├── config/              # Configuration files
  └── utils/               # Utility functions for tests
  
Test Framework Layers
  • Test Layer: Contains test cases that check if the software works as expected.
  • Debug Layer: Contains tools and scripts to find and fix problems when tests fail.
  • Utility Layer: Helper functions used by both tests and debugging scripts.
  • Configuration Layer: Holds settings like environment details and credentials.
  • Reporting Layer: Collects and shows results of tests to understand success or failure.
Configuration Patterns

Use separate config files for different environments (e.g., dev, test, prod). This helps tests run correctly in each place.

Store sensitive data like passwords securely, not in plain files. Use environment variables or secret managers.

Configure test settings (like browser type or timeout) in one place to easily change them without editing tests.

Test Reporting and CI/CD Integration

Test reports show which tests passed or failed. They help quickly spot problems.

Integrate tests into CI/CD pipelines to run tests automatically on every code change.

Debugging logs and error details should be linked to test failures to speed up problem fixing.

Best Practices for Testing vs Debugging
  • Separate Concerns: Keep testing and debugging code in different folders to avoid confusion.
  • Automate Testing: Write tests that run automatically to catch issues early.
  • Use Logs Wisely: Collect detailed logs during test failures to help debugging.
  • Clear Reporting: Make test reports easy to read and understand for quick feedback.
  • Secure Configurations: Protect sensitive info and keep configs flexible for different environments.
Self Check Question

Where in this folder structure would you add a new script to help find why a test is failing?

Key Result
Testing checks if software works; debugging finds and fixes why it doesn't.