SEPM Unit-4
SEPM Unit-4
STATIC ANALYSIS:
What is Static Analysis in Software Testing?
Static analysis involve software under test to detect possible defects before running the
program.
During testing software is not in execution mode.
Static analysis is done after coding.
Static analysis can be performed by a person or a machine.
In Static analysis a “walk through” is made through source code to detect:
Noncomplying rules. (For example compiler which find lexical, syntactic, semantic
mistakes).
To ensure proper coding standards are used to construct program.
Static analysis forced developers not to used risky or buggy parts of the programming
language.
What developers looks in Static Analysis in Software Testing?
Lines of Code
Proper nesting.
Comment frequency
Number of function calls
Cyclomatic complexity
Check of unit tests
Which quality attributes are focus in Static analysis?
Reliability
Maintainability
Testability
Re-usability
Portability
What are the Advantages of Static analysis ?
It can find defects in coding at exact location in source code.
It is easy to understand source code.
It allows fast defects fixing.
Defects can be found in starting of the development of software which reduces overall costing.
After Static analysis testing future test lest gives less defects compare to present test.
Some defects are easy to detect in Static analysis only, like:
Uncalled functions
Undeclared, unused variables
Unreachable code
What are the Disadvantages of Static analysis ?
Time consuming if conducted manually (By Humans not machines).
Static analysis automated tools are good for code scan only.
Static analysis automated tools may produce false positive and negative.
Static analysis not work when software is in execution.
DYNAMIC ANALYSIS:
What is Dynamic Analysis in Software testing?
Dynamic analysis is performed when software /coding is in execution.
Dynamic analysis often uses tools to perform testing.
Mostly unit testing is performed in Dynamic Testing.
What are the advantages of Dynamic analysis ?
It can be performed for any application.
It finds defects in runtime environment.
It allows application analysis without accessing its source code.
Use of it validates Static analysis findings.
It finds defects which were not included in Static Analysis.
What are the disadvantages of Dynamic Analysis?
Cannot guarantee that full source code is covered under testing.
Automated tools not ensure about security in testing.
Dynamic analysis automated tools may produce false positive and negative.
Dynamic analysis automated tools are good for code scan only.
Time consuming to fix the problem.
Difficult to find the exact location of defects.
Software testing is a process of identifying the correctness of software by considering its all
attributes (Reliability, Scalability, Portability, Re-usability, Usability) and evaluating the
execution of software components to find the software bugs or errors or defects. Backward Skip
10sPlay 10s
Software testing provides an independent view and objective of the software and gives surety of
fitness of the software. It involves testing of all components under the required services to
confirm that whether it is satisfying the specified requirements or not. The process is also
providing the client with information about the quality of the software.
Testing is mandatory because it will be a dangerous situation if the software fails any of time due
to lack of testing. So, without testing software cannot be deployed to the end user.
What is Testing
Testing is a group of techniques to determine the correctness of the application under the
predefined script but, testing cannot find all the defect of application. The main intent of testing
is to detect failures of the application so that failures can be discovered and corrected. It does not
demonstrate that a product functions properly under all conditions but only that it is not working
in some specific conditions.
Testing furnishes comparison that compares the behavior and state of software against
mechanisms because the problem can be recognized by the mechanism. The mechanism may
include past versions of the same specified product, comparable products, and interfaces of
expected purpose, relevant standards, or other criteria but not limited up to these.
Testing includes an examination of code and also the execution of code in various environments,
conditions as well as all the examining aspects of the code. In the current scenario of software
development, a testing team may be separate from the development team so that Information
derived from testing can be used to correct the process of software development.
The success of software depends upon acceptance of its targeted audience, easy graphical user
interface, strong functionality load test, etc. For example, the audience of banking is totally
different from the audience of a video game. Therefore, when an organization develops a
software product, it can assess whether the software product will be beneficial to its purchasers
and other audience.
We have various types of testing available in the market, which are used to test the application or
the software.
With the help of below image, we can easily understand the type of software testing:
Manual testing
The process of checking the functionality of an application as per the customer needs without
taking any help of automation tools is known as manual testing. While performing the manual
testing on any application, we do not need any specific knowledge of any testing tool, rather than
have a proper understanding of the product so we can easily prepare the test document.
Manual testing can be further divided into three types of testing, which are as follows:
Automation testing
Automation testing is a process of converting any manual test cases into the test scripts with the
help of automation tools, or any programming language is known as automation testing. With the
help of automation testing, we can enhance the speed of our test execution because here, we do
not require any human efforts. We need to write a test script and execute those scripts.
The procedure of software testing is also known as STLC (Software Testing Life Cycle) which
includes phases of the testing process. The testing process is executed in a well-planned and
systematic manner. All activities are done to improve the quality of the software product.
1. Requirement Analysis
2. Test Plan Creation
3. Environment setup
4. Test case Execution
5. Defect Logging
6. Test Cycle Closure
Requirement Analysis:
The first step of the manual testing procedure is requirement analysis. In this phase, tester
analyses requirement document of SDLC (Software Development Life Cycle) to examine
requirements stated by the client. After examining the requirements, the tester makes a test plan
to check whether the software is meeting the requirements or not.
For the planning of test plan Prepare the list of all requirements and List of all the
requirement specification, queries, and get resolved from Technical necessary
application architecture document Manager/Lead, System Architecture, tests for the
and well-defined acceptance criteria Business Analyst and Client. testable
should be available. Make a list of all types of tests (Performance, requirements
Functional and security) to be performed. andTest
Make a list of test environment details, which environment
should contain all the necessary tools to details
execute test cases.
Test plan creation is the crucial phase of STLC where all the testing strategies are defined. Tester
determines the estimated effort and cost of the entire project. This phase takes place after the
successful completion of the Requirement Analysis Phase. Testing strategy and effort
estimation documents provided by this phase. Test case execution can be started after the
successful completion of Test Plan Creation.
Requirement Define Objective as well as the scope of the Test strategy document.
Document software. Testing Effort estimation
List down methods involved in testing. documents are the deliverables of
Overview of the testing process. this phase.
Settlement of testing environment.
Preparation of the test schedules and control
procedures.
Determination of roles and responsibilities.
List down testing deliverables, define risk if
any.
Environment setup:
Setup of the test environment is an independent activity and can be started along with Test Case
Development. This is an essential part of the manual testing procedure as without environment
testing is not possible. Environment setup requires a group of essential software and hardware to
create a test environment. The testing team is not involved in setting up the testing environment,
its senior developers who create it.
Test case Execution takes place after the successful completion of test planning. In this phase,
the testing team starts case development and execution activity. The testing team writes down the
detailed test cases, also prepares the test data if required. The prepared test cases are reviewed by
peer members of the team or Quality Assurance leader.
RTM (Requirement Traceability Matrix) is also prepared in this phase. Requirement Traceability
Matrix is industry level format, used for tracking requirements. Each test case is mapped with the
requirement specification. Backward & forward traceability can be done via RTM.
Defect Logging:
Testers and developers evaluate the completion criteria of the software based on test coverage,
quality, time consumption, cost, and critical business objectives. This phase determines the
characteristics and drawbacks of the software. Test cases and bug reports are analyzed in depth
to detect the type of defect and its severity.
Defect logging analysis mainly works to find out defect distribution depending upon severity and
types.If any defect is detected, then the software is returned to the development team to fix the
defect, then the software is re-tested on all aspects of the testing.
Once the test cycle is fully completed then test closure report, and test metrics are prepared.
Test case execution It evaluates the completion criteria of the software Closure
report. based on test coverage, quality, time consumption, cost, report
Defect report and critical business objectives. Test metrics
Defect logging analysis finds out defect distribution by
categorizing in types and severity.
The test cycle closure report includes all the documentation related to software design,
development, testing results, and defect reports.
This phase evaluates the strategy of development, testing procedure, possible defects in order to
use these practices in the future if there is a software with the same specification.
All document and reports Evaluates the strategy of development, testing Test closure
related to software. procedure, possible defects to use these practices in report
the future if there is a software with the same
specification
The purpose of having a testing type is to confirm the AUT (Application Under
Test).
To start testing, we should have a requirement, application-ready,
necessary resources available. To maintain accountability, we should assign a
respective module to different test engineers.
The software testing mainly divided into two parts, which are as follows:
o Manual Testing
o Automation Testing
We do not require any precise knowledge of any testing tool to execute the
manual test cases. We can easily prepare the test document while performing
manual testing on any application.
In other words, we can say that the developer will execute the complete
white-box testing for the particular software and send the specific application
to the testing team.
The purpose of implementing the white box testing is to emphasize the flow
of inputs and outputs over the software and enhance the security of an
application.
White box testing is also known as open box testing, glass box testing,
structural testing, clear box testing, and transparent box testing.
Then, the developers will fix those defects, do one round of White box testing,
and send it to the testing team.
Here, fixing the bugs means the defect is resolved, and the particular feature is
working according to the given requirement.
The main objective of implementing the black box testing is to specify the
business needs or the customer's requirements.
In other words, we can say that black box testing is a process of checking the
functionality of an application as per the customer requirement. The source
code is not visible in this testing; that's why it is known as black-box testing.
.
o Functional Testing
o Non-function Testing
Functional Testing
The test engineer will check all the components systematically against
requirement specifications is known as functional testing. Functional testing
is also known as Component testing.
In functional testing, all the components are tested by giving the value,
defining the output, and validating the actual output with the expected value.
o Unit Testing
o Integration Testing
o System Testing
Now, Let's understand them one by one:
1. Unit Testing
Unit testing is the first level of functional testing in order to test any software.
In this, the test engineer will test the module of an application independently
or test all the module functionality is called unit testing.
The primary objective of executing the unit testing is to confirm the unit
components with their performance. Here, a unit is defined as a single testable
function of software or an application. And it is verified throughout the
specified application development phase.
2. Integration Testing
Once we are successfully implementing the unit testing, we will go integration
testing. It is the second level of functional testing, where we test the data flow
between dependent modules or interface between two features is
called integration testing.
The purpose of executing the integration testing is to test the statement's
accuracy between each module.
o Incremental Testing
o Non-Incremental Testing
If these modules are working fine, then we can add one more module and test
again. And we can continue with the same process to get better results.
In other words, we can say that incrementally adding up the modules and test
the data flow between the modules is known as Incremental integration
testing.
Types of Incremental Integration Testing
Incremental integration testing can further classify into two parts, which are as
follows:
In this approach, we will add the modules step by step or incrementally and
test the data flow between them. We have to ensure that the modules we are
adding are the child of the earlier ones.
In the bottom-up approach, we will add the modules incrementally and check
the data flow between modules. And also, ensure that the module we are
adding is the parent of the earlier ones.
3. System Testing
Whenever we are done with the unit and integration testing, we can proceed
with the system testing.
In this type of testing, we will undergo each attribute of the software and test
if the end feature works according to the business requirement. And analysis
the software product as a complete system.
Non-function Testing
The next part of black-box testing is non-functional testing. It provides
detailed information on software product performance and used technologies.
Non-functional testing will help us minimize the risk of production and related
costs of the software.
o Performance Testing
o Usability Testing
o Compatibility Testing
1. Performance Testing
In performance testing, the test engineer will test the working of an
application by applying some load.
In this type of non-functional testing, the test engineer will only focus on
several aspects, such as Response time, Load, scalability, and Stability of
the software or an application.
Performance testing includes the various types of testing, which are as follows:
o Load Testing
o Stress Testing
o Scalability Testing
o Stability Testing
o Load Testing
While executing the performance testing, we will apply some load on the
particular application to check the application's performance, known as load
testing. Here, the load could be less than or equal to the desired load.
It will help us to detect the highest operating volume of the software and
bottlenecks.
o Stress Testing
Primarily, stress testing is used for critical software, but it can also be used for
all types of software applications..
o Scalability Testing
o Stability Testing
Stability testing is a procedure where we evaluate the application's
performance by applying the load for a precise time.
It mainly checks the constancy problems of the application and the efficiency
of a developed product. In this type of testing, we can rapidly find the
system's defect even in a stressful situation.
2. Usability Testing
Another type of non-functional testing is usability testing. In usability
testing, we will analyze the user-friendliness of an application and detect the
bugs in the software's end-user interface.
o The application should be easy to understand, which means that all the
features must be visible to end-users.
o The application's look and feel should be good that means the
application should be pleasant looking and make a feel to the end-user
to use it.
3. Compatibility Testing
In compatibility testing, we will check the functionality of an application in
specific hardware and software environments. Once the application is
functionally stable then only, we go for compatibility testing.
Here, software means we can test the application on the different operating
systems and other browsers, and hardware means we can test the application
on different sizes.
In other words, we can say that if a single-person team done both white box
and black-box testing, it is considered grey box testing.
In its basic form, an automated testing framework is a set of guidelines with which
you can perform software testing efficiently. These guidelines include many
elements, such as coding standards, reusable modules, and libraries. It also
includes managing test data, storing test results, etc.
Now, the question is whether you need to follow the guidelines for every software
test or not.
It's simple! There is no such rule that you need to follow all the guidelines of
a testing framework altogether while performing software testing. However, if you
follow the guidelines, it will help to boost the performance of a testing process and
ensure the delivery of quality products.
With a testing framework, you can add, modify, and delete test scripts as well as
functions in a standard way. In other words, it provides a defined structure that
supports building and performing automated testing.
The different types of automated testing frameworks can be seen in the below image
This framework is also named the ‘Record and Playback’ framework. It is one of the
simplest automated testing frameworks. You can test small applications using this
framework. For example, you can test web applications’ user interfaces. Mainly, this
framework allows recording every step, such as navigation, checkpoints, user
inputs, etc., and playback them in the following tests. That’s why this framework is
named ‘Record and Playback’. Besides, testing is performed in sequential order.
tests.
It is essential to note that this framework creates an abstraction layer that isolates
the modules. Simply put, abstraction is the underlying concept of this framework.
Data-driven Framework
. Keyword-Driven Framework
Overview
Software test metrics are used to quantify the process of software testing. The
quality, growth, or improvement needed at a stage can be measured using the
metrics. So that whatever is lagging this time can be improved for the next cycle.
Metrics provide a comparative measure of a process. Metrics also help to determine
software's quality and measures required to create a defect-free quality product. The
average time taken to fix a bug is a better parameter than the time allocated for the
same.
1. Software testing metrics are used to increase the overall productivity of the
development process.
2. It helps to make more informed choices about the tools and technologies
being used.
3. It helps to identify unique ways and techniques that are beneficial for their
system, hence increasing performance.
1. Base Metrics: The essential data taken out via the carrying testing process
comes under base metrics. It comprises test cases and test cases completed.
2. Calculated Metrics: The base metrics data is further taken out to carry
differential results that provide more information about the process or product.
It is more useful for tracking project progress.
Defect metrics: The measures telling about defect ratio, speed taken to fix a
defect, and complexity of a defect come under defect metrics.
Schedule Adherence: Schedule Adherence tells the expected time given for
a task vs the time taken to complete it.
Defect Severity: Defect severity talks about how much the impact that
defect/bug has on the product.
Test case efficiency: Test case efficiency covers how well a test case can
determine the impact of a test case.
Defects finding rate: It tells what is the pattern of flaws over some time.
Defect Fixing Time: The time difference between when the defect was
assigned vs when it got fixed.
1. Analysis: The QA team identifies the metrics like time, effort, efficiency, etc.
3. Evaluation: All the calculation of the data happens here. Preparation of these
metrics is done.
4. Report: These metrics are reported. Data is compared, and loopholes and
analysis of the report are done. Measures to improve are discussed so that
next time the process would be more effective.
Test Plan
A test plan is a detailed document which describes software testing areas and
activities. It outlines the test strategy, objectives, test schedule, required
resources (human resources, software, and hardware), test estimation and
test deliverables.
The test plan is a base of every software's testing. It is the most crucial
activity which ensures availability of all the lists of planned activities in an
appropriate sequence.
PauseNext
Unmute
Duration 18:10
Loaded: 4.40%
Fullscreen
Master Test Plan is a type of test plan that has multiple levels of testing. It
includes a complete test strategy.
A phase test plan is a type of test plan that addresses any one phase of the
testing strategy. For example, a list of tools, a list of test cases, etc.
Making a test plan is the most crucial task of the test management process.
According to IEEE 829, follow the following seven steps to prepare a test
plan.
The test plan consists of various parts, which help us to derive the entire
testing activity.
o In scope
o Out scope
In scope: These are the modules that need to be tested rigorously (in-detail).
Out scope: These are the modules, which need not be tested rigorously.
That's why we have so many tools available in the market where some are
open-source and paid tools.
The significant difference between open-source and the paid tool is that the
open-source tools have limited features, whereas paid tool or commercial
tools have no limitation for the features. The selection of tools depends on the
user's requirements, whether it is paid or free.
With the help of testing tools, we can improve our software performance,
deliver a high-quality product, and reduce the duration of testing, which is
spent on manual efforts.
Test management tools are used to keep track of all the testing activity, fast
data analysis, manage manual and automation test cases, various
environments, and plan and maintain manual testing as well.
The defect tracking tool is used to keep track of the bug fixes and ensure the
delivery of a quality product. This tool can help us to find the bugs in the
testing stage so that we can get the defect-free data in the production server.
With the help of these tools, the end-users can allow reporting the bugs and
issues directly on their applications.
This type of tool is used to enhance the productivity of the product and
improve the accuracy. We can reduce the time and cost of the application by
writing some test scripts in any programming language.
This type of tool is used when we need to compare a web application in the
various web browser platforms. It is an important part when we are
developing a project. With the help of these tools, we will ensure the
consistent behavior of the application in multiple devices, browsers, and
platforms.
This type of tool is used to test the interface between modules and find the
critical bugs that are happened because of the different modules and ensuring
that all the modules are working as per the client requirements.
This testing tool is used to help the programmers to improve their code
quality, and with the help of these tools, they can reduce the time of code and
the overall cost of the software.
We can use this type of tool when we are testing any mobile application.
Some of the tools are open-source, and some of the tools are licensed. Each
tool has its functionality and features.
GUI testing tool is used to test the User interface of the application because a
proper GUI (graphical user interface) is always useful to grab the user's
attention. These type of tools will help to find the loopholes in the
application's design and makes its better.
The security testing tool is used to ensure the security of the software and
check for the security leakage. If any security loophole is there, it could be
fixed at the early stage of the product. We need this type of the tool when the
software has encoded the security code which is not accessible by the
unauthorized users.
Test Oracle is a mechanism, different from the program itself, that can be used to test the
accuracy of a program’s output for test cases. Conceptually, we can consider testing a
process in which test cases are given for testing and the program under test. The output of
the two then compared to determine whether the program behaves correctly for test cases.
✓ Testing oracles are required for testing.
✓ Ideally, we want an automated oracle, which always gives the correct answer.
However, often oracles are human beings, who mostly calculate by hand what the output
of the program should be.
✓ The human oracles typically use the program’s specifications to decide what the
correct behaviour of the program should be.
✓ A complete oracle would have three capabilities and would carry them out perfectly:
✓ A generator, to provide predicted or expected results for each test.
Test Oracle
Validate the observed output against the expected output
Oracle: Example
A tester often assumes the role of an oracle and thus serves as human oracle.
Hand calculation: the tester might input two matrices and check if the output
of the program matches the results of hand calculation. Oracles can also be programs.
For example, one might use a matrix
multiplication to check if a matrix inversion program has produced the correct result: A
× A-1 = I Test case Information to include in a Formal Test case Identification and
classification:
Each test case should have a number, title (optional). Indicate system, subsystem or
module being tested
Instructions: