Assignment 1
Q1: Explain different terminologies associated with software testing.
Bug/Defect/Fault: A flaw in the software that causes it to behave unexpectedly.
Error: A human mistake during software development (e.g., incorrect code, design).
Failure: The software’s inability to perform its required function due to a bug.
Test Case: A specific set of inputs, execution conditions, and expected outcomes
used to validate one aspect of the software.
Test Plan: A document detailing the objectives, scope, approach, and focus of a
software testing effort.
Test Suite: A collection of test cases intended to test a program.
Test Scenario: A high-level description of what to test, often representing a user story
or usage flow.
Test Data: The input data used to execute test cases.
Verification: Checking if the software meets specifications (e.g., reviews,
walkthroughs).
Validation: Checking if the software meets user expectations and requirements.
Regression Testing: Re-testing software to ensure that recent changes haven’t
broken existing functionality.
Smoke Testing: A basic test to ensure the most important functions work after a
build.
Sanity Testing: Focused testing to verify specific functionality after minor changes.
Alpha Testing: Conducted by developers or testers within the organization before
release.
Beta Testing: Done by real users in a real environment before the final release.
Q2: Explain conventional software testing methods.
White Box Testing (Structural Testing):
Testing internal logic and code structure.
Techniques: Path testing, loop testing, condition testing.
Black Box Testing (Functional Testing):
Testing software functionality without looking into internal code.
Techniques: Equivalence partitioning, boundary value analysis, decision table
testing.
Gray Box Testing:
Combination of white and black box testing.
Tester has limited knowledge of the internal workings.
Manual Testing:
Testers execute test cases manually without using tools.
Used for exploratory, usability, and ad hoc testing.
Automated Testing:
Tools are used to run tests automatically.
Tools: Selenium, QTP, TestNG.
Unit Testing:
Testing individual components or modules.
Usually done by developers.
Integration Testing:
Testing combined modules to evaluate their interaction.
System Testing:
Testing the complete system for compliance with requirements.
Acceptance Testing:
Done by the client to verify if the software meets business needs.
Q3: Explain stress test.
Stress Testing is a type of performance testing that evaluates a system’s robustness
under extreme conditions.
Purpose: To identify the breaking point of an application and how it recovers.
Approach:
Push the system beyond its normal load limits (CPU, memory, users).
Monitor for crashes, slowdowns, data corruption.
Examples:
Simulating thousands of concurrent users.
Running the application on minimal system resources.
Benefits:
Ensures stability under high pressure.
Helps plan for unexpected spikes in usage.
Identifies performance bottlenecks.
Q4: Explain Measure, Measurement, and Metrics.
Measure:
A quantifiable property of a software attribute.
Example: Number of lines of code, number of defects.
Measurement:
The act or process of assigning a number to a measure.
Example: Measuring the size of code as 1500 lines.
Metrics:
A calculated measure used to assess performance or quality.
Example: Defect density = Number of defects / Size of software.
Q5: Explain Debugging in detail.
Debugging is the process of identifying, analyzing, and fixing bugs in the software.
Steps in Debugging:
Reproduce the Bug:
Re-run the software to observe the issue.
Diagnose the Cause:
Use logs, tools, and debugging software to find the root of the problem.
Locate the Fault:
Pinpoint the exact location in the code causing the bug.
Fix the Fault:
Correct the code and recompile if necessary.
Test the Fix:
Ensure the fix resolves the issue without introducing new problems (regression
testing).
Assignment 2
1) Explain Software Testing Fundamentals
Software Testing Fundamentals refer to the core principles and practices used to
assess the quality, correctness, and performance of software. The main goals are to
detect defects, ensure reliability, and confirm that the software meets the specified
requirements.
Key Fundamentals:
Verification and Validation:
Verification: Ensures the product is being built correctly (e.g., design reviews).
Validation: Ensures the correct product is being built (e.g., testing with requirements).
Defect Detection: Identifying bugs/errors in code before it is released.
Test Planning: Involves creating a test strategy, defining test cases, and preparing
test data.
Test Levels:
Unit Testing
Integration Testing
System Testing
Acceptance Testing
Test Types:
Functional Testing: Based on software requirements.
Non-functional Testing: Includes performance, usability, security, etc.
Manual and Automated Testing: Testing can be performed manually or through
automation tools like Selenium, JUnit, etc.
Early Testing Principle: Testing should begin as early as possible in the development
lifecycle.
2) Discuss Role of Developer, Tester, and Client in Software Distribution
Developer:
Writes and implements code based on design and requirements.
Performs unit testing before passing software to testers.
Fixes bugs reported by testers or clients.
Participates in code reviews and integration of modules.
Ensures code is maintainable and scalable.
Tester (Quality Assurance):
Designs and executes test cases.
Performs various testing types: functional, regression, stress, etc.
Reports bugs to the development team.
Verifies bug fixes.
Ensures that the software meets quality standards before distribution.
Client (End User/Customer):
Provides requirements for the software.
Reviews software through acceptance testing (alpha/beta).
Reports issues or feedback after software release.
Approves the final product for distribution and use.
3) Explain 4 Types of White Box Testing
White Box Testing involves testing the internal structure or logic of the code.
1. Statement Testing:
Ensures every statement in the code is executed at least once.
Example: Testing all lines in an if-else block.
2. Branch Testing (Decision Testing):
Tests every possible decision or branch (true/false) in the program.
Ensures that each possible outcome of every decision is tested.
Example: In an if condition, both true and false outcomes are tested.
3. Path Testing:
Focuses on testing all possible paths in the program’s control flow.
It is more exhaustive and detects logical errors.
4. Loop Testing:
Specifically targets loops in the program:
Simple loops (0, 1, many iterations)
Nested loops
Concatenated loops
Example: Ensures that loops execute the correct number of times and handle edge
cases properly.
4) Explain Black-Box Testing in Detail With Example
Black-Box Testing focuses on testing the functionality of the software without
knowing its internal code structure.
Key Features:
Based on requirements and specifications.
Tester does not need programming knowledge.
Useful for functional testing of the application.
Techniques:
Equivalence Partitioning:
Divides input data into valid and invalid partitions and tests one from each group.
Example: Input age must be 18–60. Test one value from each range: <18, 18–60,
>60.
Boundary Value Analysis:
Focuses on values at the edge of partitions.
Example: For input 1–100, test 0, 1, 100, 101.
Decision Table Testing:
Tests various combinations of inputs with associated outputs.
State Transition Testing:
Tests system behavior with changing input conditions.
Example:
Imagine a login page that requires:
Username: not empty
Password: at least 6 characters
Test Cases (Black Box):
Valid username and valid password → Success
Empty username → Error
Password < 6 characters → Error