CLI for Microcks

Microcks CLI

microcks-cli is a command-line tool for interacting with Microcks server APIs. It allows to launch tests with minimal dependencies. It is managed and released independently of the core Microcks server components within its own GitHub repository.

The CLI makes usage of Microcks Service Account so it’s defintely worth the read ;-)

Usage instructions

Usage is simply microcks-cli [command]

where [command] can be one of the following:

  • version to check this CLI version,
  • help to display usage informations,
  • test to launch new test on Microcks server.

The main test command has a bunch of arguments and flags so that you can use it that way:

$ microcks-cli test <apiName:apiVersion> <testEndpoint> <runner> \
	--microcksURL=<> --waitFor=5sec \
	--keycloakClientId=<> --keycloakClientSecret=<>

Check for full instructions on arguments and flags.



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 now available as a container image as version 0.3.0. So that you’d be able to easily use it from a GitLab CI or a Tekton pipeline. The hosting repository is now on here.

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

$ docker run -it microcks-cli test 'Beer Catalog API:0.9' \ POSTMAN \
    --microcksURL= \
    --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"}]}'
“CLI for Microcks” was last updated: October 1, 2020
Improve this page