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.
Essential Soft and Tech Skills for Advancing Beyond Senior Level
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.
class SimulationTest { | |
@Test | |
void basicCheck() { | |
Simulation simulation = Simulation.builder().name("Elias").cpf("123456").email("elias@elias.com") | |
.amount(new BigDecimal(1000)).installments(48).insurance(false).build(); | |
SoftAssertions.assertSoftly(softly -> { | |
softly.assertThat(simulation.getName()).isEqualTo("Elias"); | |
softly.assertThat(simulation.getCpf()).isNotEmpty(); |
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") |
Build robust API tests with RestAssured
This workshop will show you how to use a different approach from SpringTest or any other tool to build robust API tests in the integration later or intra-services.
Rest-Assured is a well-known Java DSL for testing REST services, giving software engineers a lot of freedom during the test automation process creation.
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 |