XUnit - Code Driven Testing What are xUnit tools? But, before answering this question lets define and understand the ‘code driven testing’ term
Code Driven Testing Code driven test automation is a key feature of Agile software development, where it is known as Test-driven development (TDD). Unit tests are written to define the functionality before the code is written. Only when all tests pass is the code considered complete. Proponents argue that it produces software that is both more reliable and less costly than code that is tested by manual exploration. It is considered more reliable because the code coverage is better, and because it is run constantly during development rather than once at the end of a waterfall development cycle. The developer discovers defects immediately upon making a change, when it is least expensive to fix. Finally, code refactoring is safer; transforming the code into a simpler form with less code duplication, but equivalent behavior, is much less likely to introduce new defects.
XUnit Family Various code-driven testing frameworks have come to be known collectively as xUnit. These frameworks allow testing of different elements (units) of software, such as functions and classes. The main advantage of xUnit frameworks is that they provide an automated solution with no need to write the same tests many times, and no need to remember what should be the result of each test. Such frameworks are based on a design by Kent Beck, originally implemented for Smalltalk as SUnit. Erich Gamma and Kent Beck ported SUnit to Java, creating JUnit. From there, the framework was also ported to other languages, e.g., CppUnit (for C++), NUnit (for .NET). They are all referred to as xUnit and are usually free, open source software. They are now available for many programming languages and development platforms. XUnit is the family name given to bunch of testing frameworks that have become widely known amongst software developers. The name is a derivation of JUnit the first of these to be widely known. The focus was on making it easy for programmers to define the tests using their regular Smalltalk environment, and then to run either a subset or a full set of tests quickly and run unit tests after every change to the system going through a rapid edit and test cycle in the Smalltalk IDE. All xUnit frameworks share the following basic component architecture, with some varied implementation details:
Some of the Available xUnit frameworks on site, are cppUnit 2 Nunit MbUnit PerlUnit PhpUnit xUnit.net (this list is updated frequently. For complete list check for ‘Unit Testing tools’
Theme by Danetsoft and Danang Probo Sayekti