Skip to content

Don't be mocked by your Mocks: Listening to your Tests

Photo of Ivan St. Ivanov
Hosted By
Ivan St. I.
Don't be mocked by your Mocks: Listening to your Tests

Details

This is a virtual Meetup occurring at 5PM UK time (GMT). Join the live broadcast on https://www.virtualjug.com

View the event in your timezone:

Take part in the live session discussion on our #live-session slack channel: https://bit.ly/337QHTE

The recording will be available immediately afterward.

Abstract:
Do you ❤️ Mocks? When you write your first unit tests, especially on older codebases, mocking foreign code is key to survival. But as you grow older in the craft, you start piling up hours and days wasted to refactor fragile tests or to fix bugs that those heavy mock-based tests didn't catch. And so you start looking at Mocks differently.
Let's go through the key factors to consider to strike the optimal balance between what needs to be mocked away and what code should be tested in integration. There's sometimes a fine line there, often interwoven with strong emotions:

"Why am I testing this?"
"Argh… these tests take too long"
"Can this ever really break?"
etc...

Among the points that we'll touch on:

  • Mocks vs Refactoring
  • Mocks vs Reliability
  • Fine vs Coarse Mocks
  • Reproducibility
  • Partial Mocks
  • Mocking Statics
  • Alternatives to Mocks

Speakers: Victor Rentea

Victor is a Java Champion and Independent Trainer with an impressive experience: thousands of developers in dozens of companies trained in dedicated company sessions. He is the founder of one of the largest developer communities in Romania, Bucharest Software Craftsmanship Community and a top international conference speaker.

To find more about him: victorrentea.ro

Photo of Virtual Java User Group group
Virtual Java User Group
See more events
LONDON, london
london · London