Code: JAV950
Duration in days: 2
Download: Infosheet
€ 1199

Course Test Driven Development with JUnit

13-06 till 14-06-2019
08-08 till 09-08-2019
10-10 till 11-10-2019
12-12 till 13-12-2019
Your starting date

Audience Test Driven Development with JUnit Course

Course Test Driven Development with JUnit This course is intended for experienced Java developers who want to apply JUnit for Test Driven Development.

Prerequisites Course Test Driven Development with JUnit

Knowledge of and experience with programming in Java is required to join this course.

Realization Training Test Driven Development with JUnit

The theory is covered on the basis of presentation slides and is interspersed practical exercises. Demos are used to clarify the discussed concepts. The course material is in English.

Contents Course Test Driven Development with JUnit

The course Test Driven Development with JUnit will teach participants the principles of and reasoning behind Test Driven Development and the role of unit testing therein. After an overview of the different types of testing and their use, detailed attention is given to the workings of the JUnit library, the integration of this library in Eclipse and the use of assertions in Test Cases and Test Suites. Fixtures used for the formulation of pre- and postconditions of Test Cases are also discussed as is the automation of tests and the concept of continuous integration. Next the methodology of Test Driven Development (TDD) is discussed, the three rules of TDD and the steps in TDD are explained as are the benefits and limitations of TDD. The participants will exercise TDD by trying to solve so called code Kata’s, small programming problems, using TDD. After an overview of the importance of writing clean code, the use of stubs and mocks is treated. These stubs and mocks are used as replacement for code that is not ready yet in a testing environment and can be replaced by real code in a production environment. In this respect the Mockito library is used as an example of a mocking framework. Finally attention is paid to database unit testing using DBUnit and the testing of Web Applications using HTMLUnit.

Module 1 : Unit Testing

Module 2 : JUnit

Module 3 : Test Driven Development

What is Unit Testing?
Benefits of Unit Testing
Manual Testing
Automated Testing
Time to Test
Unit Test Example
Unit Testing Best Practises
Using Seams
Testing Frameworks
Other Types of Testing
Continuous Integration
Regression Testing
Usability Testing
Exploratory Testing
Acceptance Tests
Concurrency Bug
Concurrency Testing
What is JUnit?
JUnit Features
JUnit Integration
JUnit View in Eclipse
JUnit Test Code
JUnit Classes
JUnit Class Diagram
Test Cases
TestCase Class
TestResult Class
Assert Statements
Assert Class
Test Suites
Special Cases
Testing for Exceptions
What is Test Driven Development?
Traditional Testing versus TDD
Three Rules of TDD
Steps in TDD
Test Cycles
Benefits of TDD
Limitations of TDD
Testing versus Design
TDD Adaptation
Behavior Driven Development
Designing for Testing
Code Kata’s
Example Kata
Domain Model
Kata Test and Implementation

Module 4 : Clean Code

Module 5 : Stubs and Mocks

Module 6 : Database Unit Testing

What is Clean Code?
Clean Code Principles
Technical Debt
Meaningful Naming
Naming Guidelines
What to Avoid
Abstraction Level
Switch Statements
Function Arguments
Avoid Side Effects
Command Query Separation
Expressing in Code
Good Comments
Bad Comments
Code Smells
Using Test Doubles
What are Stubs?
Stub Usage
Method under Test
Stub HTTP Connection
Stubbing Web Server
Use Embedded Web Server
Stubbing Server Resources
Using Jetty Handlers
Mock Object
Simple Mock Example
Collaborating Objects
Mock Implementation
Test using Mock
Anti Patterns
Using Mockito
Unit Testing Data Access
Types of DB Unit Testing
Database Integration Unit Testing
DB Unit
Advantages of DBUnit
DB Unit Life Cycle
Core Components
IDataSet Implementations
Concrete Database Operations
Presetting Database Data
Extract Data From Database
DBUnit Fixture
Setup Tables and Dataset
Data Access Test Cases
Abstract Class Fixture

Module 7 : Web Application Testing

Testing Web Applications
What is HTMLUnit
HTMLUnit Features
Simple HTMLUnit Test
Imitating Browsers
HTML Form Test
Finding Specific Elements
Button Click Test

SpiralTrain BV

Gebouw "De Sijnsmeester"
Standerdmolen 8 – 1.11
3995 AA Houten

IP Computer Training Centrum
Diemerhof 32-36
1112 XN Diemen

020 7600027

Compu Act Opleidingen
Slinge 303
3085 ER Rotterdam

023 - 551 3409

Kleine Singel 33
3572 CG Utrecht

030 - 737 05 81

IP Computer Training Centrum
Leenderweg 292
5644 AE Eindhoven

040 - 256 65 20