Dynamic Testing
Dynamic Testing involves testing by the execution of code. It identifies failures due to the defects present in the code. It involves both functional and non-functional testing of the software.
Dynamic Testing vs Static Testing
Static testing involves testing without the actual execution of the code. It includes manual checking of the work products (business requirement specifications (BRS), technical requirement specifications (TRS), user requirements, program code, test plans, etc.). Reviews are done under static testing procedures and help detect defects earlier in the software development life cycle (SDLC). Defects are fixed during reviews and on paper as they will cost more in terms of time, effort and money later.
In contrast to static testing, dynamic testing is all about finding and fixing the defects by executing the code. It focuses mainly on the externally visible behavior of the program. For example, consider the development of a bank application. It requires the user to have a password that should not have a "Space" character in it. The expected results for the tester would be to accept the password that does not have space in it or give warning to the user by stating that the password must not have space in it if it contains the space character. This can be tested by having the test data that includes all these possibilities of acceptance and failures and test each scenario. And then report the real result.
Types of Dynamic Testing
Dynamic testing has two types:
- White-box testing
- Black-box testing
White box testing is mainly about data flow, its structure, and its implementation. For white-box testing, the tester must know the code. The metric to measure this technique is coverage of the particular type of white-box technique the tester is testing, for example, code coverage. This is mainly done by the developers.
Black-box testing is about testing the functionality of the program and how well it is performing the required job i.e non-functionalities. Test cases are derived based on the requirements and the program is executed subsequently. The expected and actual results are reported. The difference will be reported to the managers also. This type of testing is done by the testers who have no or little knowledge of the code.
Dynamic Testing Techniques
- Unit / Component testing: focuses on the units of the program that can be tested separately
- Integration testing: focuses on the interaction of systems (system integration testing) or components (component integration testing)
- System testing: focuses on the end-to-end tasks of the system. How is the system behaving as a whole? Is it complying with the requirements?
- Acceptance testing: also focuses on the system as a whole product as in system testing. It is used to assess if the system is ready to be deployed in the market or use by the user.
Dynamic Test Process/Cycle
General practice is to follow these steps to execute dynamic testing
- Design and implement test cases, test data, etc.
- Check if the environment for the testing is available or not
- Execute/run the program and compare the actual and desired results
- Report the successful and defected test cases as a defect/bug report
Advantages of Dynamic Testing
- Execution of system, end-to-end, checks the readiness of the system and helps in increasing the quality of the product
- It discloses defects that are difficult to detect statically (security threats, performance issues)
- Can be automated and managed by tools
Disadvantages of Dynamic Testing
- Time-consuming
- Expensive
- Can only be done later in product life-cycle once the code is completed
Conclusion
Although it is done later in the life cycle, still its importance cannot be undermined. Dynamic testing involves the validation of the system and its requirements. These days, testers are using several tools that help them in the rapid execution of dynamic test cases and their reporting. Dynamic testing along with static testing makes the system efficient and improves the quality of the product.
Nice. Keep up the good job 👍
well explained