Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 1.48 KB

README.md

File metadata and controls

30 lines (22 loc) · 1.48 KB

curl-to-java

CircleCI  codebeat badge  License: MIT

Generate Java requests and tests from curls.

How to Use

  • Download the latest release.
  • Add your curls in resources/curls.txt.
  • Run gradle run.

Requirements

Java 9+

How does it work

Curl to Java works by generating taking a curl request, and generating Java code with tests out of it.

Specifically, it performs the following steps.

  1. Transform curl request into generated restTemplate request.
  2. Run generated Java code and get json response.
  3. Generate more code, specifically tests from json response.
  4. Run all the code together and see if the tests pass.

Features

  1. Transforms a curl into a Java http request.
  2. Generates tests to make sure the response is the same each time.
  3. Can customise generated code with templates.