0% found this document useful (0 votes)
8 views24 pages

Software Testing

The document provides an overview of software testing concepts, including the V-model, differences between testing and debugging, and definitions of bugs, faults, and failures. It also discusses various testing strategies such as unit testing, integration testing, system testing, and acceptance testing, along with their advantages and disadvantages. Additionally, it covers performance testing, regression testing, internationalization testing, and dimensions of quality in software applications.

Uploaded by

janhvibhawar28
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views24 pages

Software Testing

The document provides an overview of software testing concepts, including the V-model, differences between testing and debugging, and definitions of bugs, faults, and failures. It also discusses various testing strategies such as unit testing, integration testing, system testing, and acceptance testing, along with their advantages and disadvantages. Additionally, it covers performance testing, regression testing, internationalization testing, and dimensions of quality in software applications.

Uploaded by

janhvibhawar28
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

​ ​ 1.

Introduction to Software Testing

Q1)Explain V-model?
→The V-Model (Verification and Validation Model) is an SDLC model
where development and testing activities are performed in parallel in a
V-shaped structure.
It is an extension of the waterfall model in which each development
phase has a corresponding testing phase.

Phases of V-Model

🔹 1. Verification Phases (Left Side)


1.​Requirement Analysis
○​ Understand customer requirements
○​ Define what the system should do
2.​System Design
○​ Overall system architecture is designed
○​ Includes hardware & communication setup
3.​Architectural Design (HLD)
○​ System divided into modules
○​ High-level structure defined
4.​Module Design (LLD)
○​ Detailed design of each module
○​ Internal logic defined

🔹 2. Coding Phase (Bottom)


●​ Actual implementation of the system
●​ Code is developed based on designs
🔹 3. Validation Phases (Right Side)
1.​Unit Testing
○​ Tests individual modules
○​ Based on module design
2.​Integration Testing
○​ Tests interaction between modules
3.​System Testing
○​ Tests complete system functionality
4.​Acceptance Testing
○​ Done by users
○​ Checks if requirements are satisfied

Q2)Difference between Testing and Debugging?



Sr. No. Testing Debugging

1. Definition Process of finding defects in Process of fixing


software defects in software

2. Purpose To identify errors and bugs To find root cause


and correct the bug

3. Objective To ensure software has no To remove errors


errors from code

4. Performed Testers (and sometimes Mainly developers


By developers)

5. Knowledge Functional knowledge is Requires


Required enough programming
knowledge

6. Automation Can be manual or Mostly manual


automated process

7. Level Done at different levels No specific levels


(Unit, Integration, System)

8. Shows programmer’s Helps programmer fix


Programmer’ mistakes mistakes
s View

9. Process Finds and reports bugs Fixes the reported


bugs

Q3)Difference between bugs, faults and failures?



Sr. No. Bug Fault Failure
1. Error in code Defect in system When system
Definiti (syntax or logic design or does not work as
on mistake) implementation expected

2. Small mistake in Cause of error in Visible incorrect


Nature program system output

3. Coding phase Design or coding During execution


Occurs phase
In

4. May lead to Leads to failure System gives


Result fault wrong result or
crashes

5. Wrong syntax or Program not Software not


Exampl logic meeting working or giving
e requirements wrong output

6. Minor issue Affects functionality Affects end user


Impact directly

​ ​ ​ [Link] Testing Strategies and


Techniques

Q1)What is test case?How to create it? Explain with


example?
→A test case is a set of conditions, inputs, and expected results used
to verify whether a software application is working correctly or not.
How to Create a Test Case?

📌 Steps to Create a Test Case

1.​Understand Requirement
○​ Read and understand what needs to be tested
2.​Identify Test Scenario
○​ Decide what functionality to test
3.​Write Test Steps
○​ Define step-by-step actions
4.​Provide Test Data
○​ Input values for testing
5.​Define Expected Result
○​ What output should come
6.​Execute and Record Result
○​ Compare actual vs expected

Test Case: Login with valid username and password

●​ Test Case ID: TC01


●​ Module: Login Page
●​ Pre-condition: User must be registered

St Test Steps Test Data Expected Result Stat


ep us

1 Open login — Page should open Pas


page s

2 Enter user@gmail Username accepted Pas


username .com s
3 Enter 1234 Password accepted Pas
password s

4 Click login — User should login Pas


successfully s

Q2)Difference between black box testing and white box


testing?

Sr. No. White Box Testing Black Box Testing
(WBT) (BBT)

1. Purpose Tests internal structure Tests functionality of


and code software

2. Stage Performed in early stages Performed in later


stages

3. Knowledge Requires knowledge of No knowledge of code


code required

4. Basis Based on internal logic Based on input and


and structure output

5. Also Structural / Code-based Functional / Data-driven


Known As testing testing

6. Performed Developers and testers Testers and end users


By

7. Focus Internal working of system External behavior of


system

8. Time Time-consuming Less time-consuming


9. Suitability Suitable for algorithm Not suitable for
testing algorithm testing

10. Testing Tests paths, conditions, Uses trial and error


Method loops method

Q3)Advantages and disadvantages of black box and white


box testing?
→White Box Testing (WBT)
✅ Advantages
●​ Checks internal code logic thoroughly
●​ Helps in finding hidden errors
●​ Improves code quality and optimization
●​ Covers loops, conditions, and paths
●​ Early detection of bugs

❌ Disadvantages
●​ Requires programming knowledge
●​ Time-consuming process
●​ Not suitable for large/complex systems
●​ Cannot detect missing requirements
●​ Expensive to perform

✍️ Black Box Testing (BBT)


✅ Advantages
●​ No need of programming knowledge
●​ Tests from user perspective
●​ Easy to design test cases
●​ Suitable for large applications
●​ Identifies missing or incorrect functionality

❌ Disadvantages
●​ Does not test internal code
●​ Limited test coverage
●​ Difficult to identify root cause of bug
●​ Depends on requirement quality
●​ Some paths may remain untested

Q4)What is cyclomatic complexity? How it is computed?


→Cyclomatic complexity is a software metric used to measure the
logical complexity of a program. It represents the number of
independent paths in a program.

Computation:

Using regions:​
The number of regions in the flow graph is equal to the cyclomatic
complexity.
Using formula:​
V(G) = E – N + 2P​
Where,​
E = number of edges​
N = number of nodes​
P = number of connected components (usually 1)
Using predicate nodes:​
V(G) = P + 1​
Where P = number of decision (predicate) nodes.
Example
If a flow graph has 3 predicate nodes, then​
V(G) = 3 + 1 = 4

So, cyclomatic complexity is 4.

​ ​ ​ [Link] of Testing

Q1)What is Unit Testing ?How it works, explain with


example?Advantages and disadvantages?
→Unit testing is a type of software testing in which the smallest
testable units or components of software (such as functions,
methods, or modules) are tested individually to verify that they work
correctly.

It is performed at the lowest level of testing, usually by developers


during coding.

📌 How Unit Testing Works


●​ Each unit (function/module) is tested separately
●​ The unit is isolated from the rest of the system
●​ Test cases are written with input and expected output
●​ Drivers are used to call the unit
●​ Stubs are used to simulate called modules
●​ The output is compared with expected results
📌 Example
Consider a function:

int add(int a, int b) {


return a + b;
}

Test Case:​
Input: a = 2, b = 3​
Expected Output: 5

If output = 5 → Pass​
Else → Fail

📌 Advantages of Unit Testing


●​ Finds errors early in development
●​ Improves code quality
●​ Makes debugging easier
●​ Helps in code modification (refactoring)
●​ Reduces development cost

📌 Disadvantages of Unit Testing


●​ Time-consuming to write test cases
●​ Cannot detect integration errors
●​ Does not test complete system
●​ Cannot cover all execution paths
●​ Requires effort to create drivers and stubs
Q2)What is integration testing?Explain top-down integration?
→Integration testing is a level of software testing in which individual
modules are combined and tested as a group to verify their
interaction.

Purpose:​
To identify errors in interfaces and interaction between integrated
modules.

✍️ How Integration Testing Works


●​ After unit testing, all modules are ready
●​ Modules are combined step by step (incrementally) or all at
once
●​ Data flow and communication between modules are checked
●​ Test cases are executed to verify input/output and interfaces
●​ Errors found are fixed and modules are retested

✍️ Top-Down Integration Testing


Top-down integration is a technique where testing starts from the
top-level module and proceeds towards lower-level modules.

✍️ How Top-Down Integration Works


●​ Start testing with the main (top) module
●​ Replace lower modules with stubs
●​ Gradually replace stubs with actual modules
●​ Test each integration step
●​ Continue until all modules are integrated

✍️ Steps:
1.​Test main module with stubs
2.​Replace stub with actual module
3.​Perform testing
4.​Repeat until full system is integrated

Q3)Explain system testing , various types also how it test


system?
→System testing is a level of testing in which the complete and fully
integrated software system is tested to verify that it meets the
specified requirements.

It is the final level of testing before delivering the product to the user.

📌 How System Testing Works


●​ All modules are integrated into a complete system
●​ The system is tested from the user’s perspective
●​ Both functional and non-functional requirements are checked
●​ Inputs are given and outputs are verified
●​ Performance, reliability, and accuracy are tested
●​ Errors are identified and corrected
✍️ Types of System Testing
1.​Regression Testing​
Ensures new changes do not affect existing functionality
2.​Usability Testing​
Checks how easy the system is to use
3.​Load Testing​
Tests system performance under heavy load
4.​Hardware/Software Testing​
Verifies interaction between hardware and software
5.​Migration Testing​
Checks system works after moving to new environment
6.​Functional Testing​
Verifies all system functions work correctly
7.​Recovery Testing​
Checks system ability to recover from failures

Q4)Explain various forms of acceptance testing?


→Acceptance testing is performed to verify whether the system meets
user requirements before final delivery.

📌 Types:
1. User Acceptance Testing (UAT)

●​ Performed by end users or customers


●​ Checks whether system meets user needs and requirements
●​ Also known as beta testing / end-user testing

2. Business Acceptance Testing (BAT)


●​ Performed by the organization or business team
●​ Ensures system meets business requirements
●​ Done before UAT

3. Alpha Testing

●​ Performed by developers or internal team


●​ Done at developer’s site
●​ Conducted before releasing to customers

4. Beta Testing

●​ Performed by actual users (limited group)


●​ Done at customer’s site
●​ Provides feedback before final release

Q5)Explain performance testing? Write steps?


→Performance testing is a non-functional testing technique used to
evaluate how a system performs in terms of speed, responsiveness,
stability, and scalability under different workloads.

It checks how the system behaves under normal and heavy load
conditions.

📌 Types of Performance Testing


1.​Load Testing​
Checks system behavior under expected user load
2.​Stress Testing​
Tests system beyond its capacity to find breaking point
3.​Spike Testing​
Tests system with sudden increase/decrease in load
4.​Configuration Testing​
Checks performance with different system configurations
5.​Soak Testing​
Tests system performance over a long period

✍️ Steps of Performance Testing


1.​Identify Test Environment​
Understand hardware, software, and network setup
2.​Determine Performance Criteria​
Define goals like response time, throughput, etc.
3.​Plan and Design Tests​
Identify scenarios and prepare test data
4.​Configure Test Environment​
Set up tools and testing conditions
5.​Implement Test Design​
Create performance test cases
6.​Run Tests​
Execute tests and monitor system behavior
7.​Analyze and Retest​
Analyze results, fix issues, and retest

Q6)Write advantages of Regression testing?


→Advantages of Regression Testing
1.​Ensures the software works correctly even after changes or
modifications
2.​Confirms that unchanged parts of the system function properly
3.​Helps detect and fix new errors introduced due to changes
4.​Improves overall software reliability and stability
5.​Maintains quality of the software over time

Q7)What is internationalization testing?Explain its phases


diagrammatically?
→Internationalization testing (I18N testing) is the process of verifying
that a software application works correctly across different
languages, regions, and cultures without affecting its functionality.

It ensures that the system can support multiple languages, formats,


and conventions without code changes.

Explanation of Phases
1.​Enable Code​
Prepare code to support multiple languages
2.​I18N Testing & Validation​
Check code handles different inputs and formats
3.​Fake Language Testing​
Test using dummy language to find issues
4.​Language Testing​
Verify actual language translations
5.​Message Consolidation​
Collect all messages for translation
6.​Message Translation​
Convert messages into target language
7.​Include Messages in Product​
Integrate translated content
8.​Localization Testing​
Test software for specific region
9.​Release​
Final international version is released

Q8)Difference between alphaand beta testing?



Sr. Alpha Testing Beta Testing
No.

1. Performed by internal Performed by end


testers/developers users/clients
2. Done at developer’s site Done at user’s environment

3. Not in real environment Done in real environment

4. Uses white-box and Uses mainly black-box


black-box testing testing

5. Requires testing/lab No special environment


environment required

6. Done before beta testing Done after alpha testing

7. Bugs are fixed immediately Feedback used for future


improvements

8. Ensures product quality Ensures product readiness


internally for users

​ ​ [Link] Web Applications

Q1)Explain Dimension of Quality?


→A quality software product is one that meets user requirements
and expectations.​
Quality is evaluated by testing different dimensions of the system.

📌 Dimensions:
1.​Structure​
Ensures the system is well-organized, maintainable, and
extensible
2.​Content​
Checks correctness, consistency, grammar, and clarity of
information
3.​Interoperability​
Verifies system works properly with other systems or databases
4.​Functionality​
Ensures all functions work correctly as per requirements
5.​Usability​
Checks ease of use and user-friendly interface
6.​Compatibility​
Ensures system works on different devices, browsers, and
environments
7.​Security​
Checks protection against unauthorized access and
vulnerabilities
8.​Navigability​
Ensures proper navigation and no broken links
9.​Performance​
Tests speed, responsiveness, and behavior under load

Q2)Explain Navigation testing ? How to test Syntax and


semantics?
→Definition:​
Navigation testing analyzes how users move through a web
application to achieve a specific goal.​
It ensures that all navigation mechanisms (links, menus, paths) work
correctly and allow users to reach desired pages.

Objective:

●​ To ensure navigation is functional and error-free


●​ To verify users can reach required pages easily
✍️ Testing Navigation Syntax
Navigation syntax testing checks the structure of navigation
elements.

📌 It includes testing:
●​ Links and anchors
●​ Redirects (invalid URLs handling)
●​ Bookmarks
●​ Frames and site maps
●​ Internal search functionality

👉 Purpose: To ensure all navigation elements work correctly


without errors

✍️ Testing Navigation Semantics (NSU)


Navigation semantics testing checks the meaning and correctness
of navigation paths using NSU (Navigation Semantic Unit).

📌 It verifies:
●​ All navigation paths are tested
●​ User can complete tasks without errors
●​ User understands current location
●​ All pages (nodes) are reachable
●​ Navigation flow satisfies user requirements
Q3)What is Web application? How it works? Explain
diagrammatically.
→Definition:​
A Web application is a software application that runs on a web
server and is accessed through a web browser over the Internet.

It follows a client–server architecture, where the browser sends


requests and the server processes and returns responses.

✍️ How it Works
1.​User sends request using a browser (like Google Chrome,
Mozilla Firefox)
2.​Request goes to the Web Server via Internet
3.​Web server forwards request to Application Server
4.​Application server processes request (logic/database)
5.​Result is sent back to Web server
6.​Web server sends response to browser
7.​Browser displays the output to user
​ ​

​ ​ ​ [Link] Testing

Q1)Write features of Agile Testing?


→Development is divided into small iterations (sprints) delivered
within a fixed time.

1.​Continuous testing is performed during development to ensure


stability.
2.​Regular feedback is provided by the testing team for continuous
improvement.
3.​Bugs found in an iteration are fixed within the same iteration.
4.​Promotes collaboration between developers and testers.
5.​Agile testing is a continuous process, not sequential like
traditional methods.
Q2)List principles of Agile testing?
→1. Testing is not a phase – it is done along with development.
2. Continuous testing helps move the project forward.
3. Everyone tests – developers, testers, and analysts are involved.
4. Short feedback cycle reduces cost and improves quality.
5. Keep code clean by fixing defects in the same iteration.
6. Less documentation, focus more on testing activities.
7. Test-driven approach – testing is done during implementation.

Q3)Write short note on automated tests?


→Definition:​
Automated tests are tests that are executed automatically using
tools to verify the functionality of a software application without
manual effort.

📌 Explanation
●​ Widely used in Agile development for frequent releases
●​ Tests run automatically whenever new code is added
●​ Helps in Continuous Integration (CI) for quick error detection
●​ Saves time, increases coverage, and reduces human errors

📊 Layers of Automated Tests (Test Automation Pyramid)


1.​Unit Test Layer (Bottom)
○​ Tests individual components
○​ Fast and maximum in number
2.​API / Functional Layer (Middle)
○​ Tests business logic without GUI
○​ Moderate speed
3.​GUI Layer (Top)
○​ Tests user interface
○​ Slow and least in number

You might also like