Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vitalijr2/ijhttp-demo
IntelliJ HTTP Client Demo
https://github.com/vitalijr2/ijhttp-demo
api-testing api-testing-tool developer-tools http-client-cli ijhttp integration-testing
Last synced: about 2 months ago
JSON representation
IntelliJ HTTP Client Demo
- Host: GitHub
- URL: https://github.com/vitalijr2/ijhttp-demo
- Owner: vitalijr2
- Created: 2023-05-09T12:56:43.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-06T12:54:15.000Z (3 months ago)
- Last Synced: 2024-10-31T05:51:35.790Z (about 2 months ago)
- Topics: api-testing, api-testing-tool, developer-tools, http-client-cli, ijhttp, integration-testing
- Language: Java
- Homepage:
- Size: 601 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# IntelliJ HTTP Client Demo
This is a demo project to show using of [IntelliJ HTTP Client][ijhttp] CLI.
Further reading about [HTTP Client][http-client] and [specification][spec].## How to run IntelliJ HTTP Client...
### ... on Maven project ...
There are two options: run it with `exec-maven-plugin` and `ijhttp-maven-plugin`.
Both require to install or download **IntelliJ HTTP Client CLI**.
I use `download-maven-plugin` to download it.#### … with Spring Boot Test
Run Maven build
```bash
./mvnw
```You need `ijhttp` in your **PATH**. You can customize it in `src/test/resources/application.yaml`.
#### … with `exec-maven-plugin`
```bash
./mvnw -Pdownload-ijhttp,spring-boot,exec
```#### … with `ijhttp-maven-plugin`
```bash
./mvnw -Pdownload-ijhttp,spring-boot,maven-plugin
```## ... on GitLab CI
There is `.gitlab-ci.yml` who downloads and unpacks `ijhttp` them runs it.
```yaml
http-test:
stage: test
script:
- microdnf install unzip
- curl -f -s -L -o ijhttp.zip https://jb.gg/ijhttp/latest
- unzip -nq ijhttp.zip -d target
- rm ijhttp.zip
- mvn $MAVEN_CLI_OPTS verify -Pspring-boot,maven-plugin
```Example:
![GitLab Pipeline](gitlab-ci.png)Another option use a Docker image but remember that you need to build the jar before this task.
```yaml
http-test-on-docker-image:
image:
name: jetbrains/intellij-http-client:latest
entrypoint: [""]
stage: integration-test
before_script:
- java -jar target/ijhttp-demo.jar &
- while ! nc -z localhost 8080