| JUnit | |
|---|---|
| Developed by | Kent Beck, Erich Gamma, David Saff |
| Latest release | 4. A software developer is a person or organization concerned with facets of the software development process wider than design and coding a somewhat broader scope of Kent Beck is the creator of Extreme Programming Beck has pioneered software design patterns, the rediscovery of Test-driven development, as well as Erich Gamma (born 1961 in Zürich) is a co-author of the influential Computer science textbook Design Patterns. A software release is the distribution whether public or private of an initial or new and upgraded version of a Computer software product 4 / July 18, 2007 |
| Written in | Java |
| OS | Cross-platform |
| Genre | Unit testing tool |
| License | Common Public License |
| Website | http://junit.org |
JUnit is a unit testing framework for the Java programming language. Events 390 BC - Roman - Gaulish Wars Battle of the Allia - a Roman army is defeated by raiding Gauls, Year 2007 ( MMVII) was a Common year starting on Monday of the Gregorian calendar in the 21st century. A programming language is an Artificial language that can be used to write programs which control the behavior of a machine particularly a Computer. An operating system (commonly abbreviated OS and O/S) is the software component of a Computer system that is responsible for the management and coordination In computing cross-platform (also known as multi-platform) is a term used to refer to Computer software or computing methods and concepts that are implemented Computer software can be organized into categories based on common function type or field of use In Computer programming, unit testing is a method of testing that verifies the individual units of Source code are working properly A software license (or software licence in commonwealth usage is a Legal instrument governing the usage or redistribution of copyright protected software The CPL (Common Public License is a Free software / Open-source software license published by IBM. A website (alternatively web site or Web site, a back-construction from the Proper noun World Wide Web) is a collection of Web pages In Computer programming, unit testing is a method of testing that verifies the individual units of Source code are working properly A software framework, in Computer programming, is an abstraction in which common code providing generic functionality can be selectively overridden or specialized by user Created by Kent Beck and Erich Gamma, JUnit is one of the xUnit family of frameworks that originated with Kent Beck's SUnit. Kent Beck is the creator of Extreme Programming Beck has pioneered software design patterns, the rediscovery of Test-driven development, as well as Erich Gamma (born 1961 in Zürich) is a co-author of the influential Computer science textbook Design Patterns. Various code-driven testing frameworks have come to be known collectively as XUnit. SUnit is a Unit testing framework for Smalltalk. It is the original source of the XUnit design JUnit has spawned its own ecosystem of JUnit extensions.
Experience gained with JUnit has been important in the development of test-driven development, and as a result, some knowledge of JUnit is often presumed in discussions of test-driven development, for example in the book Test-Driven Development: By Example, ISBN 0-321-14653-0 by Kent Beck. Test-Driven Development (TDD is a Software development technique consisting of short iterations where new Test cases covering the desired improvement or
JUnit has been ported to other languages, including PHP (PHPUnit), C# (NUnit), Python (PyUnit), Fortran (fUnit), Perl (Test::Class and Test::Unit) and C++ (CPPUnit). PHP is a computer Scripting language. Originally designed for producing Dynamic web pages it has evolved to include a Command line interface capability PHPUnit is a unit testing framework for the PHP programming language. C# (pronounced C Sharp is a Multi-paradigm NUnit is an Open source Unit testing framework for Microsoft. Python is a general-purpose High-level programming language. Its design philosophy emphasizes programmer productivity and code readability PyUnit is the standard unit testing framework module for Python, described as a Python version of JUnit. Fortran (previously FORTRAN) is a general-purpose, procedural, imperative Programming language that is especially suited to fUnit is a unit testing framework for Fortran, in the flavor of other XUnit testing frameworks NOTES FOR EDITORS "Perl" is not an acronym (read the "Name" section below C++ (" C Plus Plus " ˌsiːˌplʌsˈplʌs is a general-purpose Programming language. CppUnit is a unit testing framework module for C++, described as a C++ port of JUnit. This family of unit testing frameworks is referred to collectively as xUnit. Various code-driven testing frameworks have come to be known collectively as XUnit. TestNG has many of the same goals as JUnit. TestNG is a testing framework created by Cedric Beust for the Java programming language inspired by JUnit and NUnit but introducing some new
And more recently, owing to the development of rich client frameworks such as AJAX, a port of JUnit has been developed for JavaScript (JSUnit) http://www.jsunit.net/.
"Hello world" example in JUnit 3. 8 and earlier:
public class HelloWorld extends TestCase { public void testMultiplication() { // Testing if 3*2=6: assertEquals ("Multiplication", 6, 3*2); } }
(compare with the similar example for Mauve. Mauve is a project to provide a Free software test suite for the Java class libraries )
The method testMultiplication will be discovered automatically by reflection. In Computer science, reflection is the process by which a Computer program can observe and modify its own structure and behavior
"Hello world" example in JUnit 4. 0:
public class HelloWorld { @Test public void testMultiplication() { // Testing if 3*2=6: TestCase. assertEquals ("Multiplication", 6, 3*2); } }
The method testMultiplication will be discovered automatically by its Test Annotation (a feature of Java 5). An annotation, in the Java computer programming language, is a special form of syntactic Metadata that can be added to Java source code