Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test-execution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
- 8088:8088
steps:
- uses: actions/checkout@v4
- name: Set up JDK 24
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
java-version: 24
java-version: 25
distribution: temurin

- name: Cache Maven packages
Expand Down
33 changes: 30 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,48 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.7.0] - 04-01-2026

### Changed

- Adoption of Java 25
- Set `java.version` to 25
- Changed `actions/setup-java@v4` in `.github/workflows/test-execution.yml` to Java 25
- Renamed `MessageFormat` to `LocationUrlResolver` and updated usages
- Updated CPF generation to avoid deprecated DataFaker API
- Updated the following dependencies
- `maven-compiler-plugin.version -> 3.14.1`
- `maven-surefire-plugin.version -> 3.5.4`
- `restassured.version -> 6.0.0`
- `junit.jupiter.version -> 6.0.1`
- `assertj.version -> 3.27.6`
- `datafaker.version -> 2.5.3`
- `log4j.version -> 2.25.3`
- `slf4j.version -> 2.0.17`
- `allure.version -> 2.32.0`
- `allure-maven.version -> 2.17.0`
- `aspectj.version -> 1.9.25.1`
- `commons-codec.version -> 1.20.0`
- `jackson-databind.version -> 3.0.3`
- `rhino.version -> 1.9.0`
- Added `junit-platform-launcher` (test scope)
- Removed `allure-testng`

## [2.6.0] - 21-03-2024

### Changed

- Updated the following dependencies
- `maven-surefire-plugin -> 3.5.3`
- `maven-surefire-plugin -> 3.5.3`

## [2.5.0] - 21-03-2024

### Changed

- Adoption of Java 24
- Updated the following dependencies
- `restassured -> 5.5.1`
- `aspectj -> 1.9.23`
- `restassured -> 5.5.1`
- `aspectj -> 1.9.23`

## [2.4.4] - 17-12-2024

Expand Down
87 changes: 51 additions & 36 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,56 @@

<groupId>com.eliasogueira.credit</groupId>
<artifactId>restassured-complete-basic-example</artifactId>
<version>2.6.0</version>
<version>2.7.0</version>

<properties>
<java.version>24</java.version>
<java.version>25</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
<maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
<maven-compiler-plugin.version>3.14.1</maven-compiler-plugin.version>
<maven-surefire-plugin.version>3.5.4</maven-surefire-plugin.version>
<maven-failsafe-plugin.version>3.2.5</maven-failsafe-plugin.version>

<restassured.version>5.5.1</restassured.version>
<junit.jupiter.version>5.11.4</junit.jupiter.version>
<assertj.version>3.26.3</assertj.version>
<datafaker.version>2.4.2</datafaker.version>
<restassured.version>6.0.0</restassured.version>
<junit.jupiter.version>6.0.1</junit.jupiter.version>
<assertj.version>3.27.6</assertj.version>
<datafaker.version>2.5.3</datafaker.version>
<owner.version>1.0.12</owner.version>
<log4j.version>2.23.1</log4j.version>
<slf4j.version>2.0.13</slf4j.version>
<allure.version>2.29.1</allure.version>
<allure-maven.version>2.15.2</allure-maven.version>
<aspectj.version>1.9.23</aspectj.version>
<log4j.version>2.25.3</log4j.version>
<slf4j.version>2.0.17</slf4j.version>
<allure.version>2.32.0</allure.version>
<allure-maven.version>2.17.0</allure-maven.version>
<aspectj.version>1.9.25.1</aspectj.version>
<allure.cmd.download.url>
https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline
</allure.cmd.download.url>

<!-- override vulnerable dependencies -->
<commons-codec.version>1.20.0</commons-codec.version>
<jackson-databind.version>2.18.3</jackson-databind.version>
<rhino.version>1.9.0</rhino.version>
</properties>

<dependencies>
<!-- override vulnerable dependencies -->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${commons-codec.version}</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-databind.version}</version>
</dependency>

<dependency>
<groupId>org.mozilla</groupId>
<artifactId>rhino</artifactId>
<version>${rhino.version}</version>
</dependency>

<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
Expand All @@ -44,17 +65,23 @@
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>json-schema-validator</artifactId>
<version>${restassured.version}</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<exclusion>
<groupId>org.mozilla</groupId>
<artifactId>rhino</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand All @@ -63,6 +90,13 @@
<version>${junit.jupiter.version}</version>
</dependency>

<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
Expand Down Expand Up @@ -93,18 +127,6 @@
<version>${log4j.version}</version>
</dependency>

<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-testng</artifactId>
<version>${allure.version}</version>
<exclusions>
<exclusion>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-attachments</artifactId>
Expand All @@ -129,13 +151,6 @@
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
</dependency>

<!-- override vulnerable dependencies -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-databind.version}</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@

import static java.text.MessageFormat.format;

public class MessageFormat {
public class LocationUrlResolver {

private static final Logger log = LogManager.getLogger(MessageFormat.class);
private static final Logger log = LogManager.getLogger(LocationUrlResolver.class);

private MessageFormat() {}
private LocationUrlResolver() {}
/*
* This method was created to remove the post if is a test environment because the 443 port must be informed
* to make the requests, but should not be show in the URL
* to make the requests, but should not be shown in the URL
*/
public static String locationURLByEnvironment() {
String locationURL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private RestrictionDataFactory() {
}

public static String cpfWithoutRestriction() {
String cpf = String.valueOf(faker.number().randomNumber(11, false));
String cpf = faker.cpf().invalid();

log.info("CPF without restriction in use: {}", cpf);
return cpf;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import static org.hamcrest.CoreMatchers.startsWith;

import com.eliasnogueira.credit.commons.MessageFormat;
import com.eliasnogueira.credit.commons.LocationUrlResolver;
import com.eliasnogueira.credit.data.factory.SimulationDataFactory;
import io.restassured.builder.RequestSpecBuilder;
import io.restassured.builder.ResponseSpecBuilder;
Expand All @@ -51,7 +51,7 @@ public static RequestSpecification postValidSimulation() {
public static ResponseSpecification createdSimulation() {
return new ResponseSpecBuilder().
expectStatusCode(HttpStatus.SC_CREATED).
expectHeader("Location", startsWith(MessageFormat.locationURLByEnvironment())).
expectHeader("Location", startsWith(LocationUrlResolver.locationURLByEnvironment())).
build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
package com.eliasnogueira.credit.simulations;

import com.eliasnogueira.credit.BaseAPI;
import com.eliasnogueira.credit.commons.MessageFormat;
import com.eliasnogueira.credit.commons.LocationUrlResolver;
import com.eliasnogueira.credit.data.factory.SimulationDataFactory;
import com.eliasnogueira.credit.data.provider.SimulationDataProvider;
import com.eliasnogueira.credit.model.Simulation;
Expand Down Expand Up @@ -53,7 +53,7 @@
class SimulationsFunctionalTest extends BaseAPI {

/*
* not that, in order to assert the amount without problem, we must enable a configuration
* not that, to assert the amount without a problem, we must enable a configuration
* it's located at BaseAPI class
*/
@Test
Expand Down Expand Up @@ -145,7 +145,7 @@ void createNewSimulationSuccessfully() {
post("/simulations/").
then().
statusCode(SC_CREATED).
header("Location", containsString(MessageFormat.locationURLByEnvironment()));
header("Location", containsString(LocationUrlResolver.locationURLByEnvironment()));
}

@Tag(FUNCTIONAL)
Expand Down