Automating
Here below all the documentation pages related to Automation.
Microcks Service Accounts
Microcks Service Accounts Introduction Microcks is using OpenId Connect and OAuth 2.0 bearer tokens to secure its frontend and API access. While this is very convenient for interactive users, it may be unpracticable for machine-to-machine authentication when you want to interact with Microcks from a robot, CI/CD pipeline or simple CLI tool. For that, we decided to implement the simple OAuth 2.0 Client Credentials Grant in addition of other grants. This authentication is implemented using Service Accounts clients defined into the Realm configuration in Keycloak.
Read More »
Integrating Microcks from Jenkins
Microcks Jenkins plugin Microcks provides a Jenkins plugin that you may find in its own GitHub repository. This plugin allows your Jenkins builds and jobs to import API specifications into Microcks and to launch tests runner for validating the Service or API you just deployed. See this page on Tests for more informations on running tests with Microcks.
Using this plugin, it is really easy to keep Microcks in-sync withe your API specifications and integrate tests stages within your Continuous Integration / Deployment / Delivery pipeline.
Read More »
CLI for Microcks
Microcks CLI microcks-cli is a command-line tool for interacting with Microcks server APIs. It allows to launch tests or import API artifacts 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 definitely worth the read 😉
Usage instructions Usage is simply microcks-cli [command]
where [command] can be one of the following:
Read More »
Using Microcks from Tekton
Microcks Tekton The Tekton Pipelines project provides Kubernetes-style resources for declaring CI/CD-style pipelines. Microcks makes use of its CLI undercover and provides some Tasks and exemple Pipelines with the /tekton folder of this repository. It also makes usage of Microcks Service Account so it’s defintely worth the read ;-)
Tekton Task The microcks-test-task.yaml resource holds a sample of a Tekton Task for testing with Microcks. You may remove default values for parameters or put your own here.
Read More »
Using Microcks from GitHub Actions
Microcks GitHub Actions What is it? Microcks provides 2 GitHub Actions for interacting with a Microcks instance from your GitHub workflows:
The Microcks Import GitHub Action is a GitHub Action you may use in your Workflow to import a bunch of API artifacts in a Microcks installs. If test succeeds (ie. API endpoint is compliant with API contract in Microcks) the workflow is pursuing, if not it fails,
Read More »
Microcks API
Microcks own’s API As a tool focused on APIs, Microcks also offers its own API that allows you to query its datastore and control the import jobs and configuration objects. You may use this API from your automation tool to dynamically launch new tests, register new mocks or globally control your Microcks server configuration.
The Swagger-UI below allows you to browse and discover the various API endpoints.
Previous releases of the API definitions can be found in the GitHub repository.
Read More »