Junit - JUnit A tool for test-driven development History...

Info icon This preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
JUnit A tool for test-driven development
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
History Kent Beck developed the first xUnit automated test tool for Smalltalk in mid-90’s Beck and Gamma (of design patterns Gang of Four) developed JUnit on a flight from Zurich to Washington, D.C. Martin Fowler: “Never in the field of software development was so much owed by so many to so few lines of code.” Junit has become the standard tool for Test-Driven Development in Java (see Junit.org) Junit test generators now part of many Java IDEs (Eclipse, BlueJ, Jbuilder, DrJava) Xunit tools have since been developed for many other languages (Perl, C++, Python, Visual Basic, C#, …)
Image of page 2
Why create a test suite? Obviously you have to test your code—right? You can do ad hoc testing (running whatever tests occur to you at the moment), or You can build a test suite (a thorough set of tests that can be run at any time) Disadvantages of a test suite It’s a lot of extra programming True, but use of a good test framework can help quite a bit You don’t have time to do all that extra work False! Experiments repeatedly show that test suites reduce debugging time more than the amount spent building the test suite Advantages of a test suite Reduces total number of bugs in delivered code Makes code much more maintainable and refactorable
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Architectural overview JUnit test framework is a package of classes that lets you write tests for each method, then easily run those tests
Image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern