Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
JUnit
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Previous versions of JUnit== According to Martin Fowler, one of the early adopters of JUnit:<ref>{{Cite web |title=bliki: Xunit |url=https://martinfowler.com/bliki/Xunit.html |access-date=2022-03-07 |website=martinfowler.com}}</ref> {{Blockquote |text=JUnit was born on a flight from Zurich to the 1997 [[OOPSLA]] in Atlanta. Kent was flying with Erich Gamma, and what else were two geeks to do on a long flight but program? The first version of JUnit was built there, pair programmed, and done test first (a pleasing form of meta-circular geekery).}} As a side effect of its wide use, previous versions of JUnit remain popular, with JUnit 4 having over 100,000 usages by other software components on the [[Apache Maven|Maven]] Central repository.<ref name="Maven Central">{{cite web | url=https://mvnrepository.com/artifact/junit/junit/usages | title=JUnit | website=mvnrepository.com | access-date=29 October 2021}}</ref> In JUnit 4, the annotations for test execution callbacks were {{code|@BeforeClass}}, {{code|@Before}}, {{code|@After}}, and {{code|@AfterClass}}, as opposed to JUnit 5's {{code|@BeforeAll}}, {{code|@BeforeEach}}, {{code|@AfterEach}}, and {{code|@AfterAll}}.<ref name="JUnit 5 User Guide: Writing Tests"/>{{sfn|Gulati|Sharma|2017|loc=Chapter Β§2 Understanding CoreJunit 5|p=37-40}} In JUnit 3, test fixtures had to inherit from {{code|junit.framework.TestCase}}.<ref name="JUnitCookbook">{{cite web | url=http://junit.sourceforge.net/doc/cookbook/cookbook.htm | title=JUnit Cookbook | publisher=junit.sourceforge.net | author1=Kent Beck | author2=Erich Gamma | author-link1=Kent Beck | author-link2=Erich Gamma | access-date=2011-05-21 | archive-date=2020-06-15 | archive-url=https://web.archive.org/web/20200615030913/http://junit.sourceforge.net/doc/cookbook/cookbook.htm | url-status=dead }}</ref> Additionally, test methods had to be prefixed with 'test'.<ref name="Migrating from JUnit 3 to JUnit 4: Nothing But Good News">{{cite web | url=https://objectcomputing.com/resources/publications/sett/august-2007-migrating-from-junit-3-to-junit-4-nothing-but-good-news | title=Migrating from JUnit 3 to JUnit 4: Nothing But Good News | publisher=Object Computing, Inc. | author1=Charles A. Sharp | date=August 2007 | access-date=2021-02-04}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)