Running SMI Conformance Tests

This guide will help you run SMI Conformance Tests with Meshery through the UI, CLI and a GitHub action for your CI/CD pipelines. To learn more about Meshery and SMI Conformance, see Meshery and Service Mesh Interface (SMI) Conformance

Setup Meshery and Install a Service Mesh

Install and login to Meshery to start running SMI conformance tests. See Installation documentation for detailed steps on how to install Meshery.

Meshery dashboard

Meshery Dashboard

Next, install the service mesh from Meshery. See Service Meshes for a list of supported service meshes and guides on how to install them.

Installing Istio

Istio Dashboard

Alternatively, you can use mesheryctl, Meshery’s CLI to deploy a service mesh. See mesheryctl mesh documentation for details.

Running SMI Conformance Tests Through Meshery UI

Now that we have deployed the service mesh to validate (see Setup Meshery and Install a Service Mesh), we can run an SMI conformance test through the UI.

In the “Validate Service Mesh Configuration” click on the “+” button and select “SMI Conformance”.

Running SMI Conformance Test on Istio

Running SMI Conformance Tests on Istio

This will start running the SMI Conformance tests.

Once the tests are done, you can navigate to SMI Conformance results page by clicking the conformance tab on the menu.

SMI Conformance Test Results

SMI Conformance Test Results

Click the dropdown button to view the results of a specific test.

Viewing the Results

SMI Conformance Test Results

Running SMI Conformance Tests Through Meshery CLI (mesheryctl)

Once we have deployed the service mesh to validate (see Setup Meshery and Install a Service Mesh), we can run an SMI conformance test through the CLI (mesheryctl).

You can also use mesheryctl, Meshery’s CLI to deploy a service mesh. See mesheryctl mesh documentation for details.

Download the token from the Meshery Dashboard by clicking on the profile icon on the top-right corner.

Downloading the token

SMI Conformance Test Results

Open a terminal and run the following command.

mesheryctl mesh validate -a [name of the adapter] -t [path to token for authentication] -s smi

For example to run an SMI Conformance test on Open Service Mesh, we can run:

mesheryctl mesh validate -a meshery-osm:10009 -t ~/Downloads/auth.json -s smi

To view the results of the test, you can open up Meshery in the browser and navigate to the “Conformance” tab.

SMI Conformance Test Results

SMI Conformance Test Results

Click the dropdown button to view the results of a specific test.

Viewing the Results

SMI Conformance Test Results

Running SMI Conformance Tests in CI/CD Pipelines

You can use Meshery SMI Conformance GitHub action to run SMI Conformance tests in your CI/CD pipelines.

The conformance test would be run in your pipeline and the results will be published on your Meshery Dashboard (see Setup Meshery and Install a Service Mesh).

Download the token from the Meshery Dashboard by clicking on the profile icon on the top-right corner.

Downloading the token

SMI Conformance Test Results

You can use this token to authenticate the instance of Meshery running in your CI/CD workflow.

A sample workflow that could be added to your .github/workflows folder is given below. This example uses Open Service Mesh.

name: SMI Conformance with Meshery on: push: tags: - 'v*' jobs: smi-conformance: name: SMI Conformance runs-on: ubuntu-latest steps: - name: Validate SMI Conformance uses: layer5io/mesheryctl-smi-conformance-action@master with: service_mesh: open_service_mesh provider_token: $ mesh_deployed: false

Once the tests are run, you can log into Meshery to view the results in the “Conformance” tab.

SMI Conformance Test Results

SMI Conformance Test Results

Click the dropdown button to view the results of a specific test.

Viewing the Results

SMI Conformance Test Results

Suggested Reading