Contact Us [email protected]

HOME > COURSE CATALOG > ORACLE > > MASTERING TEST-DRIVEN DEVELOPMENT USING JUNIT

Mastering Test-Driven Development using JUnit

DURATION 5 Days

COURSE EJCJ-520-CZ

AVAILABLE FORMATS Classroom Training, Online Training

Course Description

Overview This Mastering Test-Driven Development using JUnit course is designed to provide students with a five-day, comprehensive hands-on test-driven development / JUnit / TDD training course geared for developers who need to get up and running with essential Test-driven development programming skills, using JUnit and various open-source testing frameworks. Throughout the course students learn the best practices for writing great programs in Java, using test-driven development techniques. This comprehensive course also covers essential TDD topics and skills.

Students who attend Mastering Test-Driven Development using JUnit will leave the course armed with the skills they require to develop solid Java programs, using sound coding testing techniques and best coding practices. This course quickly introduces developers to the features of JUnit and educates them regarding JUnit’s strengths and weaknesses.

9/26/2021 1 of 6 9:22:18 PM The following JUnit-based testing frameworks are examined:

JUnit 4.x EasyMock PowerMock jWebUnit DBUnit

This course is one step in the following Learning Journey: 1. Java - Core

Objectives

Upon completion of the Mastering Test-Driven Development using JUnit course, students will be able to:

Test basic Java functionality Test web-functionality implemented in JEE Use mocks for needed resources Replace mocks and test database operations Integrate the layers of the application using Spring and testing as they progress Understand JUnit. Understand and use the JUnit Test Runner interface. Use JUnit to drive the implementation of Java code. Test applications using native IDE support. Use best practices and patterns for test development. Understand JUnit’s strengths and weaknesses Understand the role of debugging when done in conjunction with tests. Understand not only the fundamentals of the TDD using Java, but also its importance, uses, strengths and weaknesses. Understand how JUnit affects your perspective on development and increases your focus on a task. Learn good JUnit coding style. Create well structured JUnit programs. Compile and execute programs using JUnit, jWebUnit, and DBUnit using the IDE of your choice. How to extend testing with mock objects using EasyMock. Look at refactoring techniques available to make code as reusable/robust as possible.

9/26/2021 2 of 6 9:22:18 PM Discuss various testing techniques.

Audience

This is an intermediate-to-advanced level Java course, designed for developers who wish to get up and running on test-driven development immediately. Attendees should be familiar with Java and object-oriented technologies. Real world programming experience is a must.

Prerequisites

OO Java Development experience JEE for Web Application Development experience

Topics

SESSION: INTRODUCTING TEST-DRIVEN DEVELOPMENT (TDD)

TEST, code, refactor, repeat THE ROI of TDD RATIONALE ADVANTAGES TOOLS

LESSON: JUMPSTART: JUNIT 4.X

JUNIT overview HOW JUnit works LAUNCHING tests TEST suites JUNIT test fixture

LESSON: @TEST ANNOTATION

TEST execution cycle CHECKING for exceptions USING timeouts

LESSON: HAMCREST

ABOUT hamcrest THE hamcrest matcher framework

9/26/2021 3 of 6 9:22:18 PM HAMCREST matchers

LESSON: PARAMETERIZED TESTS

INJECTING the parameters SETTING the parameters TEST execution cycle OBSERVATIONS

LESSON: THEORIES

WRITING theory enabled tests DEFINING DataPoints DEFINING theories OBSERVATIONS

LESSON: JUNIT BEST PRACTICES

“GOOD” tests BAD smells WHITE-BOX JWebUnit JWebUnit/HttpUnit

LESSON: MOCKING OF COMPOMENTS

WHY we use test dummies MOCK objects WORKING with mock objects USING mocks with the user interface MOCK object strategies

LESSON: POWERMOCK

EASYMOCK description and features EASYMOCK object lifecycle CREATE/expect phase REPLAY/verify phase MOCKING complex objects EASYMOCK howto

LESSON: STATE-BASED VS. INTERACTION-BASED TESTING

9/26/2021 4 of 6 9:22:18 PM STATE-based vs. INTERACTION-based testing STATE-based testing INTERACTION-based testing PROS and cons of each

LESSON: IMPROVING CODE QUALITY THROUGH REFACTORING

REFACTORING overview REFACTORING and testing REFACTORING to design patterns NAME conventions

LESSON: DATABASE TESTING

DATABASE testing: dbunit ISSUES related to database testing PERSISTENCE mechanisms DBUNIT

APPENDIX: ADDING TESTING TO THE BUILD PROCESS

JUNIT and Ant THE Ant Junit tag RUNNING Junit tests from Ant GENERATING a JUnitReport

Related Courses

Unit Testing Essentials using JUnit5 and TT3526-CZ 3 Days Classroom Training, Online Training Price: 38,780.00 CZK

Behavior and Test Driven Development using Junit EJCJ-540-CZ

9/26/2021 5 of 6 9:22:18 PM 3 Days Classroom Training Price: 38,780.00 CZK

9/26/2021 6 of 6 9:22:18 PM