Skip to content

microcks/microcks-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Microcks CLI

Simple CLI for interacting with Microcks server APIs. It allows to launch tests or import API artifacts with minimal dependencies.

GitHub Workflow Status Container License Project Chat Artifact HUB CNCF Landscape

Build Status

Latest release is 1.0.0.

Current development version is 1.0.1. It is available as a container image named quay.io/microcks/microcks-cli:nightly.

Fossa license and security scans

FOSSA Status FOSSA Status FOSSA Status

Signature, Provenance, SBOM

Static Badge

OpenSSF best practices on Microcks core

CII Best Practices OpenSSF Scorecard

Community

To get involved with our community, please make sure you are familiar with the project's Code of Conduct.

Usage instructions

Usage

microcks [command] [flags]

Available Commands

Command Description Documentation
login Log in to a Microcks instance using Keycloak credentials login
logout Log out and remove authentication from a given context logout
context Manage CLI contexts (list, use, delete) context
start Start a local Microcks instance via Docker/Podman start
stop Stop a local Microcks instance stop
import Import API spec files from local filesystem import
import-url Import API spec files directly from a remote URL import-url
test Run tests against a deployed API using selected runner test
version Print Microcks CLI version version

Options

Flag Description
-h, --help help for microck command
--config Path to Microcks config file
--microcks-context Name of the Microcks context to use
--verbose Produce dumps of HTTP exchanges
--insecure-tls Allow insecure HTTPS connections
--caCerts Comma-separated paths of CA cert files
--keycloakClientId Keycloak Realm Service Account ClientId
--keycloakClientSecret Keycloak Realm Service Account ClientSecret
--microcksURL Microcks API URL

Installation

Building from Source

To build the CLI locally:

make build-local

The resulting binary will be available at:

/build/dist/microcks

You can move it to a location in your $PATH for global usage, for example:

sudo mv build/dist/microcks /usr/local/bin/microcks

Binary

Binary releases for Linux, MacOS or Windows platform are available on the GitHub releases page. Just download the binary corresponding to your system and put the binary into the PATH somewhere ;-)

Container image

The microcks-cli is available as a container image. So that you'd be able to easily use it from a GitLab CI or a Tekton pipeline. The hosting repository is on Quay.io here.

Below a sample on how using the image without getting the CLI binary:

$ docker run -it quay.io/microcks/microcks-cli:latest microcks test 'Beer Catalog API:0.9' http://beer-catalog-impl-beer-catalog-dev.apps.144.76.24.92.nip.io/api/ POSTMAN --microcksURL=http://microcks.apps.144.76.24.92.nip.io/api/ --keycloakClientId=microcks-serviceaccount --keycloakClientSecret=7deb71e8-8c80-4376-95ad-00a399ee3ca1 --waitFor=8sec  --operationsHeaders='{"globals": [{"name": "x-api-key", "values": "my-values"}], "GET /beer": [{"name": "x-trace-id", "values": "xcvbnsdfghjklm"}]}'

Tekton tasks

This repository also contains different Tekton tasks definition and sample pipelines. You'll find under the /tekton folder the resource for current v1beta1 Tekton API version and the older v1alpha1 under tekton/v1alpha1.

About

Simple CLI for interacting with Microcks test APIs

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published

Contributors 7