0% found this document useful (0 votes)
2 views

Software Testing

This document provides a comprehensive overview of software testing, covering key concepts such as faults, errors, failures, testing objectives, principles, and the software testing life cycle. It also discusses various testing strategies and techniques, including white box and black box testing, as well as different levels of testing like unit, integration, and system testing. Additionally, the document highlights the importance of agile testing and its differences from traditional testing methods.

Uploaded by

sidharth patil
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Software Testing

This document provides a comprehensive overview of software testing, covering key concepts such as faults, errors, failures, testing objectives, principles, and the software testing life cycle. It also discusses various testing strategies and techniques, including white box and black box testing, as well as different levels of testing like unit, integration, and system testing. Additionally, the document highlights the importance of agile testing and its differences from traditional testing methods.

Uploaded by

sidharth patil
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

📖 Chapter 1: Introduction to Software Testing

This chapter introduces Software Testing, covering faults, errors, failures, objectives,
principles, debugging, verification & validation, testing metrics, and the testing life cycle.
Below are structured notes, a mind map, and key revision points for effective learning.

📝 Notes: Introduction to Software Testing


1️⃣ Basics of Software Testing – Faults, Errors, and Failures
🔹 Software Testing is the process of verifying that a software system meets requirements
and is free of defects.

🔹 Key Terminologies:
Term Definition Example

Error (Mistake) A human-made mistake in code. Developer writes x = x+1; instead


of x = x-1;

Fault (Bug/Defect) A result of an error in the code. The incorrect logic leads to a
crash.

Failure The system behaves differently App crashes when submitting a


than expected. form.

✔ Example:
If a developer mistakenly writes + instead of -, this is an error.
This mistake introduces incorrect calculations, leading to a fault.
When a user gets an incorrect output, it's a failure.

2️⃣ Testing Objectives


🔹 The main goals of testing are:
✅ Identify defects before software release.
✅ Ensure the software meets requirements.
✅ Improve software quality and performance.
✅ Reduce maintenance costs.
✅ Ensure security and reliability.
✔ Example:
In banking software, testing ensures that transactions process correctly and no
unauthorized access occurs.

3️⃣ Principles of Testing


🔹 Fundamental principles of software testing:
✔ Testing shows the presence of defects, not their absence.
✔ Exhaustive testing is impossible. (You can't test everything!)
✔ Early testing reduces cost & effort. (Find bugs early!)
✔ Defects cluster together. (Some areas have more bugs than others.)
✔ Testing depends on context. (A game and a medical app need different tests.)
✔ Pesticide paradox. (Same tests find the same bugs; new tests are needed.)
✔ Testing is done to break software, but it should not break customer trust.
✔ Example:
Testing an ATM system should focus on security and reliability, while a gaming app
requires performance testing.

4️⃣ Testing and Debugging


🔹 Testing – Identifies defects but does not fix them.
🔹 Debugging – Fixes defects after they are found during testing.
Aspect Testing Debugging

Purpose Find defects Fix defects

Who does it? Testers Developers

Automation? Can be automated Mostly manual

Example Running test cases Fixing a function that fails

✔ Example:
A tester finds a login page bug.
A developer then debugs and fixes the issue.

5️⃣ Testing Metrics and Measurements


🔹 Metrics help measure the effectiveness of testing.
Metric Definition Example

Defect Density Bugs per 1000 lines of 5 defects in 1000 LOC =


code (KLOC). 5/KLOC

Test Coverage % of code covered by tests. 85% coverage = Most code


is tested.

Defect Detection Rate Bugs found per test cycle. Found 50 defects in 5
cycles.

Test Execution Time Time taken to run all tests. 2 hours to run all test
cases.

✔ Example:
If defect density is high, the software needs improvement before release.

6️⃣ Verification & Validation


🔹 Verification ("Are we building it right?") – Ensures that software meets design
specifications.
🔹 Validation ("Are we building the right thing?") – Ensures that software meets customer
needs.

Aspect Verification Validation

What is checked? Design, architecture User requirements, real-world


use

Methods Used Reviews, walkthroughs Testing (Functional, UAT)

Example Checking database design Checking whether users like the


before coding UI

✔ Example:
Verification: Checking code structure before execution.
Validation: Testing if users can easily navigate a website.
7️⃣ Software Testing Life Cycle (STLC)
🔹 STLC Phases:
1️⃣ Requirement Analysis – Understand what to test.
2️⃣ Test Planning – Create test strategy and test cases.
3️⃣ Test Case Development – Write test cases & test scripts.
4️⃣ Test Environment Setup – Prepare software & hardware for testing.
5️⃣ Test Execution – Run test cases and report defects.
6️⃣ Test Closure – Document testing results & learnings.
✔ Example:
In an e-commerce website, the STLC process ensures that checkout, payment, and order
tracking work perfectly.

🔑 Quick Revision Points


✅ Errors, Faults, Failures – Understand the differences.
✅ Testing Objectives – Detect defects, improve quality, ensure reliability.
✅ Testing Principles – Testing is context-dependent, continuous, and not exhaustive.
✅ Testing vs Debugging – Testing finds defects, debugging fixes defects.
✅ Verification vs Validation – Verification ensures correct design, Validation ensures correct
functionality.
✅ Testing Life Cycle – Follows Requirement → Plan → Design → Execute → Closure.
📖 Chapter 2: Software Testing Strategies & Techniques
📝 Notes: Software Testing Strategies & Techniques
1️⃣ Testability – Characteristics that Lead to Testable Software
Testability refers to how easily a software system can be tested.

✔ Characteristics of Testable Software:


1. Observability – Can defects be observed easily?
2. Controllability – Can testers control inputs and outputs?
3. Decomposability – Can software be broken into smaller modules for testing?
4. Simplicity – Simpler designs are easier to test.
5. Stability – Fewer changes reduce testing overhead.
6. Understandability – Clear documentation helps testing.

2️⃣ Test Characteristics


A good test should be:
✅ Reliable – Consistently finds defects.
✅ Efficient – Uses minimal resources.
✅ Maintainable – Can be updated easily.
✅ Comprehensive – Covers all critical scenarios.
3️⃣ Test Case Design for Desktop, Mobile, Web Apps using Excel
Test Case Components:

Test Case ID – Unique identifier.


Description – What the test will verify.
Preconditions – Setup needed before execution.
Steps to Execute – Step-by-step instructions.
Expected Result – What should happen if the test passes.
Actual Result – What actually happens.
Status – Pass/Fail.

Example (for Web App Login Page in Excel):

Test Case ID Test Steps Expected Actual Status


Description Result Result

TC-001 Verify login 1. Open User logs in As expected Pass


with valid login page 2. successfully
credentials Enter valid
username &
password 3.
Click Login

TC-002 Verify login 1. Open Error As expected Pass


with invalid login page 2. message
credentials Enter invalid displayed
credentials
3. Click
Login

4️⃣ White Box Testing (WBT)


🔍 Definition: Testing internal structures of the code.
🔍 Techniques:
1. Basis Path Testing – Identifies all possible paths in the code.
2. Control Structure Testing – Tests different logic structures (loops, conditions).
Example: If a program has an if-else condition, WBT ensures both conditions are tested.

5️⃣ Black Box Testing (BBT)


🔍 Definition: Testing the system without knowing the internal code.
🔍 Techniques:
1. Boundary Value Analysis (BVA) – Tests values at the edges of input ranges.
2. Equivalence Partitioning (EP) – Divides input data into valid & invalid classes.

Example (for an age input field accepting 18-60):

BVA Test Cases: 17, 18, 60, 61.


EP Test Cases: Any number <18, between 18-60, and >60.

6️⃣ Differences Between White Box Testing & Black Box Testing
Aspect White Box Testing (WBT) Black Box Testing (BBT)

Focus Internal logic of the code External functionality

Who Performs? Developers Testers

Knowledge Needed? Code knowledge required No code knowledge needed

Techniques Basis Path Testing, Control BVA, Equivalence


Structure Testing Partitioning

Example Testing loop execution Testing login functionality

🔑 Quick Revision Points


✅ Testability depends on observability, simplicity, and control.
✅ Good tests are reliable, efficient, and maintainable.
✅ White Box Testing tests internal logic, Black Box Testing tests external behavior.
✅ BVA focuses on input limits, EP divides inputs into valid/invalid classes.
✅ WBT vs BBT → WBT needs coding knowledge, BBT doesn’t.
📖 Chapter 3: Levels of Testing
This chapter covers various levels of testing, test strategies, and testing techniques used to
ensure software quality. Below are structured notes, a mind map, and key revision points to
help you learn efficiently.
📝 Notes: Levels of Testing
1️⃣ A Strategic Approach to Software Testing
🔹 Software Testing Strategy provides a systematic approach to ensure software quality.
🔹 Testing should be:
✅ Well-planned – Defined objectives & scope.
✅ Risk-based – Prioritize critical functionalities.
✅ Iterative – Conducted continuously at various levels.
2️⃣ Test Strategies for Conventional Software
✔ Test strategy: Defines the overall approach to testing.
✔ For conventional (desktop) software, strategies include:
Unit Testing – Tests individual components.
Integration Testing – Tests interaction between modules.
System Testing – Tests the entire system.
Acceptance Testing – Verifies software meets business needs.

3️⃣ Unit Testing


🔹 Definition: Tests individual components (functions, classes, methods).
🔹 Who performs? Developers.
🔹 Tools: JUnit (Java), NUnit (.NET), PyTest (Python).
✔ Example:
Testing a login function to check if it correctly validates user credentials.

4️⃣ Integration Testing


🔹 Definition: Tests how different modules interact.
🔹 Who performs? Developers & Testers.
🔹 Techniques:
1️⃣ Top-Down Integration – Start testing from the main module & move to submodules.
2️⃣ Bottom-Up Integration – Test submodules first, then integrate them into the main module.
✔ Example:
Testing how a shopping cart module interacts with a payment gateway.

5️⃣ System Testing


🔹 Definition: Tests the complete software system against requirements.
🔹 Types of System Testing:
Type Purpose

Acceptance Testing Ensures software meets business needs.

Performance Testing Evaluates system speed, responsiveness.

Regression Testing Ensures new changes do not break existing


features.

Load Testing Tests system behavior under high user


load.

Stress Testing Pushes software beyond limits to check


stability.

Security Testing Identifies vulnerabilities & weaknesses.

Internationalization Testing Verifies support for different languages,


currencies.

✔ Example:
Performance Testing: Checking if a website loads within 3 seconds under 1,000 users.

6️⃣ Alpha & Beta Testing


Testing Type Where? Who Tests? Purpose

Alpha Testing In-house Internal Testers Detect major bugs


before public
release.

Beta Testing Real-world End Users Gather feedback


environment for final
improvements.

✔ Example:
WhatsApp Beta: Users test new features before public rollout.

7️⃣ Usability & Accessibility Testing


🔹 Usability Testing – Ensures software is user-friendly & intuitive.
🔹 Accessibility Testing – Ensures software is usable by people with disabilities (e.g., screen
readers).

✔ Example:
Google Chrome provides a high-contrast mode for better visibility.

8️⃣ Configuration & Compatibility Testing


🔹 Configuration Testing – Tests software on different hardware & OS configurations.
🔹 Compatibility Testing – Ensures software works on various devices, browsers, and
networks.

✔ Example:
Checking if a website works properly on Chrome, Firefox, Edge, & Safari.

🔑 Quick Revision Points


✅ Unit Testing – Tests individual components, done by developers.
✅ Integration Testing – Tests interactions between modules (Top-Down, Bottom-Up).
✅ System Testing – Includes Acceptance, Performance, Load, Security Testing.
✅ Alpha vs Beta Testing – Alpha (internal), Beta (real users).
✅ Usability Testing – Checks user-friendliness, Accessibility Testing ensures inclusivity.
✅ Configuration Testing – Tests hardware setups, Compatibility Testing checks
device/browser compatibility.

💡 Study Tips for Retention


✔ Use Mnemonics:
Levels of Testing → U-I-S-A (Unit → Integration → System → Acceptance)
System Testing Types → PRLSS (Performance, Regression, Load, Stress, Security)

✔ Active Recall & Practice:


Explain Integration Testing methods without looking at notes.
Write down at least 3 test cases for System Testing scenarios.

📖 Chapter 4: Testing Web Applications


This chapter focuses on web application testing, covering quality dimensions, errors,
strategies, and test planning. Below are structured notes, a mind map, and key revision
points for effective learning.

📝 Notes: Testing Web Applications


1️⃣ Dimensions of Quality in Web Applications
🔹 Quality in WebApps means ensuring:
Dimension Description

Functionality All features work as expected.

Usability Easy to use, intuitive navigation.

Security Protects user data from threats.

Performance Fast response time, handles load


efficiently.

Compatibility Works on different browsers, OS, devices.

Reliability No unexpected crashes or downtime.

✔ Example:
A banking app should be secure, fast, and compatible across devices.

2️⃣ Errors Within a WebApp Environment


🔹 Common Web Application Errors:
Error Type Example

Functional Errors Broken links, incorrect login validation.

Security Vulnerabilities SQL Injection, XSS attacks.

Performance Issues Slow page load, server timeouts.

Compatibility Bugs Works in Chrome but fails in Safari.

Usability Issues Poor UI, unreadable text.

✔ Example:
A login page should not allow brute-force attacks.

3️⃣ Testing Strategy for Web Applications


🔹 Steps in WebApp Testing Strategy:
1️⃣ Requirement Analysis – Identify what needs testing.
2️⃣ Test Planning – Define scope, tools, and timeline.
3️⃣ Test Case Design – Create test cases for functionality, security, etc.
4️⃣ Test Execution – Run tests manually or via automation.
5️⃣ Bug Reporting & Fixing – Log and resolve issues.
✔ Example:
E-commerce Testing Strategy:
Functionality – Add to cart, checkout flow.
Security – Payment gateway protection.
Performance – Response time under 3 seconds.

4️⃣ Test Planning


🔹 What is Test Planning?
A test plan outlines the testing scope, objectives, tools, and execution process.

🔹 Key Elements of a Test Plan:


✔ Scope & Objectives – What will be tested?
✔ Test Strategy – Functional, security, performance testing approach.
✔ Test Environment – Browsers, OS, network settings.
✔ Test Schedule – Timeline for execution.
✔ Risk Analysis – Potential challenges.
✔ Example:
A test plan for a social media app includes:
Scope: Test login, post creation, profile management.
Strategy: Manual & automation testing.
Risks: High user load may crash the server.

5️⃣ The Testing Process – An Overview


🔹 WebApp Testing Lifecycle:
Phase Activities

Test Planning Define objectives, scope, and resources.

Test Design Write test cases & test scripts.

Test Execution Run test cases manually or using tools.

Defect Reporting Log and track bugs.

Test Closure Review results, finalize the report.

✔ Example:
Bug Reporting in a Banking App
Issue: Funds deducted twice during payment.
Steps to Reproduce: Click "Pay" twice.
Expected Result: Only one transaction should be processed.

🔑 Quick Revision Points


✅ WebApp Quality – Functionality, Security, Performance, Usability.
✅ Common Errors – Functional bugs, security flaws, slow performance.
✅ Testing Strategy – Plan, design cases, execute, report issues.
✅ Test Planning – Defines scope, tools, risks, and timeline.
✅ Testing Process – Covers planning, execution, bug reporting.
📖 Chapter 5: Agile Testing
This chapter covers Agile Testing, its differences from traditional testing, Agile principles,
testing quadrants, and automation. Below are structured notes, a mind map, and key revision
points for effective learning.

📝 Notes: Agile Testing


1️⃣ What is Agile Testing?
🔹 Agile Testing is a continuous testing approach that follows Agile development principles.
🔹 Testing is integrated into development, rather than being a separate phase.
🔹 Key Characteristics:
✅ Continuous & Iterative – Testing occurs throughout development.
✅ Customer-focused – Frequent feedback from stakeholders.
✅ Automation-driven – Uses tools for fast execution.
✅ Collaborative – Developers, testers, and business teams work together.
✔ Example:
Testing features in small increments instead of waiting for the full product.

2️⃣ Difference Between Traditional & Agile Testing


Feature Traditional Testing Agile Testing

Approach Follows Waterfall model Continuous testing in


(testing at the end) sprints

Development Cycle Sequential (Test after Iterative (Test alongside


coding) coding)

Documentation Heavy documentation Lightweight, user stories

Tester Role Independent testing team Testers work closely with


developers

Feedback Late feedback after Early & continuous


development feedback

✔ Example:
Traditional Testing: Testing a complete mobile app after months of development.
Agile Testing: Testing each feature as it's developed in 2-week sprints.
3️⃣ Agile Principles and Values
🔹 Agile follows 4 core values from the Agile Manifesto:
1️⃣ Individuals & interactions over processes & tools.
2️⃣ Working software over comprehensive documentation.
3️⃣ Customer collaboration over contract negotiation.
4️⃣ Responding to change over following a plan.
🔹 Agile Testing follows 12 principles, including:
✔ Continuous feedback
✔ Simplicity & efficiency
✔ Collaboration between teams
✔ Frequent releases
✔ Example:
If a feature request changes, Agile teams adapt quickly rather than sticking to an
outdated plan.

4️⃣ Agile Testing Quadrants


🔹 Agile Testing Quadrants categorize different types of tests:
Quadrant Focus Example Tests

Q1 (Technology-facing, Unit & Component Tests JUnit for Java unit testing
Automated)

Q2 (Business-facing, Functional Tests UI Testing, API Testing


Automated & Manual)

Q3 (Business-facing, Exploratory & Usability User acceptance testing


Manual) Tests

Q4 (Technology-facing, Performance, Security, JMeter for performance


Non-functional) Load Testing testing

✔ Example:
Quadrant 1: Writing unit tests for a login function.
Quadrant 4: Testing how a website performs under heavy traffic.
5️⃣ Automated Tests in Agile
🔹 Agile Testing relies on automation for faster feedback & efficiency.
🔹 Common types of automated tests:
✔ Unit Tests – Validate individual components.
✔ Regression Tests – Ensure new changes don't break features.
✔ Performance Tests – Check response time & load capacity.
✔ Security Tests – Detect vulnerabilities.
🔹 Popular Automation Tools:
🔹 Selenium – Web automation
🔹 JUnit – Java unit testing
🔹 JMeter – Performance testing
🔹 Appium – Mobile testing
✔ Example:
Running automated Selenium tests after every code update.

🔑 Quick Revision Points


✅ Agile Testing – Continuous, collaborative, and feedback-driven.
✅ Traditional vs Agile – Agile is iterative, traditional is sequential.
✅ Agile Quadrants – Covers unit, functional, exploratory, and performance tests.
✅ Automation in Agile – Uses Selenium, JUnit, JMeter for efficiency.

You might also like