Test is easy when you know how to test! However, test is hard if you know the just the meaning of 'test'. There are lots of test techniques, mainly static and dynamic tests. However the static test techniques focus on the code with out running it, dynamic test techniques focus on the functions with running the code. Therefore the differences can be explained by the meaning of static and dynamic. In this post, I want to explain one of my experiences about the importance of static testing.
Static testing has the following sub-title as: review, inspection, walk-through, desk-checking, proof-reading. Every item can be done by different people with different method and different level of formality. While the inspection can be viewed by experienced person in very formal way leading by a moderator, walk-through can be performed by coder in order to give some information about the work. To get more information about static testing, you can read this post in Turkish.
The importance of static testing is that you can see the code and can be have idea what was going on inside of the box, but dynamic testing is focus on the outside of the box without seeing the code. So you can have an idea about the bottlenecks of the system. Where to test more and the most important one is that you can test the code where you can not test in dynamic testing. The following code is an example for the stuation:
In this example, by the line 3 we ignore the user who have only one coupon to cancel. This can be easily found by inspection or review, but by dynamic testing is not easy to find this bug. In your test account, if you have many coupons and you aren't given any info about this requirement or any information about this change, you can not find this. There is only one way to find this bug is that you must have a member which has only one coupon and using it for testing this scenario. This is very easy example to show the power of the static test technique.