Unit 4
Unit 4
2Marks
1. Verification vs validation
🗂 4. Review Techniques
📝 Informal Review
Definition: Unstructured, peer review without documentation.
Example: Developer asks a colleague to review code.
🚶 Walkthrough
Definition: Author leads the team through the document to gather
feedback.
Example: Design walkthrough before development.
🔍 Technical Review
Definition: Structured review conducted by peers to identify technical
issues.
Example: Reviewing architectural decisions.
Inspection
Definition: Formal and documented review with defined roles
(moderator, recorder).
Example: Code inspection before release.
6. Testing Tools
⚙️Selenium
Definition: Open-source tool for automating web application testing.
Example: Automated regression tests for a login page.
⚙️JMeter
Definition: Open-source tool for performance and load testing.
Example: Simulating 100 users accessing a web app to test response
time.
7. Black Box Testing Vs White Box Testing
1. Functional Testing
Functional Testing is a type of Software Testing in which the system is
tested against the functional requirements and specifications. Functional
testing ensures that the requirements or specifications are properly
satisfied by the application.
This testing is not concerned with the source code of the application.
Each functionality of the software application is tested by providing
appropriate test input, expecting the output, and comparing the actual
output with the expected output.
This testing focuses on checking the user interface, APIs, database,
security, client or server application, and functionality of the Application
Under Test. Functional testing can be manual or automated. It
determines the system’s software functional requirements.
2. Regression Testing
Regression Testing is like a Software Quality checkup after any changes
are made. It involves running tests to make sure that everything still
works as it should, even after updates or tweaks to the code. This
ensures that the software remains reliable and functions properly,
maintaining its integrity throughout its development lifecycle.
Regression means the return of something and in the software field, it
refers to the return of a bug. It ensures that the newly added code is
compatible with the existing code.
In other words, a new software update has no impact on the
functionality of the software. This is carried out after a system
maintenance operation and upgrades.
3. Nonfunctional Testing
Non-functional Testing is a type of Software Testing that is performed to
verify the non-functional requirements of the application. It verifies
whether the behavior of the system is as per the requirement or not. It
tests all the aspects that are not tested in functional testing.
It is designed to test the readiness of a system as per nonfunctional
parameters which are never addressed by functional testing.
It is as important as functional testing.
It is also known as NFT. This testing is not functional testing of software.
It focuses on the software’s performance, usability, and scalability.
Advantages of Black Box Testing
The tester does not need to have more functional knowledge or
programming skills to implement the Black Box Testing.
It is efficient for implementing the tests in the larger system.
Tests are executed from the user's or client's point of view.
Test cases are easily reproducible.
It is used to find the ambiguity and contradictions in the functional
specifications.
Disadvantages of Black Box Testing
There is a possibility of repeating the same tests while implementing the
testing process.
Without clear functional specifications, test cases are difficult to
implement.
It is difficult to execute the test cases because of complex inputs at
different stages of testing.
Sometimes, the reason for the test failure cannot be detected.
Some programs in the application are not tested.
It does not reveal the errors in the control structure.
Working with a large sample space of inputs can be exhaustive and
consumes a lot of time.
2.Static Testing
What is Static Testing?
Static Testing also known as Verification testing or Non-execution testing
is a type of Software Testing method that is performed in the early stage
of development to avoid errors as it is easier to find sources of failures
and it can be fixed easily. The errors that cannot be found using Dynamic
Testing, can be easily found by Static Testing.
1. Static can be done manually or with the help of tools to find bugs and
improve the quality of the software.
2. It helps to find errors in the early stage of development which is also
called the verification process.
3. It enhances maintainability and ultimately saves time and money in the
long run.
Need for Static Testing
Static testing is needed whenever the following situations are
encountered while testing an application or software:
1. Increased software size: Static testing is required to get free from bugs in
the early stages of development as with testing activity the size of the
software increases which is difficult to handle due to a reduction in the
productivity of the code coverage.
2. Dynamic testing is expensive: Dynamic testing is more expensive than
static testing as dynamic testing uses test cases that have been created in
the initial stages and there is also a need to preserve the implementation
and validation of the test cases which takes a lot of time from test
engineers:
3. Dynamic testing is time-consuming: Static testing is required as dynamic
testing is a time-consuming process.
4. Bugs detection at early stages: Static testing is helpful as it finds bugs at
early stages, while dynamic testing finds bugs at later stages which
makes it time-consuming and costly to fix the bugs.
5. Improvement of development productivity: Static testing helps to
identify bugs early in the software development thus it helps to reduce
the flaws during production and increase development productivity.
Objectives of Static Testing
Below are some of the objectives of static testing:
1. Decreases Flaws: Static testing will decrease the flaws in production as
the bugs will be detected early in the software development.
2. Saves Time: Early detection of the bugs helps to save a lot of time, effort,
and cost that will be required to fix the bugs.
3. Easy Bug Fixing: Static testing is used to identify the bugs early in
software development, where it is quite easy to fix the bugs.
4. Quality Improvement: Enhance overall software quality of the software
product by ensuring the compliance with the coding standards and best
practices.
5. Cost Efficiency: Static testing helps to reduce the cost associated with
dynamic testing by catching defects early.
Features Tested in Static Testing
Static testing involves testing the following things:
1. Unit Test Cases: It ensures test cases are complete, written in the correct
manner, and follow the specified standards.
2. Business Requirements Document (BRD): It verifies that all business
requirements are clearly mentioned in the documentation.
3. Use Cases: It examines the use cases so that they accurately represent
user interactions with the system.
4. Prototype: It reviews the prototype to make sure that it accurately
represents the main design and functionality.
5. System Requirements: It check the system requirements document for
complete accuracy.
6. Test Data: It reviews the test data to ensure it is complete and covers all
possible input scenarios.
7. Traceability Matrix Document: This ensures that all requirements are
mapped to corresponding test cases.
8. Training Guides: It reviews training materials to make sure that they
accurately reflect the system functionality and user procedures.
9. Performance Test Scripts: It examines performance test scripts to ensure
they cover all critical performance aspects.
1. Review
In static testing, the review is a process or technique that is performed to
find potential defects in the design of the software. It is a process to
detect and remove errors and defects in the different supporting
documents like software requirements specifications. People examine
the documents and sorted out errors, redundancies, and ambiguities.
Review is of four types:
1. Informal: In an informal review the creator of the documents put the
contents in front of an audience and everyone gives their opinion and
thus defects are identified in the early stage.
2. Walkthrough: It is basically performed by an experienced person or
expert to check the defects so that there might not be problems further
in the development or testing phase.
3. Peer review: Peer review means checking documents of one another to
detect and fix defects. It is basically done in a team of colleagues.
4. Inspection: Inspection is basically the verification of documents by the
higher authority like the verification of software requirement
specifications (SRS).
2. Static Analysis
Static Analysis includes the evaluation of the code quality that is written
by developers. Different tools are used to do the analysis of the code and
comparison of the same with the standard. It also helps in following
identification of the following defects:
1. Unused variables.
2. Dead code.
3. Infinite loops.
4. Variable with an undefined value.
5. Wrong syntax.
Static Analysis is of three types:
1. Data Flow: Data flow is related to the stream processing.
2. Control Flow: Control flow is basically how the statements or
instructions are executed.
3. Cyclomatic Complexity: Cyclomatic complexity defines the number of
independent paths in the control flow graph made from the code or
flowchart so that a minimum number of test cases can be designed for
each independent path.
How Static Testing is Performed?
Below are the steps that can be followed to perform static testing:
1. Planning: This step involves defining what needs to be tested, setting
objectives, determining the scope of testing, and preparing a testing
strategy. This should involve identifying the software components to be
tested, developing the testing methods, and identifying the tools to be
tested.
2. Prepare artifacts: In this step, necessary artifacts like source codes,
design documents, requirement documents, and test cases are prepared.
3. Perform static analysis: Static analysis is conducted in this phase where
the code is reviewed and analyzed for compliance with coding standards,
code quality, and security issues using specialized static analysis tools
without executing the code.
4. Perform code reviews: Code reviews are performed where a small team
of experts systematically reviews the code and finds potential errors
using various methods.
5. Report and document bugs: Bugs identified during static testing are
reported and documented.
6. Analyze results: The results collected during static testing are analyzed
to determine the quality of the software product.
Benefits of Static Testing
Below are some of the benefits of static testing:
1. Early defect detection: Static testing helps in early defect detection
when they are most easy and cost-effective to fix.
2. Prevention of common issues: Static testing helps to fix common issues
like syntax errors, null pointer exceptions, etc. Addressing these issues
early in development helps the teams to avoid problems later.
3. Improved code quality: Static testing helps to make sure that the code is
easy to maintain and well-structured. This leads to a higher quality code.
4. Reduced costs: Early bug detection in static testing helps to fix them
early in the development thus saving time, effort, and cost.
5. Immediate feedback: Static testing provides immediate evaluation and
feedback on the software during each phase while developing the
software product.
6. Helps to find exact bug location: Static testing helps to find the exact
bug location as compared to dynamic testing.
Limitations of Static Testing
Below are some of the limitations of static testing:
1. Detect Some Issues: Static testing may not uncover all issues that could
arise during runtime. Some defects may appear only during dynamic
testing when the software runs.
2. Depends on the Reviewer's Skills: The effectiveness of static testing
depends on the reviewer's skills, experience, and knowledge.
3. Time-consuming: Static testing can be time-consuming when working on
large and complex projects.
4. No Runtime Environment: It is conducted without executing the code.
This means it cannot detect runtime errors such as memory leaks,
performance issues, etc.
5. Prone to Human Error: Static testing is prone to human error due to
manual reviews and inspections techniques being used.
3.Dynamic Testing
What is Dynamic Testing?
Dynamic Testing is a type of Software Testing that is performed to
analyze the dynamic behavior of the code. It includes the testing of the
software for the input values and output values that are analyzed. It is
performed to describe the dynamic behavior of code. It refers to the
observation of the physical response from the system to variables that
are not constant and change with time.
Objectives of Dynamic Testing
1. Find errors and bugs: Through comprehensive testing, find and expose
flaws, faults, or defects in the software code and its functionality so that
they can be fixed as soon as possible.
2. Verify the behavior of the system: Verify that the software operates as
expected and complies with company requirements, industry or
regulatory standards, user expectations, and any applicable business
regulations.
3. Assessing Performance: To make sure the software satisfies performance
requirements, evaluate its performance by monitoring reaction times,
throughput, and use of resources under various scenarios.
4. Assure Trustworthiness: Examine the software's dependability by
determining how well it performs regularly under typical operating
conditions, free of unexpected faults or crashes.
5. Accuracy of Test Data: Verify the precision and consistency of the data
handled by the software to guarantee reliable and uniform information
handling.
6. Assess Scalability: Examine whether the application can grow to handle
more users, workloads, or data volumes without seeing an obvious
decline in performance.
Levels of Dynamic Testing
Several levels of dynamic testing are commonly used in the software
development process, including:
1. Unit testing: Unit testing is the process of testing individual software
components or "units" of code to ensure that they are working as
intended. Unit tests are typically small and focus on testing a specific
feature or behavior of the software.
2. Integration testing: Integration testing is the process of testing how
different components of the software work together. This level of testing
typically involves testing the interactions between different units of
code, and how they function when integrated into the overall system.
3. System testing: System testing is the process of testing the entire
software system to ensure that it meets the specified requirements and
is working as intended. This level of testing typically involves testing the
software's functionality, performance, and usability.
4. Acceptance testing: Acceptance testing is the final stage of dynamic
testing, which is done to ensure that the software meets the needs of
the end-users and is ready for release. This level of testing typically
involves testing the software's functionality and usability from the
perspective of the end-user.
5. Performance testing: Performance testing is a type of dynamic testing
that is focused on evaluating the performance of a software system
under a specific workload. This can include testing how the system
behaves under heavy loads, how it handles a large number of users, and
how it responds to different inputs and conditions.
6. Security testing: Security testing is a type of dynamic testing that is
focused on identifying and evaluating the security risks associated with a
software system. This can include testing how the system responds to
different types of security threats, such as hacking attempts, and
evaluating the effectiveness of the system's security features.
Dynamic Testing Process Phase
1. Test Case Design: It defines the test objectives, scope and criteria. It
defines test data and expected outcomes and develops test cases based
on requirements and specifications. It generates test cases that address
various programmes features.
2. Test Environment Setup: It sets up the settings and infrastructure
required for testing. It configured the network, hardware and software in
the test environment. Additionally, it makes sure that the test
environment matches the production environment by installing and
configuring the required test tools and test harnesses.
3. Test Case Execution: Using the specified test data, it runs the test cases
in order to verify the software's behavior. It keeps track of and logs the
actual outcomes, comparing them with the predicted results to find any
differences. It runs test scenarios in both positive and negative modes.
4. Test Analysis: It evaluates the general behavior of the system and finds
faults by analyzing the test case outcomes. Any inconsistencies or flaws
discovered during test execution are documented and reported. It works
along with development teams to figure out and address concerns that
are reported.
Advantages of Dynamic Testing
1. Disclosure of Difficult and Complex Defects: It discloses very difficult
and complex defects.
2. Improvement in Software Quality: It increases the quality of the
software product or application being tested.
3. Security Threat Detection: Dynamic testing detects security threats and
ensure the better secure application.
4. Early-Stage Functionality Testing: It can be used to test the functionality
of the software at the early stages of development.
5. Ease of Implementation: It is easy to implement and does not require
any special tools or expertise.
6. Testing with Different Inputs, Data Sets, and User Profiles: It can be
used to test the software with different input values, data sets and user
profiles.
7. Functionality and Performance Testing: It can be used to test the
functionality of the code and performance of the code.
Disadvantages of Dynamic Testing
1. Time-Consuming Process: It is a time consuming process as in dynamic
testing whole code is executed.
2. Increased Budget: It increases the budget of the software as dynamic
testing is costly.
3. Resource Intensive: Dynamic testing may require more resources than
static testing.
4. Less Effective in Some Cases: Dynamic testing may be less effective than
static testing in some cases.
5. Incomplete Test Scenario Coverage: It is difficult to cover all the test
scenarios.
6. Difficulty in Root Cause Analysis: It is difficult to find out the root cause
of the defects.