Dynamic Testing is a software testing method used to test the dynamic behaviour of software code. The main purpose of dynamic testing is to test software behaviour with dynamic variables or variables which are not constant and finding weak areas in software runtime environment. The code must be executed in order to test the dynamic behavior.
We all know that Testing is verification and validation, and it takes 2 Vs to make testing complete. Out of the 2 Vs, Verification is called a Static testing and the other “V”, Validation is known as Dynamic testing.
Dynamic Testing Example
Let’s understand How to do Dynamic Testing with an example:
Suppose we are testing a Login Page where we have two fields say “Username” and “Password” and the Username is restricted to Alphanumeric.
When the user enters Username as “Guru99”, the system accepts the same. Where as when the user enters as Guru99@123 then the application throws an error message. This result shows that the code is acting dynamically based on the user input.
Dynamic testing is when you are working with the actual system by providing an input and comparing the actual behavior of the application to the expected behavior. In other words, working with the system with the intent of finding errors.
So based on the above statements we can say or conclude that dynamic testing is a process of validating software applications as an end user under different environments to build the right software.
What does dynamic testing do?
The main aim of the Dynamic tests is to ensure that software works properly during and after the installation of the software ensuring a stable application without any major flaws( this statement is made because no software is error free, testing only can show presence of defects and not absence)
The main purpose of the dynamic test is to ensure consistency to the software; lets discuss this with an example.
In a Banking Application, we find different screens like My Accounts Section, Funds Transfer, Bill Pay, etc.. All these screens contain amount field which accepts some characters.
Let’s say My Accounts field displays amount as 25,000 and Funds Transfer as $25,000 and Bill pay screen as $25000 though the amount is the same, the way amount is displayed is not the same hence making the software nonconsistent.
Consistency is not only limited to the functionality it also refers to different standards like performance, usability, compatibity etc, hence it becomes very important to perform Dynamic Testing.
Types of Dynamic Testing
Dynamic Testing is classified into two categories
- White Box Testing
- Black Box Testing
The below pictorial representation gives us an idea about types of Dynamic Testing, Levels of Testing, etc.
Let us discuss briefly each type of testing and it’s intended purpose
White Box Testing – White Box Testing is a software testing method in which the internal structure/ design is known to the tester. The main aim of White Box testing is to check on how System is performing based on the code. It is mainly performed by the Developers or White Box Testers who has knowledge on the programming.
Black Box Testing – Black Box Testing is a method of testing in which the internal structure/ code/design is NOT known to the tester. The main aim of this testing to verify the functionality of the system under test and this type of testing requires to execute the complete test suite and is mainly performed by the Testers, and there is no need of any programming knowledge.
The Black Box Testing is again classified into two types.
- Functional Testing
- Non-Functional Testing
Functional testing is performed to verify that all the features developed are according to the functional specifications, and it is performed by executing the functional test cases written by the QA team, in functional testing phase, system is tested by providing input, verifying the output and comparing the actual results with the expected results.
There are different Levels of Functional Testing out of which the most important are
- Unit Testing – Generally Unit is a small piece of code which is testable, Unit Testing is performed at individual unit of software and is performed by developers
- Integration Testing – Integration Testing is the testing which is performed after Unit Testing and is performed by combining all the individual units which are testable and is performed either by developers or testers
- System Testing – System Testing is a performed to ensure whether the system performs as per the requirements and is generally performed when the complete system is ready, it is performed by testers when the Build or code is released to QA team
- Acceptance Testing – Acceptance testing is performed to verify whether the system has met the business requirements and is ready to use or ready for deployment and is generally performed by the end users.
Non- Functional Testing: Non-Functional testing is a testing technique which does not focus on functional aspects and mainly concentrates on the nonfunctional attributes of the system such as memory leaks, performance or robustness of the system. Non-Functional testing is performed at all test levels.
There are many Non-Functional Testing Techniques out of which the most important are
- Performance Testing – Performance Testing is performed to check whether the response time of the system is normal as per the requirements under the desired network load.
- Recovery Testing – Recovery testing is a method to verify on how well a system is able to recover from crashes and hardware failures.
- Compatibility Testing – Compatibility testing is performed to verify how the system behaves across different environments.
- Security testing – Security testing is performed to verify the robustness of the application, i.e to ensure that only the authorizes users/roles are accessing the system
- Usability testing – Usability testing is a method to verify the usability of the system by the end users to verify on how comfortable the users are with the system.
Dynamic Testing Techniques
Dynamic Testing Techniques in STLC consists of different tasks like Requirements Analysis for the tests, Test Planning, Test case design and implementation, Test environment setup, Test case execution, Bug reporting and finally Test closure. All the tasks in dynamic testing techniques are dependent on the completion of the previous task in the testing process.
In STLC, we can say that actual Dynamic Testing Process starts from Test Case Design, let’s discuss each activity in details.
Before getting into the process lets discuss the strategy that needs to be followed for Dynamic Testing.
Test Strategy should mainly focus on the resources available and the timeframe. Based on these factors, the objective of the testing, the scope of testing, phases or cycles of testing, type of environment, assumptions or challenges that might be faced, risks, etc. has to be documented.
Once the strategy is defined and is accepted by the management then the actual process test case design starts
What is Test design and Implementation
In this phase we identify the,
- Features to be tested
- Derive the Test Conditions
- Derive the coverage Items
- Derive the Test Cases
Test Environment Setup
We have to ensure that Testing Environment should always be similar to the Production environment, in this phase we have to install the build and manage the test machines.
During this phase, test cases are actually executed.
Bug report captured
Based on the Execution if the Expected and Actual Results are not same then the Test case has to be marked as Fail and a Bug should be logged.
Advantages of Dynamic Testing
- Dynamic Testing can reveal the uncovered defects that are considered to be too difficult or complicated and which cannot be covered through static Analysis
- In Dynamic Testing, we execute the software, end to end, ensuring error free software which in turn increases the quality of a product and project.
- Dynamic Testing becomes an essential Tool for detecting any security Threats
Disadvantages of Dynamic Testing
- Dynamic Testing is Time Consuming because it executes the application/software or code which requires huge amount of Resources
- Dynamic Testing increases the cost of project/product because it does not start early in the software lifecycle and hence any issues fixed in later stages can result in an increase of cost.
In Software Engineering, Verification and Validation are two measures used to check that the software product meets the requirements specifications. Static testing involves verification whereas dynamic testing involves validation. Together they help to deliver a cost effective Quality Software.