Shiva-Athene Technologies Pvt Ltd

including PHP(PHP Unit). Released under IBM¶s CPL. C++(CPPUnit) and JavaScript(JSUnit). Junit has been ported to other langauge. 2 . Pythan(PyUnit). C#(Nunit). Written by Erich Gamma and Kent Beck. Fortran(fUnit).JUNIT ‡ ‡ ‡ ‡ Junit is an open source framework. ‡ Eclipse supports creating test cases. ‡ Junit is used to write and run repeatable automated tests.

3 . ‡ Run any time when you make any changes in your code.Advantages of Junit ‡ Junit helps us to code and test during the development. ‡ Junit testing framework is beneficial and it forces you to explicitly declare the expected results.

Advantages of Junit y y Junit provides graphical user interface application to execute all the test scripts quickly and easily. Junit tests increase the stability of software 4 .

Disadvantage of Junit ‡ Junit can¶t directly test the private methods. ‡ Test method must not have any parameter. 5 .

actual) assertTrue(boolean test) assertFalse(boolean test) assertSame(Object expected.Junit Methods y y y y y y y y assertEquals(expected. Object actual) assertNotSame(Object expected. Object actual) assertNull(Object object) assertNotNull(Object object) fail() 6 .

Junit used in Eclipse with example 7 .

Junit used in Eclipse with example 8 .

Junit used in Eclipse with example 9 .

Junit Run in command Line 10 .

junit.Help ‡ www.net/projects/junit/files/junit 11 .org ‡ http://sourceforge.

Thank You 12 .

Sign up to vote on this title
UsefulNot useful