Test driven development
Test Driven Development is one of test method that specializes in the test repetition.
The reason for doing this is to test codes repeatedly with hopes of making a given software better and more effective.
The Test-Driven Design has several steps that must be followed before the test is successfully completed.
The first step requires writing a test (so it’s also called test first). There has to be a sample diagram or flowchart before any other actions can be taken.
However, when written test finish , it’s not mean to success the TDD process because it is written before the physical test (real test) is performed.
The person writing the test must know precise specification of the features being created as well as everything required for creating test suite.
In most cases the writer obtains the information about the feature required to create the test by using use cases or user stories of the software that will be run the test on.
After gather all useful information then source code is written. Next, every test must be ran to written code to determine that the written code is fail in the test suite
At this point, it should pass and if all the tests pass then it’s time to proceed to the final step. The final step is all about cleaning up the code.
This is done by re-running the test cases in search for defects and so on . There has to be certainty that there is no damage being found to any other software functionality
as a result of the new software can be released.
Advantages of test first
1. When you continue to do the test first then you will get a lot of test cases. After that when you want to restructure the system, you can do it easily
and don’t have to fear about the bugs that may happen because when you finish restructure the system , your new system may not pass some written
test cases, so at this point you can retrace to modify the written test cases and then try to validate the new system to pass to modified test cases.
(If you don’t have test cases , after complete restructure your system for 2 or 3 months , the unknown bugs may occur because the restructured system
was not tested. At this time you have to fix bugs but it’s so difficult to fix them due to you may forget about wherever in the function or files that you used
to modified source code. In my opinion, if your system is very complex , your certainly have to write intensive test cases )
2.With test first you have to write test documents before write the code , this way will help the programmer or developer to plan before they begin to write
code (they have to write the code to pass the test documents). As a result your entire code will look better and you will get the software that have a good
structure. It also help you to reduce runtime error or unexpected bugs (so cost to fix the bugs is also reduced too).
Test first is differ from unit test as follow
1. Test first is done before writing source code but Unit test is done after finish writing the code.
2. In test first , you don’t need to look at source code to write the tests but in unit test , you must use the written code to do unit test.
3. Unit test help you to ensure that your written function or piece of code is work or not but test first help you to ensure that
entire code in the project work well or not.
There are no commercial software released to the market without testing.
Testing is an important process in software development.The big or
well-known software company place importance on software testing equal to
At present there are many type of software testing method but I summarize the
widely used testing method as following…
Unit test is the testing functional
(Or testing in detail of each function in the system) to ensure
that each individual function in the system can work well.
Unit testing is very important in software development because
it is the method for finding the functional problems (It can decrease
the time in finding bugs in the posterior process).
Integration test is the testing that take each unit to
combine altogether and then test the coherence between each unit to
ensure that the communication between each unit in the system can
be done correctly.
System test is the testing of the whole system to ensure that
the totally work-flow of the system is correct.It is also
an important test that have to do in software development process
(Normally system test is done as the last test of all
Acceptance test is the testing of customer or user who will
use the developed software.It is the test for satisfaction of the
user or customer.This testing is done after System test.
The important testing that you must emphasize on them are
Unit testing and Integration testing because many defect or bugs
can be found by these two testing method.
Testing is not necessary to be done by tester but developer
can also do the testing.Normally the Unit testing is done by
developer because the majority of this testing use the test case
that depend on the implementation, so nobody can do this testing
better than developer.However the real tester have a responsibility
for doing the Integration test and System test because…
– These two kinds of testing must do in long time.
– To prevent the bias if the developer is also the tester at the
same time.(The developer who write the code maybe
rather sure that the code they wrote is correct and will
ignore some minor part of code that have to test)
– The real tester has more time to design the test document
and test case. He/She must know clearly in the target system
that will be tested,so He/She can do the testing better than
This is part I of software testing story.In the next part (part II)
I will write about black box and white box testing,test first method and
how to design the test plan.
Thank you very much,