Code Driven Testing – A growing trend in software development is the use of testing frameworks such as the xUnit frameworks (for example, JUnit and NUnit) that allow the execution of unit tests to determine whether various sections of the code are acting as expected under various circumstances. Test cases describe tests that need to be run on the program to verify that the program runs as expected.
CTD is actualy a sub type of unit testing, that analyse the code with ability to verify that the code is stand on specific rules and standards.
Unit tests are written during the code writing process, in some cases it is even written before the actual code. Each company is deciding its own strategy, if by creating API testing or go through the TDD working methods.
The main drive for creating such tests is the acknowledgment that each defect has a cost in resources and time, and if found as soon as possible, its cost will be much much less.
Code driven testing is focus on testing the code, its functionality remains, performance, coverage (finding code that is not operatable anymore, zombys functions and objects), duplication and optimization results. It can be done only after a deep code design.
CDT combined with TDD is very common within Agile development process (or any other extreme development process).
Code Driven Testing is a working method to test the software public interfaces as functions, classes, modules and libraries, which will be tested with a variety of inputs.
X Unit, is a various code-driven testing framework that allow testing of different elements of s/w suxh as function, class, etc…
Code driven testing approach is best in finding earlier bugs in software component or module, unlike waterfall model which will be tested and the bugs are found at the end of the phase. This approach is best for agile testing practices called test driven development and the expected is verified by the module developer immediately when ever there is a change, hence the persisting of bugs to later stages of testing can be prevented and is less expensive to fix. In this approach all the lines of code (LOC) including satements and braches will be executed and tested at least once to uncover code errors.
Code driven testing is sub type of white box testing strategy.
Important Terms: Code Driven testing, Test Driven testing, xUnit, Agile testing, Unit testing, White-Box testing
Theme by Danetsoft and Danang Probo Sayekti