0
0
Testing Fundamentalstesting~8 mins

What software testing is in Testing Fundamentals - Framework Patterns

Choose your learning style9 modes available
Framework Mode - What software testing is
Folder Structure of a Simple Testing Project
project-root/
├── tests/
│   ├── test_login.py
│   ├── test_signup.py
│   └── test_checkout.py
├── src/
│   └── app_code.py
├── reports/
│   └── test_report.html
├── config/
│   └── config.yaml
├── utils/
│   └── helpers.py
└── README.md
Test Framework Layers
  • Test Cases Layer: Contains the actual test scripts that check if the software works as expected.
  • Application Code Layer: The main software code that is being tested.
  • Utilities Layer: Helper functions and tools to support tests, like data generators or loggers.
  • Configuration Layer: Holds settings like environment details and test data.
  • Reports Layer: Where test results and reports are saved for review.
Configuration Patterns

We keep settings separate from code to easily change things like:

  • Environment: Test on development, staging, or production servers by changing one place.
  • Credentials: Store usernames and passwords securely, not hard-coded in tests.
  • Test Data: Use external files or config to manage input data for tests.

This makes tests flexible and easy to maintain.

Test Reporting and CI/CD Integration

After tests run, we generate reports showing which tests passed or failed.

  • Reports help quickly find problems.
  • We can connect tests to CI/CD tools (like Jenkins or GitHub Actions) to run tests automatically when code changes.
  • This keeps software quality high and catches bugs early.
Best Practices for a Testing Framework
  • Keep tests independent: Each test should run alone without relying on others.
  • Use clear naming: Test names should explain what they check.
  • Separate test data: Don't mix data inside test code; keep it outside.
  • Automate reporting: Always have clear, easy-to-read test results.
  • Keep config flexible: Make it easy to switch environments or settings.
Self Check Question

Where in this folder structure would you add a new test for the user profile page?

Key Result
Software testing frameworks organize tests, code, configs, and reports to check software works correctly.