Highlights
Course Overview
At the end of this training course, students should be able to:
- Appreciate the benefits of a continuous and iterative approach to design and delivery
- Recognise the purpose and practice of refactoring in keeping a system supple and adaptable
- Know how to build up a set of unit tests in JUnit
- Understand the consequences of dependency management on testing and code quality
Course Details
1 . Agile Development Microprocess
- Traditional versus agile development processes
- Iterative and incremental development
- Informal and continuous design
- The role of refactoring
- Refactoring versus other code changes
- Extreme Programming
- Test-Driven Development
2 . Testing in Principle
- Traditional view and reality of testing
- Driving development through testing
- Testing early, often and automatically
- Testing versus debugging
- White-box versus black-box testing
- Functional versus operational testing
3 . Basic Unit Testing in Practice
- Test plans versus test code
- Use of Assert
- Testing at the interface
- Testing the simplest things first
- Testing incrementally
- Testing correctness of failure
4 . Overview of JUnit
- JUnit and the xUnit family
- Test cases, test suites and test runners
- Essential structure of the framework
- Assertion methods
- Testing correctness of exceptions
- Defining common fixture code
- JUnit pattern usage
- Extensions to JUnit
5 . Test-Writing Techniques
- Red, green, refactor
- None to one to many
- Faking it
- Telling the truth
- Isolated and short tests
- Refactor common fixture code
- Declare, prepare, assert
- Test by method, state or scenario
- Custom assertions
- Compile-time constraints
- Running all tests
6 . Common Refactorings
- Renaming variables, methods, classes and packages
- Restructuring class hierarchies by extracting interfaces, superclasses and subclasses
- Partitioning classes by extracting classes and methods
- Changing private representation
7 . Decoupling Techniques
- Unmanaged dependencies
- Test-driven decoupling
- Layering
- Reorganising packages
- Eliminating cyclic dependencies
- Mock objects
- Eliminating Singletons, statics and other globals
- Testing I/O
Who should attend
Feedback
4.8 out of 5 average
"Our tailored course provided a well rounded introduction and also covered some intermediate level topics that we needed to know. Clive gave us some best practice ideas and tips to take away. Fast paced but the instructor never lost any of the delegates"
Brian Leek, Data Analyst, May 2022
“JBI did a great job of customizing their syllabus to suit our business needs and also bringing our team up to speed on the current best practices. Our teams varied widely in terms of experience and the Instructor handled this particularly well - very impressive”
Brian F, Team Lead, RBS, Data Analysis Course, 20 April 2022