Well-Balanced Test-Driven Development

One day workshop
Jan Van Ryswyck

Well-Balanced Test-Driven Development

No dates are scheduled for this workshop. Let us know if you think we should organize it near you, or if you'd like to book it on premise in your organisation.


A simple practice like Test-Driven Development provides us with a lot techniques and patterns. How can we find a good balance in all these approaches?

The world of automated tests can be quite overwhelming. Tests exist in a wide variety of flavours, like unit tests, integration tests, API tests, database tests, acceptance tests, UI tests, performance tests, regression tests, smoke tests, etc. … All of these have their usefulness for the specific purpose that they are serving. However, they can all be broken down into two broad categories: Solitary and Sociable tests. These can be seen as the equivalent of tests that either run very fast, and tests that have a wider variety of slowness.

When zooming in further on Solitary Tests specifically, we find that there are generally two different types of verification: state verification and behaviour verification. How and, most importantly, when should we apply these types of verification? There’s a lot to learn about a seemingly simple practice as Test-Driven Development. In this workshop we’re going to discover why it’s important to find a balance in TDD and how to accomplish this.

Target audience

This workshop is for developers who already have experience writing automated tests and want to improve upon their existing skills in writing unit and integration tests. By the end of this workshop, participants will have gained the knowledge necessary to build loosely coupled, highly maintainable and robust tests that are trustworthy and improve the overall code quality of your software applications.

Agenda

Part 1 - The Automated Testing Landscape

  • Introduction
  • Solitary and Sociable Tests
  • The Test Pyramid
  • Exercise 1-1 - State and Behaviour Verification

Part 2 - The Anatomy of Automated Tests

  • Arrange, Act, Assert
  • DRY & DAMP
  • AAA Per Test Method
  • AAA Per Test Class
  • Naming tests
  • Exercise 1-2 - The Anatomy of Unit Tests

Part 3 - State Verification

  • Test Data Builder
  • Exercise 1-3 - Test Data Builder
  • Single Assert per Test
  • Procedural vs Object State Verification
  • Exercise 1-3 - State Verification

Part 4 - Behaviour Verification*

  • Indirect Inputs & Outputs
  • Test Doubles
  • Fixture Object
  • Exercise 1-4 - Fixture Objects

Testimonial

Jan is an excellent teacher with deep knowledge of the subject. The workshop was well-paced and progressively built up throughout the day. The pitfalls we encountered were 'shown, not told,' followed by solutions, which really helped me understand why things are done a certain way. I plan to explore the provided resources and incorporate this new knowledge into my day-to-day operations.

- Kristof, DevOps Engineer, Ellipsis Agency
Jan Van Ryswyck

About Jan Van Ryswyck

Jan is a professional software developer since Y2K. A blogger since Y2K+5. Author of Writing Maintainable Unit Tests. Provider of training and coaching in XP practices. Curator of the Awesome Talks list. He is thinking and learning about all kinds of technologies since forever.

Software development is one of his great passions in life. His goal as a software craftsman is to provide simple and qualitative solutions to complex business problems. In order to accomplish this, he's continuously deepening his existing skills and expertise while learning new skills and broadening his horizons. Sharing his knowledge and experiences with other people is another one of his lifetime goals.

All workshops by Jan Van Ryswyck
@JanVanRyswyck

No dates are scheduled for this workshop. Let us know if you think we should organize it near you, or if you'd like to book it on premise in your organisation.


Also check out