VOOZH about

URL: https://www.geeksforgeeks.org/software-engineering/difference-between-static-and-dynamic-testing/

⇱ Static Testing Vs Dynamic Testing - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Static Testing Vs Dynamic Testing

Last Updated : 17 Jun, 2026

Static Testing and Dynamic Testing are two important approaches used in software testing to ensure quality. Static testing evaluates software artifacts without executing the code, while dynamic testing validates the software by executing it. Both are essential for identifying defects at different stages of development.

  • Helps in early defect detection and quality improvement
  • Covers both code review and execution-based testing
  • Used together for complete software validation

Static Testing

Static Testing is the process of evaluating software without executing the code. It focuses on reviewing documents, code, and design to find defects early.

  • Done without running the program
  • Includes reviews, inspections, and walkthroughs
  • Detects defects early during requirements, design, and coding phases.

Example: Reviewing requirement documents or code to identify mistakes before execution.

Dynamic Testing

Dynamic Testing is a software testing technique in which the application is executed to evaluate its behavior, functionality, and performance. It involves validating the actual output against expected results and helps identify defects during runtime.

  • Involves actual execution of the software using Black Box, White Box, or Gray Box testing techniques.
  • Helps identify runtime errors, functional defects, integration issues, and non-functional issues such as performance, security, and usability problems.
  • Ensures the software meets both functional and non-functional requirements.

Example: Testing a login feature by entering valid and invalid usernames and passwords to verify system behavior and response.

Static Testing vs Dynamic Testing

ParameterStatic TestingDynamic Testing
DefinitionTesting performed without executing the software code.Testing performed by executing the software application.
ObjectiveIdentify defects early and prevent errors.Identify defects during execution and validate functionality.
StagePerformed during requirements, design, and coding phases.Performed after code implementation when an executable build is available.
Code ExecutionNot required.Required.
FocusRequirements, design documents, and source code.Software behavior, functionality, and performance.
TechniquesReviews, walkthroughs, inspections, and code reviews.Functional testing, non-functional testing, Black Box Testing, White Box Testing, etc.
Defects FoundRequirement, design, documentation, and coding defects.Runtime, functional, performance, and integration defects.
Test BasisDocuments, specifications, and source code.Executable application and test cases.
CostLower cost because defects are found early.Generally higher cost because defects are identified later in the development cycle.
Time RequiredGenerally less time-consuming.Usually more time-consuming due to test execution.
Tools UsedReview tools, static code analysis tools.Test automation tools, performance testing tools, and defect tracking tools.
Process TypeVerification – "Are we building the product right?"Validation – "Are we building the right product?"
ExampleReviewing a requirement document or source code.Testing a login page by entering valid and invalid credentials.
Comment
Article Tags:

Explore