0% found this document useful (0 votes)
82 views11 pages

29-11 Static and Dynamic Testing1234

Static testing is a software testing method that checks for defects in an application without executing its code. It involves techniques like reviews and static analysis to identify errors early in the development process. This helps reduce problems later on. Static testing finds issues in documentation and code structure through activities like inspections of requirements, design documents, and source code. It aims to catch defects before live testing begins.

Uploaded by

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

29-11 Static and Dynamic Testing1234

Static testing is a software testing method that checks for defects in an application without executing its code. It involves techniques like reviews and static analysis to identify errors early in the development process. This helps reduce problems later on. Static testing finds issues in documentation and code structure through activities like inspections of requirements, design documents, and source code. It aims to catch defects before live testing begins.

Uploaded by

Rishabh Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

What is Static Testing with Example?

Static Testing is a software testing method, which is used to check defects in


software application without executing the code whereas dynamic testing is used
to check defects by executing the code. 

Static testing refers to a type of test in which no live application is used. This type
of testing allows you to identify and correct mistakes earlier in the development
process, resulting in fewer problems later on. It also aids in the detection and
correction of flaws that may not be discovered by dynamic testing.

It starts early in the Software Development Life Cycle, therefore it is completed


during the Verification Process.

In Static Testing, the software application is tested with Review, Walk Through,
Inspection, and Analysis.

To ensure that the code is correct, developers must adhere to rigorous testing
procedures. This testing aims to find mistakes from the requirement gathering
phase of SDLC (software development life cycle) all the way through source code.

Static testing can be used to catch defects in the documentation phases, which
helps to prevent errors at later stages and is therefore cost-effective.

Reviews should be used in all significant aspects of software development,


including requirements, design, implementation, testing, and maintenance.

Types of defects that are easier to find during static testing are deviations from
standards, missing requirements, design flaws, unused variables, non-
maintainable code, and inconsistent interface specifications.

Static Testing Techniques


Reviews and Static Analysis are the two techniques used to conduct static testing.
#1. Reviews
Reviews are usually performed to identify and correct errors and uncertainties
found in supporting documents such as requirement documents, design
documents, test cases etc.,

Types of Static Testing Reviews


Static testing reviews are classified into four types:

#1. Informal Reviews


Informal reviews do not use any set method to detect problems. Coworkers
review documents and give informal comments.

#2. Walkthrough
The document’s author will explain the document to their team during a
walkthrough. Participants would ask questions, and any notes are taken down.

#3. Technical Reviews


Peers examine technical specifications in order to detect any errors.

#4. Inspections
Moderator will do a comprehensive examination as part of the procedure to
detect flaws.

Types of Participants in Review Process


Participants in the review process are as follows

#1. Author
Author’s responsibility is to fix the errors found and improves the document’s
quality.
#2. Moderator
The Moderator is in charge of checking for entries, following up on reworks,
coaching team members and to schedule the meetings.

#3. Scribe
Logs the error during a review.

#4. Reviewer
Examine the material for defects.

#5. Manager
Determine how evaluations will be carried out and make sure that the review
process goals are achieved.

#2. Static Analysis


Static analysis is where the code developed by developers is evaluated. It is done
to find structural defects that may lead to errors.

Static code analysis can be done both either manually or through automation
with the use of various software testing tools.

Some of the tools which can be used for static analysis of code are:

 Checkstyle
 Clang
 Find Bugs
 JArchitect
 JTest
 Sonarqube
 Soot
 Source meter
 Thread Safe
Types of Static Analysis
Static Analysis is classified into three types:

#1. Data Flow


In static analysis, the data flow is related to the stream processing.

#2. Control Flow:


Control flow is used to specify how the statements or instructions are executed.

#3. Cyclomatic Complexity:


It is the measurement of the program’s complexity that is basically related to the
number of independent paths in the control flow graph of the program.

Advantages and Disadvantages of Static


Testing
We have both advantages and disadvantages when it comes to static testing.

Advantages of Static Testing


Following are the advantages of static testing:

 Increased product quality


 It reduces the cost and effort of fixing bugs because it identifies the bugs
in the earlier stages of the SDLC.
 It gives deeper insight into the software for the whole team. 

Disadvantages of Static Testing


Following are the disadvantages of static testing:

 It requires lots of documentation.


 Many meetings and evaluations.
 Some analysis tools are not compatible with all programming languages.
What is Dynamic Testing with Example?
Dynamic Testing is a software testing method, which is used to check defects in
software application by executing the code where as static testing is used to
check defects without executing the code. Read more about Static testing here.

The primary goal of dynamic testing is to evaluate software functionality under


dynamic conditions, such as those that cannot be predicted ahead of time.

To perform testing effectively, we follow verification and validation (V&V) in


Software Testing.

Selenium Interview Questions And Answers For Freshers And Experienced

Verification is also known as Static testing.

Validation is also known as Dynamic Testing.

In Dynamic testing, the software is tested for the given values, and the results are
examined.

In Dynamic testing, testers execute the test cases by giving input values and
validate the expected output with the actual output.

It can be done both manual or automated way.

Dynamic Testing Example

Let’s see how to perform dynamic testing with an example.

We perform dynamic testing by providing inputs (dynamic values) and validate


the result or output value of behavior.

Assume, we are testing a login functionality of a Gmail application. To do this first


we need to create Gmail accounts (username and password) for testing purpose.
Gmail has certain conditions for setting up username and password.

Username should be 6 charactes long


Password should be 8 characters long, must have a capital letter, one numeric
value, and one special character.

Say, we have the following parameters (username and passwords) to test login
functionality of Gmail account

Parameter Username Password Valid/Invalid Test Data

Parameter 1 rajkumar RajSTM@1 Valid

Parameter 2 rajkumar RajSTM@@ Invalid

Parameter 3 rajkumar rajstm@1 Invalid

When we pass the above test data while testing Gmail login functionality, Gmail
takes us to the inbox while we pass the parameter 1 and throws an error message
while we pass the parameters 2 & 3. This result indicates that the code is
dyanmically responding based on the user input.

Here we know that the parameters 2 & 3 values are incorrect but we still pass
those to know how the system is performing with incorrect input data.

This type of testing is done with the intent of finding errors.

Types of Dynamic Testing


Dynamic testing is divided into two categories, which are as follows:

 White Box Testing


 Black Box Testing

The picture below shows us the many sorts of dynamic testing, levels of testing,
and so on.

Let me go through each type of testing and why it’s used.


White Box Testing
White box testing is also known as clear box testing or glass box testing.

White box testing is a software testing method used to test how the application
is performing based on the code.

White box testing is usually performed by the developers or white box testers
who has knowledge on the internal structure/code/design.

Black Box Testing


Black box testing is also known as Behavioral/Specification-Based/Input-Output
Testing

Black Box Testing is a software testing method used to evaluate the functionality


of the software without looking at the internal code structure.

This can be applied to every level of software testing such as Unit, Integration,


System, and Acceptance Testing.

Black Box Testing is usually performed by testers who don’t require any
programming expertise.

Dynamic Testing Techniques


Dynamic Testing techniques are classified into two categories. They are

 Functional Testing
 Non-functional Testing

Functional Testing
Functional testing is done to verify that each function of the application behaves
as specified in the requirement. Here testes test all the funcitionalities by
providing appropriate input to validate the actual output with the expected
output.
In simple words, what the system actually does is functional testing.

Non-functional Testing
Non-functional testing is done to improve the user experience on how fast the
application responds to a request. it refers to various aspects of the software such
as performance, load, stress, scalability, compatibility, security, etc.,

It verifies the attributes such as performance, memory leaks, or robustness of the


system.

In simple words, how well the system performs is non-functionality testing.

Levels of Dynamic Testing


Dynamic testing is done at both functional and non-functional levels.

Some of the levels in functional testing are as follows.

 Unit Testing
 Integration Testing
 System Testing
 Accpetance Testing

Unit Testing: Unit testing is also known as module testing or component testing.


It is used to verify that each component of the source code, such as a unit or
module, is functioning properly. Usually developers do unit testing in their own
environment.

Integration Testing: The goal of integration testing is to check for any issues


between two software components. There are numerous ways to do integration
testing, including the Big Bang Approach, Top-Down Approach, Bottom-Up
Approach, and Hybrid Integration approach.
System Testing: End-to-end testing of a fully integrated application to evaluate
the system’s compliance with its specified requirements is called System Testing.
It is also known as End to End testing. Checking the completed system to ensure
that the application performs as intended or not.

Accpetance Testing: Acceptance testing is the process of determining whether


an application behaves as expected after it’s released. It is carried out by end-
users and testers to confirm that the application functions correctly.

Some of the levels in non-functional testing are as follows.

 Performance Testing
 Usability Testing
 Compatibility Testing
 Recovery Testing
 Security Testing

Performance Testing: This is the process of determining or validating the speed,


scalability, and/or stability features of a system or application under test. The goal
of performance testing is to produce response times, throughput, and resource-
utilization levels that satisfy project or product performance specifications. Read
more about Performance Testing here.

Usability Testing: To assess whether the application is easy to use or not. This
testing seeks to determine if the end-user can easily understand and use the
software. It should be self-explanatory, and no training should be required to run
it. Read more about Usability Testing here.

Compatibility Testing: It’s the process of deploying and measuring whether an


application functions as intended in a variety of environmental factors.

Recovery Testing: Recovery testing determines how quickly the system can


recover from a system crash or hardware failure.

Security Testing: Security testing is a method for assessing whether the system


protects data and functions as intended. Read more about Security Testing here.

Dynamic Testing Process


In STLC, the actual Dynamic Testing Process begins with Test Case Design. Let’s
go through each activity.

Step 1: Test Case Design


Here we design test cases based on the requirements. We can originate the test
conditions, collect the test cases, uncover the coverage Items, and identify those
features that need to be tested.

Step 2: Environment Setup


We must ensure that the Testing Enviroment is always comparable to the
Production environment. In this phase, among other things, we must set up and
maintain the test machines.

Step 3: Test Execution


During this phase, test cases are put into action.

Step 4: Analysis & Evaluation


We analyse and evaluate the findings generated from the testing. We’ll compare
those outcomes with the expected results.

Step 5: Bug Reporting


The difference in the execution and actual outcomes must be resolved, otherwise
it is treated as a failure. If the Expected and Actual Results are not comparable,
the Test case should be marked as fail, and a bug should be logged.

Advantages and Disadvantages of Dynamic


Testing
We have both advantages and disadvantages when it comes to dynamic testing.
Advantages of Dynamic Testing
Following are the advantages of dynamic testing:

 Dynamic Testing becomes essential in validating the performance of the


software application.
 It ensures the reliability and consistency of the software application.
 In dynamic testing process we can use automation tools.
 Uncovered flaws that are deemed to be too hard or complex for static
Testing and cannot be addressed through static Analysis may be revealed
by dynamic Testing.
 We execute the software end to end in Dynamic Testing, ensuring error-
free code and improving the product’s quality and project’s success.
 We can identify security issues, which improves the quality and security of
our application.

Disadvantages of Dynamic Testing


Following are the disadvantages of dynamic testing:

 It is a time-consuming process since it executes the application/software or


code, which needs a huge amount of resources.
 It is bit costlier since it starts after the coding phase is finished. It doesn’t
start early in the software development lifecycle. It catches bugs in later
stages. Because of this, any bugs fixed in later stages may result in an
increase in cost.

You might also like