1. Importance of Software Testing
- Ensures software meets requirements and is free of defects.
- Improves reliability, performance, and security.
- Reduces development and maintenance costs.
Based on Scope:
- Unit Testing:
- Focuses on individual components or modules.
- Tools: JUnit, N Unit, Py Test.
- Integration Testing:
- Tests interactions between integrated modules.
- Types: Top-down, Bottom-up, Sandwich, Big Bang.
- System Testing:
- Tests the entire system as a whole.
- Ensures compliance with requirements.
- Acceptance Testing:
- Verifies the system meets business needs.
- Types: Alpha Testing, Beta Testing.
- Black-box Testing:
- Tests functionality without knowing internal code.
- Focuses on inputs and outputs.
- White-box Testing:
- Tests internal structure, code, and logic.
- Techniques: Statement, Branch, Path, Loop Testing.
- Gray-box Testing:
- Combines black-box and white-box approaches.
- Manual Testing:
- Performed by testers without automated tools.
- Automated Testing:
- Uses tools/scripts to execute tests.
- Tools: Selenium, Appium, TestNG, Postman (API).
- Regression Testing:
- Ensures new changes don’t break existing functionality.
- Performance Testing:
- Types: Load Testing, Stress Testing, Scalability Testing.
- Tools: JMeter, LoadRunner.
- Security Testing:
- Identifies vulnerabilities like SQL injection, XSS.
- Tools: OWASP ZAP, Burp Suite.
- Usability Testing:
- Ensures software is user-friendly.
- Compatibility Testing:
- Tests compatibility across browsers, devices, OS.
- Definition: Activities ensuring the quality of the software process and product.
- Key Practices:
- Code Reviews and Peer Reviews.
- Quality Audits.
- Root Cause Analysis (RCA).
- Standards:
- ISO 9001, ISO/IEC 25010 (Quality Model), CMMI (Capability Maturity Model Integration).
- Benefits:
- Saves time on repetitive tasks.
- Improves accuracy and efficiency.
- Tools:
- Web Testing: Selenium, Cypress.
- Mobile Testing: Appium, Espresso.
- Performance: JMeter, Gatling.
- CI/CD Integration: Jenkins, CircleCI.
- Write tests before writing code.
- Cycle: Red (fail) → Green (pass) → Refactor.
- Benefits:
- Ensures code reliability.
- Improves design.
- Extends TDD by using natural language.
- Frameworks: Cucumber, Spec Flow.
- Process Metrics:
- Defect Density.
- Test Case Effectiveness.
- Product Metrics:
- Maintainability, Usability, Reliability.
- Project Metrics:
- Cost, Schedule Variance.