Code Monkey home page Code Monkey logo

fork-restcli's Introduction

All Contributors


restcli
restcli

A missing commandline application for execute IntelliJ HTTP Client file.

restcli restcli

Key FeaturesHow To UseDownloadCreditsLicenseProducthunt

screenshot

Key Features

  • Written by Kotlin 🤩
  • Execute Intellij HTTP request files
  • Running test script including:
    • Embedded script inside HTTP request file
    • Include external javascript test file
  • Loading and inject environment variables from
    • http-client.env.json
    • http-client.private.env.json
  • Cross platform 💻🖥️
    • Windows, macOS and Linux ready.
  • Beautiful request log 🤑🤑🤑
    • Request & response detail
    • Test result table
  • Easy to custom via commandline arguments 😎
    • Custom logging request
    • Inject environment name
  • Generate test report - junit format. 🥰🥰🥰
  • Support setNextRequest. So you can custom flexbile the test flow.
Demo

demo-rest-cli

1. Show detail request/response including test result

request-with-test-success

request-with-test-failed

2. Test result table

test-result-table

3. Generate junit test report (xml) that can be viewed by other tools such as xunit-viewer

generate-junit-test-report

How To Use

The fastest way to get rest cli is download jar from releases tab

Usage: rest-cli [-hV] [-e=<environmentName>] [-l=<logLevel>]
                [-r=<testReportNames>] FILES...
IntelliJ RestCli
      FILES...    Path to one ore more http script files.
  -e, --env=<environmentName>
                  Name of the environment in config file
                  (http-client.env.json/http-client.private.env.json).
  -h, --help      Show this help message and exit.
  -l, --log-level=<logLevel>
                  Config log level while the executor running.
                  Valid values: NONE, BASIC, HEADERS, BODY
  -r, --report-names=<testReportNames>
                  Custom test report names inside folder "test-reports".
                  The report names must separate by ':' character;
                  If the split string of the report name is empty, then the
                    test request file name will
                  be used for report name
                  Such as:
                  java -jar restcli.jar -r custom_report1::custom_report3 test1.
                    http test2.http test3.http
                  Then the test report for test1.http will be custom_report1.xml
                  test2.http -> test2.xml (Because the report name for test2.
                    http is empty)
                  test3.http -> custom_report3.xml
  -V, --version   Print version information and exit.

Example

# Move to folder that contains your http files.
$ cd requests

$ tree
├── get-requests.http
├── http-client.env.json
├── http-client.private.env.json
├── post-requests.http
├── request-form-data.json
├── requests-with-authorization.http
├── requests-with-tests.http
└── test_script.js

$ java -jar /path/to/restcli.jar -e "test" get-requests.http

Note: This application required you install java on your machine.

Download

You can download the latest version of restcli for Windows, macOS and Linux.

Credits

This software uses the following open source packages:

  • Jflex - a lexical analyzer generator (also known as scanner generator) for Java.
  • PicoCli - a mighty tiny command line interface
  • okhttp - the way modern applications network. It’s how we exchange data & media. Doing HTTP efficiently makes your stuff load faster and saves bandwidth.
  • picnic - A Kotlin DSL and Java/Kotlin builder API for constructing HTML-like tables which can be rendered to text.
  • mordant - Full-featured text styling for Kotlin command-line applications.

Support

If you need help, please don't hesitate to file an issue.

Sponsoring

This application is free and can be used for free, open source and commercial applications. restcli is under the MIT License (MIT). So hit the magic button, I appreciate it!!! 🙏

🤝 Contributing

I appreciate your support and feedbacks!

Please file issues if you find bugs and have feature requests. If you are able to send small PRs to improve or fix bugs, that would be awesome too.

For larger PRs, please ping @quangson91 to discuss first.

📝 License

MIT License

Copyright (c) 2020 Duong Quang Son

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Made with by quangson91

restcli.github.io  ·  GitHub @quangson91  ·  Twitter @quangson91

Contributors

Thanks goes to these wonderful people (emoji key):


Martin Qvistgård

📓

Robert Jack Will

🤔

gsobczyk

💻

Vlad

📓

This project follows the all-contributors specification. Contributions of any kind welcome!

fork-restcli's People

Contributors

allcontributors[bot] avatar gsobczyk avatar pil0t avatar quangson91 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.