unit testing

Friday, June 25, 2021

`Huh?` to `Aha!`: A Refactoring Story
Gopal S Akshintala
Gopal S Akshintala
Salesforce, Senior Software Engineer

"Entropy is the price of a Structure". But sometimes, the price turns too high to pay. Is your codebase turning untestable, unreadable, and unmaintainable? Does your costs to add new features aren't meeting the ROIs. It's time to ask your manager to fund Refactoring!

In this demo-driven talk, using a real-world service, we shall identity some common reasons for a codebase to rot and how to weed them out using principles from Clean Architecture and Functional Programming, along with achieving 95% test coverage and ~50% reduction in Cognitive complexity (https://www.sonarsource.com/docs/CognitiveComplexity.pdf).

Audience & Take-aways

This applies to software developers at all levels. I use Java to demonstrate the code snippets, but this talk is about Software Design and Testing and is agnostic of programming language. The major take-aways for the audience are:

- Pragmatically apply the principles of Clean-Architecture and Functional programming in real-world refactoring. 

- How to completely eliminate Exceptions from your code using ADTs (Algebraic Data Types). 

- How to replace Shared Global mutable state on your Shared Code with Data Transformations. 

- How separating out What-to-do from How-to-do can bring in a lot of flexibility to your code-base.

- How following all of the above organically boost your Testability without falling into any anti-patterns of testing. 

Let's talk about Complexity and how to objectively measure the reduction we brought with our refactoring.

Saturday, June 26, 2021

Advanced Testing Patterns
Tom Cools
Tom Cools
Info Support nv, Software Developer

Unit Tests by themselves give no guarantee that your system will work in a production environment. That’s where your code will have to work together with other resources like databases and APIs. Unfortunately, those are the kind of dependencies we try to avoid in tests by using mocking-frameworks. Risky business, because this means we’ll only know if the application really works when you push it to production.

In this session, we’ll look at some strategies you can use to test your application without mocking your dependencies away. You’ll discover how tools like Liquibase, TestContainers, WireMock and Pact can immensely improve your tests so you can deploy your application to production AND sleep at night.