Skip to content

Instantly share code, notes, and snippets.

View eliasnogueira's full-sized avatar
🇧🇷

Elias Nogueira eliasnogueira

🇧🇷
View GitHub Profile
@eliasnogueira
eliasnogueira / behind-unit-test.md
Created July 18, 2025 14:42
Beyond Unit Tests: Practical Tools for High-Quality Java Code

Beyond Unit Tests: Practical Tools for High-Quality Java Code

Description

Embarking on a Java project involves employing the best strategies, patterns, and architectural decisions, all geared towards a customer-centric approach.

Yet, there exists an often overlooked facet: quality assurance. While not entirely disregarded, we, as developers, sometimes limit ourselves to performing the basic unit and integration tests, which may leave room for bugs.

Fortunately, several straightforward approaches and tools can be implemented to deliver a bug-free project with minimal effort.

Test Smarter, Not Harder: Achieving Confidence in Complex Distributed Systems

Description

The presentation starts by addressing common testing pitfalls in distributed systems, like using in-memory databases, brittle mocks, and flaky async tests. It introduces a real-world fintech architecture with microservices, multiple databases, external APIs, and asynchronous workflows. The core strategy covers five areas: using real dependencies, avoiding in-memory DBs, virtualizing external systems, testing async flows properly, and establishing strong API governance. Through code examples and practical tips, the session shows how to build fast, reliable, and realistic test pipelines that boost confidence in complex systems.

Takeaways

  • Supporting multiple databases to speed up the CI process
  • Mock dependencies globally using the Service Virtualization approach
@eliasnogueira
eliasnogueira / datafaker-talk.md
Last active December 22, 2023 08:24
DataFaker: the most powerful fake data generator library

Title

Datafaker: the most powerful fake data generator library

Description

Data generators in software testing play a critical role in creating realistic and diverse datasets for testing scenarios. However, they present challenges, such as ensuring data diversity, maintaining quality, facilitating validation, and ensuring long-term maintainability.

While many engineers are familiar with these challenges, they often resort to non-specialized tools like the RandomStringUtils class from Apache Commons or the Random class, concatenating fixed data with it. This approach lacks scalability and may not yield a valid dataset.

@eliasnogueira
eliasnogueira / beyond-senior-level.md
Last active December 15, 2023 14:09
Essential Soft and Tech Skills for Advancing Beyond Senior Level

Title

Essential Soft and Tech Skills for Advancing Beyond Senior Level

Abstract

In today's dynamic professional landscape, the journey beyond the senior level requires a mix of soft and technical skills. This talk explores the key competencies essential for your career progression, offering insights into the dynamic interaction between interpersonal and technological expertise to help you excel and thrive beyond the senior level.

Description

@eliasnogueira
eliasnogueira / SimulationTest.java
Last active December 3, 2023 17:43
Example of a test validating the constants of Simulation
class SimulationTest {
@Test
void basicCheck() {
Simulation simulation = Simulation.builder().name("Elias").cpf("123456").email("[email protected]")
.amount(new BigDecimal(1000)).installments(48).insurance(false).build();
SoftAssertions.assertSoftly(softly -> {
softly.assertThat(simulation.getName()).isEqualTo("Elias");
softly.assertThat(simulation.getCpf()).isNotEmpty();
@eliasnogueira
eliasnogueira / Simulation.java
Created December 3, 2023 16:38
Code snippet of the Simulation entity
public class Simulation {
@NotNull(message = "Amount cannot be empty")
@Min(value = 1000, message = "Amount must be equal or greater than $ 1.000")
@Max(value = 40000, message = "Amount must be equal or less than than $ 40.000")
private BigDecimal amount;
@NotNull(message = "Installments cannot be empty")
@Min(value = 2, message = "Installments must be equal or greater than 2")
@Max(value = 48, message = "Installments must be equal or less than 48")
@eliasnogueira
eliasnogueira / enhancing_project_test.md
Last active December 22, 2023 07:22
Enhancing Project Integrity: A Test Modernization for Bug-Free Code

Title

Enhancing Project Integrity: A Test Modernization for Bug-Free Code

Description

Embarking on a Java project involves employing the best strategies, patterns, and architectural decisions, all geared towards a customer-centric.

Yet, there exists an often overlooked facet: quality assurance. While not entirely disregarded, we, as developers, sometimes limit ourselves to performing the basic unity and integration tests, which may leave room for bugs.

Fortunately, several straightforward approaches and tools can be implemented to deliver a bug-free project with minimal effort.

@eliasnogueira
eliasnogueira / docker-compose.yml
Last active October 23, 2023 09:37
Example of Wiremock docker usage mapping the internal files to the container
version: '3.9'
services:
wiremock:
image: "wiremock/wiremock:latest"
container_name: wiremock-credit-restriction-api
ports:
- "8087:8080"
volumes:
# copy the local Wiremock files (__files and mappings folder) into the container

Enhancing Project Integrity: A Modernization for Bug-Free Code

Description

Embarking on a Java project involves employing the best strategies, patterns, and architectural decisions, all geared towards a customer-centric.

Yet, there exists an often overlooked facet: quality assurance. While not entirely disregarded, we, as developers, sometimes limit ourselves to performing the basic unity and integration tests, which may leave room for bugs.

Fortunately, there are several straightforward approaches and tools that can be implemented to deliver a bug-free project with minimal effort.

class MethodSourceCase3ExampleTest {
@DisplayName("Unpronounceable entity tests")
@ParameterizedTest(name = "The Simulation {0} shows the error {1}")
@MethodSource("expensiveProducts")
void edgeCases(Simulation simulation, String errorMessage) {
Response response = postSimulation(simulation);
assertThat(response.statusCode).isEqualTo(422);
assertThat(response.body().errorMessage()).isEqualsTo(errorMessage);