TDD

Test driven development (test first)

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
or not.
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.

Thank you,
Jitkasem

Agile software development model II.

This article is the continue version of the last article (Agile Software development model I)

The technique for development using Agile is as follow.
-Agile model driven development (AMDD)
-Code Refactor : is the method to redesign code that is to modify the code immediately and then
the design is also change.
-Pair Programming : Combine the two developers to work together for the same project.
These two developers work at the same location and
also use the same computer.Share the computer in the way that one
person implement the code and another person has a responsibility for
checking the correction of implemented code.
-Test Driven Development(TDD) : is the technique for writing the test-case and write the test
case before implement the code.

The format(pattern) of Agile.

Agile methodology has many patterns that can be used for developing the system such as Scrum, FDD,
XP (extreme programming), DSDM, RUP, etc…But the popular pattern in my opinion is XP (extreme programming) because XP is the pattern that emphasize on the satisfaction of the customer and XP can change the system easily when the customer change the requirement.

Addition aspect for Agile.
– When we have the old project that can be used for additional development.It mean that
we have the asset that can be used as the base system for develop the new project,
so if the new project arrive then we can send the old project to the customer before sending
the new one.
– In the first step of developing new project,we can also deliver the things such as the screen,
the prototype,infrastructure to our customer without the software (because we have not written
the software yet)
– We also can think about Agile as the modifier of the former software development process such as
– Use Agile for rearrange the importance of the project development activity ,
which activity should be done and which should not be done.
– Use Agile to control the former project and look at some part of former project.The part that
is important for use with the development of new project should be done ,
the unimportant part will be ignored.

Incoming search terms for the article: