https://github.com/cleopatra27/chocotea
A library that generates postman collection and integration tests from java code
https://github.com/cleopatra27/chocotea
api insomnia-collections integration-testing jakartaee postman postman-collection spring spring-boot
Last synced: about 2 months ago
JSON representation
A library that generates postman collection and integration tests from java code
- Host: GitHub
- URL: https://github.com/cleopatra27/chocotea
- Owner: cleopatra27
- License: apache-2.0
- Created: 2022-12-20T08:31:16.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-20T00:04:50.000Z (about 2 years ago)
- Last Synced: 2024-05-03T00:16:51.457Z (12 months ago)
- Topics: api, insomnia-collections, integration-testing, jakartaee, postman, postman-collection, spring, spring-boot
- Language: Java
- Homepage:
- Size: 414 KB
- Stars: 37
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-java - ChocoTea
README
# ChocoTea ☕️
⭐ Star on GitHub — it motivates a lot!Chocotea is a library that generates postman collection, environment and integration tests from java code.
The aim of chocotea is to help reduce the amount of time it takes to setup a postman
collection with requests and tests manually. It also helps with sharing API codebase(s),
new developers can generate a postman collection for their changes.Chocotea runs at compile, generates collection json file
and works with:- [Spring](https://mvnrepository.com/artifact/org.springframework/spring-core)
- [Jakarta](https://mvnrepository.com/artifact/jakarta.ws.rs/jakarta.ws.rs-api)
- [javax](https://mvnrepository.com/artifact/javax.ws.rs/javax.ws.rs-api)This can be used with more than one controller on any or all the supported libraries,
however, they need to have different collection names.
## Installation
### Maven
```java
io.chocotea
chocotea
1.0EE
```### gradle
Add this dependency to your project's build file:```java
compile("io.chocotea:chocotea:1.0")
```## Usage (Annotations)
- [@SpringCollection](documentation/SpringCollection.md)
- [@SpringRequest](documentation/SpringRequest.md)
- [@JakartaCollection](documentation/JakartaCollection.md)
- [@JakartaRequest](documentation/JakartaRequest.md)
- [@JavaxCollection](documentation/JavaxCollection.md)
- [@JavaxRequest](documentation/JavaxRequest.md)
- [@ChocoRandom](documentation/ChocoRandom.md)
- [@ChocoExpect](documentation/ChocoExpect.md)
- [@ChocoDuplicateTest](documentation/ChocoDuplicateTest.md)
- [@ChocoCurrencyTest](documentation/ChocoCurrencyTest.md)This library runs on compile, after which your collection and environment json files are stored in
your-project-folder/target/generated-sources/annotationsSample collection [HERE](documentation/sample/sampleCollection.json)
Sample environment [HERE](documentation/sample/sampleEnvironment.json)## Language
This is the list of languages that can be passed to the request. The default is json and options are:
```text
text,
json,
javascript,
html,
xml
```## Auth
This is the list of auth type that can be passed to the request. The default is noauth and options are:
```text
apikey,
awsv4,
basic,
bearer,
digest,
edgegrid,
hawk,
noauth,
oauth1,
oauth2,
ntlm
```