Software Testing & Quality Assurance · MCA Sem II · Savitribai Phule Pune University · 2024 Pattern
Quality means a product meets the requirements and expectations of the user without defects. In software, it means the application does what it is supposed to do — reliably, efficiently, and securely.
Quality Assurance (QA) is a process-oriented activity — it ensures the right processes are followed during development to prevent defects from appearing.
Quality Control (QC) is a product-oriented activity — it finds defects in the finished product through testing and inspection.
Quality has two dimensions: Fitness for Purpose (does it do what users need?) and Conformance to Requirements (does it match the specification?).
QA focuses on the SDLC process. Activities: code reviews, audits, defining standards, process improvements. QA is preventive — stop bugs before they happen.
QC focuses on the final output. Activities: running tests, finding bugs, logging defects. QC is corrective — detect and fix bugs after they appear.
Key difference: QA is about process; QC is about the product. QA prevents defects; QC detects defects. QA is everyone's responsibility; QC is done by testers.
SQA Planning is creating a roadmap that describes how quality will be achieved, monitored, and maintained throughout the software project.
ISO 9000 is an international standard for quality management systems. ISO 9001 specifically covers requirements for a QMS (Quality Management System) — it ensures organisations consistently deliver quality products.
SQA Plan includes: Purpose of the plan, list of documents to be produced (SRS, design doc, test plan), standards to be followed, reviews and audits to be conducted, tools to be used, risk management approach.
ISO 9000 Family:
ISO 9001 Principles: Customer focus, Leadership, Engagement of people, Process approach, Improvement, Evidence-based decision making, Relationship management.
SQA Activities are the specific tasks performed throughout the SDLC to ensure quality is built into the software at every stage, not just tested at the end.
Key SQA Activities:
Building Blocks of SQA are the core components that form the foundation of any SQA program. Quality Factors are measurable characteristics that determine how good the software is.
Building Blocks of SQA:
McCall's Quality Factors (most important for exams):
Software Reliability is the probability that a software system will work correctly for a specified period under specified conditions. Reliability metrics measure how often software fails and how quickly it recovers.
Availability = MTTF / (MTTF + MTTR)| Aspect | QA (Quality Assurance) | QC (Quality Control) |
|---|---|---|
| Focus | Process | Product/Output |
| Goal | Prevent defects | Detect defects |
| When | Throughout SDLC | After development |
| Who | Everyone on team | Testing team |
| Example | Code review policy | Running test cases |
| Metric | Full Form | Meaning | Good value |
|---|---|---|---|
| MTTF | Mean Time To Failure | How long before it fails | Higher ↑ |
| MTTR | Mean Time To Repair | How fast it is fixed | Lower ↓ |
| MTBF | Mean Time Between Failures | MTTF + MTTR | Higher ↑ |
| ROCOF | Rate Of Occurrence Of Failures | Failures per hour | Lower ↓ |
| POFOD | Probability Of Failure On Demand | Chance of failing per request | Lower ↓ |
| Availability | — | MTTF/(MTTF+MTTR) | Close to 1 ↑ |
Testing is the process of executing a program to find errors. The goal is NOT to prove the software works, but to find where it does NOT work.
price * 1.18 instead of price * 1.05 for GST.These are the 7 fundamental rules that guide all professional software testing. They are part of the ISTQB (International Software Testing Qualifications Board) standard.
STLC is the sequence of activities performed during the testing process. Just like SDLC defines how software is built, STLC defines how software is tested.
The V-Model (Verification & Validation Model) is a development model where each development phase has a corresponding testing phase. It's shaped like the letter "V".
W-Model: An improvement over V-Model where testing activities run in parallel with development, not after. Both form a "W" shape together.
Testing happens at four levels, starting from individual code components and going up to the complete system. Each level has a different scope and objective.
| Level | Who Tests | What is Tested | When |
|---|---|---|---|
| Unit | Developer | Single function/module | During coding |
| Integration | Tester/Dev | Module interactions | After unit testing |
| System | QA Team | Whole system | After integration |
| UAT | End User | Business scenarios | Before release |
| Aspect | Smoke Testing | Sanity Testing |
|---|---|---|
| Also called | Build verification test | Subset regression test |
| Scope | Broad – entire application | Narrow – specific functionality |
| When | After new build received | After a bug fix / minor change |
| Goal | Is build stable enough to test? | Is the specific fix working? |
| Depth | Shallow (surface level) | Deep (focused area) |
| Aspect | V-Model | Agile/TDD |
|---|---|---|
| Testing starts | After coding complete | Before coding (test first) |
| Documentation | Heavy | Light |
| Flexibility | Low – sequential | High – iterative |
| Best for | Stable, well-defined projects | Changing requirements |
Static testing means examining the code or documents WITHOUT executing the program. You find bugs by reading, reviewing, and analyzing — not by running the software.
Black Box Testing tests the software from the user's perspective — we know WHAT the software should do, but not HOW it does it internally. We test inputs and outputs only.
1. Equivalence Partitioning (EP): Divide input data into groups (partitions) where all values in a group should behave the same. Test one value from each partition.
2. Boundary Value Analysis (BVA): Bugs tend to hide at boundaries. Test values AT, just below, and just above each boundary.
3. Decision Table Testing: For features with multiple conditions combined. List all combinations of conditions and corresponding actions.
4. State Transition Testing: Test systems that behave differently based on current state. Draw a state diagram and test all transitions.
White Box (Glass Box) Testing tests the internal structure and logic of the code. The tester can see the source code and designs tests to cover code paths.
Cyclomatic Complexity (McCabe's Metric):
| Aspect | Black Box Testing | White Box Testing |
|---|---|---|
| Knowledge | No internal code knowledge | Full code knowledge required |
| Done by | Testers / end users | Developers / testers |
| Focus | Input/Output behavior | Internal logic, paths |
| Techniques | EP, BVA, Decision Table | Statement, Branch, Path coverage |
| Also called | Functional / Behavioral | Structural / Glass box |
| Technique | What it Tests | Strength |
|---|---|---|
| Statement Coverage | Every line executed | Basic — weakest |
| Branch Coverage | Every T/F branch | Stronger than SC |
| Path Coverage | Every independent path | Strongest — most thorough |
| Aspect | Static Testing | Dynamic Testing |
|---|---|---|
| Program execution | NOT required | Required |
| When | Early (before coding or after) | After code is ready |
| Examples | Code review, walkthrough, inspection | Unit test, integration test |
| Finds | Defects in docs, design, code logic | Failures in running software |
| Cost | Cheaper (no environment needed) | More expensive |
IEEE 829 is the international standard for software test documentation. The Test Plan is a document that describes the scope, approach, resources, and schedule for testing activities.
The Defect Life Cycle (Bug Life Cycle) describes the different states a bug goes through from discovery to resolution. Every bug follows this lifecycle until it is closed.
Defect Severity vs Priority:
| Aspect | Severity | Priority |
|---|---|---|
| Defined by | Tester (technical impact) | Product Owner (business urgency) |
| High Sev, Low Pri | Crash in rarely-used feature | |
| Low Sev, High Pri | Typo on homepage (brand visibility) | |
| Aspect | Project Risk | Product Risk |
|---|---|---|
| What | Risk to the project plan | Risk that the product has quality issues |
| Example | Developer quits; server delay | Payment module has security bug |
| Managed by | Project Manager | Test Manager / QA Team |
CAST means using software tools to support, automate, or manage parts of the testing process — instead of doing everything manually.
Benefits of CAST: Faster execution, reusability, accuracy, regression testing efficiency, 24/7 testing possible, better coverage.
Risks of CAST: High initial cost, maintenance overhead, testers need tool training, tools may not suit all scenarios.
| Tool | Purpose | Type | Protocol |
|---|---|---|---|
| Selenium | UI browser automation | Functional | HTTP via browser |
| JMeter | Load & performance testing | Non-functional | HTTP/HTTPS/FTP/JDBC |
| Postman | API testing | Functional | REST/SOAP |
| JIRA | Bug tracking / project mgmt | Management | Web-based |
| SonarQube | Static code analysis | Static | Code scan |
| Aspect | Manual Testing | Automation Testing (CAST) |
|---|---|---|
| Speed | Slow | Fast |
| Initial cost | Low | High |
| Best for | Exploratory, UI/UX checks | Regression, load, repeated tests |
| Maintenance | None | Scripts need updating |
| Accuracy | Human error possible | Consistent |
Software Quality Assurance (SQA) is a planned and systematic set of activities designed to ensure that the software development process and the final product conform to established technical standards and procedures.
Key Activities of SQA:
| Metric | Formula | Meaning | Good = |
|---|---|---|---|
| ROCOF | Failures / Time period | How frequently does the system fail? | Low ↓ |
| MTTF | 1 / ROCOF | Average time system works before failing | High ↑ |
| MTTR | Total repair time / No. of repairs | Average time to fix a failure | Low ↓ |
| MTBF | MTTF + MTTR | Time between one failure and the next | High ↑ |
| POFOD | Failed requests / Total requests | Chance of failing when called | Low ↓ |
| Availability | MTTF / (MTTF + MTTR) | % of time system is operational | Close to 1 ↑ |
Quality in Software Engineering has two aspects: Fitness for Purpose and Conformance to Requirements.
Product Revision Factors (McCall's Model):
Significance of ISO 9000 in SQA:
Phase 1 — Requirement Analysis: Study SRS, identify what is testable, prepare RTM.
Phase 2 — Test Planning: Create Test Plan (IEEE 829), define scope, strategy, resources, schedule.
Phase 3 — Test Case Development: Write detailed test cases covering positive, negative, boundary scenarios.
Phase 4 — Test Environment Setup: Configure hardware/software, seed database, install tools.
Phase 5 — Test Execution: Run test cases, log results, report defects in JIRA.
Phase 6 — Test Closure: Prepare Test Summary Report, analyse metrics, obtain sign-off.
| Term | Definition | Example |
|---|---|---|
| Error | Human mistake made by developer | Dev types wrong GST rate in code |
| Fault/Defect | The error stored in code or document | Wrong calculation code in billing module |
| Failure | Wrong output produced when fault executes | Customer billed ₹590 instead of ₹530 |
Common Causes of Software Failure: Poor requirements, design flaws, coding errors, insufficient testing, integration issues, environment changes, third-party dependency failures, concurrency issues.
1. Load Testing: Tests system under expected normal load. Verifies performance under anticipated users. Tool: JMeter.
2. Stress Testing: Tests system beyond maximum capacity to find the breaking point. Gradually increases load until the system fails.
3. Spike Testing: Tests system with a sudden, drastic increase in load. Simulates events like flash sales or viral promotions.
| Approach | Starts from | Uses | Best for |
|---|---|---|---|
| Big Bang | All at once | Nothing | Small systems |
| Top-Down | High-level modules | Stubs | Early UI testing |
| Bottom-Up | Low-level modules | Drivers | Early DB/API testing |
| Sandwich | Both ends | Stubs + Drivers | Large systems |
| Partition | Range | Type | Expected Behaviour |
|---|---|---|---|
| EP1 | < 0 (e.g., -1) | Invalid | Error: Invalid input |
| EP2 | 0 to 23 (e.g., 15) | Valid — FAIL | Display "FAIL" |
| EP3 | 24 to 40 (e.g., 30) | Valid — PASS | Display "PASS" |
| EP4 | > 40 (e.g., 45) | Invalid | Error: Invalid input |
Minimum test cases: 4 (one per partition)
| Aspect | Static Testing | Dynamic Testing |
|---|---|---|
| Execution | NOT required | REQUIRED |
| When | Early — requirements, design, coding | Later — after code is written |
| Finds | Defects in documents, design flaws | Failures — wrong outputs, crashes |
| Techniques | Reviews, Walkthroughs, Inspections | Unit, Integration, System Testing |
| Tools | SonarQube, PMD | Selenium, JMeter, JUnit |
| Cost | Cheaper — no environment needed | More expensive |
Roles: Moderator, Author, Reader, Reviewers (Inspectors), Scribe.
6 Phases of Fagan Inspection:
| TC ID | Scenario | Input | Expected Output | Type |
|---|---|---|---|---|
| CK-TC-001 | Place order with valid items | Cart: Burger+Fries, UPI payment | Order confirmed, ID generated, SMS sent | Positive |
| CK-TC-002 | Place order with empty cart | Cart: empty | Error: "Add items before ordering" | Negative |
| CK-TC-003 | Apply valid promo code | Cart: ₹500, Code: SAVE20 | Discount ₹100, Total ₹400 | Positive |
| CK-TC-004 | Apply expired promo code | Code: MONSOON23 | Error: "Promo code has expired" | Negative |
| CK-TC-005 | Cancel order within 5 minutes | Order placed 2 min ago | Cancelled, full refund initiated | Positive |
| CK-TC-006 | Cancel order after 15 minutes | Order in PREPARING state | Error: "Kitchen is preparing your food" | Negative |
| CK-TC-007 | Minimum order value check | Cart ₹80, Kitchen min ₹100 | Error: "Add ₹20 more to place order" | Negative |
| CK-TC-008 | Payment failure during checkout | Declined test card | Error: "Payment failed. Try another method." | Negative |
CAST (Computer-Aided Software Testing) refers to using software tools to support, enhance, automate, or manage aspects of the testing process.
Benefits:
Step 1 — Assessment: Understand testing challenges; define success criteria.
Step 2 — Tool Evaluation (POC): Short-list 2-3 tools; run proof of concept on a small feature.
Step 3 — Tool Selection: Select based on POC results, team skill, and budget.
Step 4 — Pilot Implementation: Implement for one module first; identify challenges in a controlled way.
Step 5 — Training: Hands-on workshops, documentation, pair programming sessions.
Step 6 — Guidelines & Standards: Define coding standards for test scripts, naming conventions, templates.
Step 7 — Full Rollout: Expand to all modules; integrate with CI/CD pipeline.
Step 8 — Monitoring & Maintenance: Track metrics; update scripts when UI changes.
Postman is a widely-used API testing tool for designing, testing, documenting, and monitoring REST and SOAP APIs.
Key Uses: Send HTTP requests (GET/POST/PUT/DELETE), validate responses (status codes, body structure), write automated test scripts in JavaScript, group tests into collections, use environment variables to switch between dev/staging/prod, run via Newman CLI in CI/CD, generate API documentation, and create mock servers.
State Descriptions: New (logged by tester) → Assigned (by lead) → Open (dev working) → Fixed (dev done) → Retest (tester verifies) → Verified (fix confirmed) → Closed (official closure). Reopened if fix doesn't work.
Severity vs Priority: Severity = technical impact (Critical/Major/Minor). Priority = business urgency (High/Medium/Low). A logo misalignment: Low Severity, High Priority.