https://github.com/josdem/juice-restclient
This is a library that shows how to test a third-party service using restclient
https://github.com/josdem/juice-restclient
gradle java junit5 restclient spring-boot
Last synced: about 2 months ago
JSON representation
This is a library that shows how to test a third-party service using restclient
- Host: GitHub
- URL: https://github.com/josdem/juice-restclient
- Owner: josdem
- Created: 2024-02-13T16:44:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-16T18:01:30.000Z (about 2 years ago)
- Last Synced: 2025-01-17T15:52:31.458Z (over 1 year ago)
- Topics: gradle, java, junit5, restclient, spring-boot
- Language: Java
- Homepage: https://webflux.josdem.io/categories/en/
- Size: 66.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Juice RestClient
----------------------------------------------
[](https://github.com/josdem/juice-restclient/actions)
This project shows how to test an API using [RestClient](https://spring.io/blog/2023/07/13/new-in-spring-6-1-restclient) with [Junit Jupiter](https://junit.org/junit5/docs/current/user-guide/)
#### To run tests
```bash
gradle test
```
#### To run a single test
```bash
gradle test --tests ${testName}
```
where:
- `${testName}` is your test name
### To publish library to artifactory using Gradle
```bash
export ARTIFACTORY_USER=${username}
export ARTIFACTORY_PASSWORD=${password}
gradle publish
```
where:
- `${username}` Is artifactory username
- `${password}` Is artifactory password
**Note:** If you want to learn more and publish your own library, feel free to drop me a message on my home page website and ask for a Jfrog credentials.
### To publish library to artifactory using Maven
```bash
mvn deploy
```
Make sure you setup your artifactory credentials in `${USER_HOME}/.m2/settings.xml`
```xml
${username}
${password}
snapshots
```
where:
- `${username}` Is artifactory username
- `${password}` Is artifactory password
#### Read this as reference:
- https://josdem.io/techtalk/java/junit5/