🟢 abstract ready | 🔵 no abstract | 🟡 need improvement
| public class ReadProperties { | |
| private static final Logger LOG = LoggerFactory.getLogger(ReadProperties.class); | |
| private static ReadProperties instance = null; | |
| private Properties properties = null; | |
| private ReadProperties() { | |
| properties = new Properties(); | |
| try { |
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.
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.
- Supporting multiple databases to speed up the CI process
- Mock dependencies globally using the Service Virtualization approach
| <properties> | |
| <junit.version>4.12</junit.version> | |
| <junit.params.version>1.1.1</junit.params.version> | |
| </properties> | |
| <dependencies> | |
| <dependency> | |
| <groupId>junit</groupId> | |
| <artifactId>junit</artifactId> | |
| <version>${junit.version}</version> |
| Project | Link | |
|---|---|---|
![]() |
simulations-client | https://github.com/eliasnogueira/simulations-client |
![]() |
simulations-test | https://github.com/eliasnogueira/simulations-test |
![]() |
restrictions-client | https://github.com/eliasnogueira/restrictions-test |
![]() |
restrictions-test | https://github.com/eliasnogueira/restrictions-client |
![]() |
test-parent | https://github.com/eliasnogueira/test-parent |
![]() |
test-commons | https://github.com/eliasnogueira/test-commons |
![]() |
api project | https://github.com/eliasnogueira/credit-api |
| public class Loan { | |
| // private attributes | |
| private String name; | |
| private String email; | |
| private BigDecimal amount; | |
| private int installments; | |
| // constructor | |
| public LoanData(String name, String email, BigDecimal amount, int installments) { |
Datafaker: the most powerful fake data generator library
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.
Enhancing Project Integrity: A Test Modernization for Bug-Free Code
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.
