Testing and TDD for Java Developers

Developer testing practices are a vital, yet often under-used art. Learning how to write more effective tests is an excellent way to write better designed, more maintainable and more reliable code. It also helps keep development focused on the real requirements, resulting in a higher quality product for the end user. This is a skill that every Java developer needs to master.

 

Delivered by John Smart of Wakaleo Consulting, author of the Java Power Tools book, this course is an intensive 3-day workshop with a stimulating mixture of teaching, live coding demonstrations, labs, and group programming exercises. You will learn about vital modern development best practices such as Test-Driven Development, Behaviour-Driven Development, and Automated Acceptance Tests, and how to apply them in your own projects. You will gain practical experience with the latest in open source testing tools, including JUnit 4.8, Mockito, Selenium 2/Web Driver, and JOLT-Award winner easyb. You will learn about the relationship between automated acceptance tests (ATDD) and Test-Driven Development (TDD). You will also learn how to refactor code to make it easier to maintain and to test, and how to use code coverage and code quality tools such as Cobertura to isolate poor quality or poorly-tested code. And plenty of time is reserved for hands-on labs, coding exercises and live coding demonstrations.

 

The course is very practical in nature and contains approximately 60% lab work. Each participant will receive a copy of the student notes and lab solutions, a certificate of completion, and a CD containing all the tools covered in the course.

Duration

3 Days

 

Course Objectives

Following the completion of this course, students will be able to:

 

    • Know how to write effective unit tests, and understand how to use unit testing practices to write more reliable code faster.
    • Understand the principles of, and know how to apply, Test-Driven Development and Behaviour-Driven Development.
    • Be able to write more concise and more expressive tests using Groovy
    • Be able to use easyb to write BDD-style tests.
    • Be able to write automated database and web interface tests.
    • Be able to write a domain-specific testing DSL and know how to write maintainable tests.
    • Be able to write unit tests for legacy applications.
    • Be able to use mocks and stubs, and libraries such as Mockito, to write faster and more reliable unit tests
    • Understand the concepts of BDD and ATDD.

 

 

Audience

  • Java developers of all levels
  • Software architects
  • Technical project managers

 

 

Course Syllabus

  • Introduction to Test-driven development and Behaviour-Driven Development
  • Getting started with TDD
  • Continous Testing in Eclispe with Infinitest
  • JUnit Kung Fu - Fixtures, Hamcrest asserts, Exception testing, Timeouts, Parameterized tests, Rule annotations
  • Using Mocks and Stubs for state-based and interaction-based testing with Mockito
  • Refactoring best practices
  • Using testing coverage metrics to improve your testing process
  • Testing Spring applications
  • Testing Servlet and Portlet-based applications
  • Testing a web interface with Selenium 2.0/WebDriver
  • Test-Driving Legacy Code
  • Writing more expressive unit tests in Groovy
  • Automating your Acceptance Tests
  • Behaviour-Drive Development (BDD)and Acceptance-Test Drive Development (ATDD) with easyb

 

Related Courses

Refer to Equinox's other software development training courses.


Prerequisites

All participants should have a reasonable understanding of Java development as well as a basic understanding of the Software Development Life Cycle.

 

 

View printable course description


Course NameDurationPriceDatesCourse Status
Testing and TDD for Java Developers3 Days$2,500Enquire

All course prices listed by Equinox are in New Zealand dollars and exclude GST.